Skip to content

.[agents] extra omits langchain-anthropic, so a shipped example cannot run #486

Description

@ambiorix2099

Files: pyproject.toml ([tool.poetry.extras]), affects examples/agents/langgraph/43_react_agent_multi_model.py

Symptom: After the documented install — pip install -e '.[agents]', which is what CI runs — the example fails immediately:

ModuleNotFoundError: No module named 'langchain_anthropic'

Cause: The agents extra lists langchain, langchain-core, langchain-openai, langgraph, google-adk, openai, openai-agents, anthropic, claude-code-sdk — but not langchain-anthropic, which 43_react_agent_multi_model.py imports for ChatAnthropic.

Fix: Add langchain-anthropic to the agents extra (and its own langchain-anthropic extra alongside the existing langchain / langgraph ones).

Verify: From a clean env, pip install -e '.[agents]' then python examples/agents/langgraph/43_react_agent_multi_model.py runs. Confirmed: with langchain-anthropic 1.5.5 installed manually it passes on both server types (5.8s / 76.7s).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions