Skip to content

feat: upgrade LangChain to v1#45

Merged
janole merged 11 commits intomainfrom
upgrade/langchain-v1
Mar 2, 2026
Merged

feat: upgrade LangChain to v1#45
janole merged 11 commits intomainfrom
upgrade/langchain-v1

Conversation

@chat-bandit
Copy link
Contributor

@chat-bandit chat-bandit bot commented Mar 2, 2026

Upgrade all LangChain packages from v0.3.x to v1.x (v2.x for google-genai).

⚙️ Under the Hood

  • Upgraded all @langchain/* packages to latest major versions:
    • langchain 0.3 → 1.x
    • @langchain/core 0.3 → 1.x
    • @langchain/anthropic 0.3 → 1.x
    • @langchain/openai 0.6 → 1.x
    • @langchain/google-genai 0.2 → 2.x
    • @langchain/groq 0.2 → 1.x
    • @langchain/ollama 0.2 → 1.x
  • Fixed DynamicStructuredTool import path from langchain/tools@langchain/core/tools
  • Added explicit return type annotations (TTools, DynamicStructuredTool) to resolve TS2742 errors caused by internal module re-exports in @langchain/core v1
  • Removed obsolete patches/@langchain+ollama+0.2.4.patch (hardcoded index: 0 fix — resolved upstream in v1)

🧯 Risk and Rollback

  • Risk Level: Medium — major version bump across 7 packages
  • Known Risks: Streaming and tool-calling behavior may differ subtly at runtime despite passing typecheck
  • Rollback Plan: Revert PR and npm install
  • Mitigations: Lint + typecheck pass; core APIs (bindTools, stream, invoke, message types) are preserved in v1

@janole janole changed the title Upgrade LangChain to v1 feat: upgrade LangChain to v1 Mar 2, 2026
@janole janole self-assigned this Mar 2, 2026
@janole janole merged commit 5f369cb into main Mar 2, 2026
1 check passed
@janole janole deleted the upgrade/langchain-v1 branch March 2, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant