Pin LangChain version to less than 1.0 - #168
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR pins LangChain-related dependencies to versions less than 1.0 to avoid breaking changes introduced in the LangChain 1.0 release. The PR addresses compatibility issues with features like AgentExecutor, langchain.hub, tool, and create_react_agent by constraining package versions until upstream documentation and migration paths are more mature.
Key Changes:
- Version constraints added to LangChain ecosystem packages
- Import path updated to use
langchain_corefor callback handlers
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pyproject.toml | Added version constraints <1.0 to langgraph, langchain[openai], and langchain-text-splitters dependencies |
| agentlightning/tracer/base.py | Updated import path from langchain.callbacks.base to langchain_core.callbacks.base for better compatibility |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| "langchain[openai]", | ||
| "langgraph<1.0", | ||
| "langchain[openai]<1.0", | ||
| "langchain-community", |
There was a problem hiding this comment.
The langchain-community package should also be pinned to <1.0 for consistency with other LangChain packages. LangChain 1.0 includes breaking changes across the ecosystem, and langchain-community is part of this ecosystem.
| "langchain-community", | |
| "langchain-community<1.0", |
LangChain 1.0 has been released. It has broken many of our usages like
AgentExecutor,langchain.hub,tool,create_react_agent. Due to the documentation is still under construction, I cannot easily find substitutes that I'm sure will work well.So let's pin langchain for now and wait for upstream to be more mature.