Repository navigation
Add mcp to the llm extra for litellm 1.108.2 - #2
matthewmcneely wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This is PR 1 of 3 you may keep open at a time. |
|
This PR has no linked approved issue. Open an issue, get it discussed and Maintainers: reopen this PR to override the gate (it gets the |
|
This PR has no linked approved issue. Open an issue, get it discussed and Maintainers: reopen this PR to override the gate (it gets the |
[Medium impact] The dependency change appears safe to merge. SummaryAdds
Reviews (1) · Last reviewed commit: "Add mcp to the llm extra for litellm 1.1..." · Reviewed by Greptile |
This PR adds
mcp>=2.2to thellmextra sopip install "selfgraph[llm]"works withlitellm1.108.2.litellm's plain
completionpath in 1.108.2 importsmcp, but litellm only declares it under itsproxyandmcpextras. Without it, everyinsert.textthroughDefaultExtractorfails withModuleNotFoundError: No module named 'mcp'before a request goes out.The floor is
>=2.2rather than the>=1.2used bydevandall. litellm itself asks formcp>=2.2.0,<3, andmcp1.2 doesn't import against current pydantic anyway.selfgraph.mcp.serverstill imports fine onmcp2.3, and theallextra resolves to the higher floor.Testing
Fresh Python 3.12 venvs, both resolving
litellm==1.108.2:import litellm.responses.mcp.chat_completions_handlerselfgraph[llm]frommainModuleNotFoundError: No module named 'mcp'selfgraph[llm]from this branchmcp2.3.0)Also ran LLM extraction end to end against Anthropic with
mcpinstalled.ruff checkandruff format --checkpass.Closes #1
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.