Skip to content

Conversation

@zhangzhefang-github
Copy link

Problem

Users installing langchain 1.0.3 encountered a ModuleNotFoundError when importing from langgraph.prebuilt.tool_node, even though langgraph>=1.0.2 was correctly specified as a dependency.

While langgraph 1.0.2 declares langgraph-prebuilt>=1.0.2 as a dependency, in certain installation scenarios (particularly with pip), transitive dependencies may not be properly resolved.

Solution

Add langgraph-prebuilt>=1.0.2,<1.1.0 as an explicit direct dependency in langchain's pyproject.toml. This ensures the package is always installed regardless of dependency resolution order or package manager behavior.

Testing

  • Verified imports work: from langgraph.prebuilt.tool_node import ToolNode
  • Verified create_agent() works correctly with the dependency
  • All local imports and basic functionality tests pass

Fixes langchain-ai#33804

## Problem
Users installing langchain 1.0.3 encountered a ModuleNotFoundError when
importing from langgraph.prebuilt.tool_node, even though langgraph>=1.0.2
was correctly specified as a dependency.

While langgraph 1.0.2 declares langgraph-prebuilt>=1.0.2 as a dependency,
in certain installation scenarios (particularly with pip), transitive
dependencies may not be properly resolved.

## Solution
Add langgraph-prebuilt>=1.0.2,<1.1.0 as an explicit direct dependency
in langchain's pyproject.toml. This ensures the package is always installed
regardless of dependency resolution order or package manager behavior.

## Testing
- Verified imports work: from langgraph.prebuilt.tool_node import ToolNode
- Verified create_agent() works correctly with the dependency
- All local imports and basic functionality tests pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@github-actions github-actions bot added langchain Related to the package `langchain` dependencies Pull requests that update a dependency file v1 Issue specific to LangChain 1.0 fix labels Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file fix langchain Related to the package `langchain` v1 Issue specific to LangChain 1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant