langchain-ai/langchainjs
langchain@1.6.5Building context-aware, stateful reasoning applications and multi-actor LangGraph workflows in TypeScript.
LangChainJS is an open-source framework designed to simplify building applications with large language models through composable chains, agents, and prompts. This release addresses an urgent security vulnerability in peer dependencies while introducing intelligent model routing and risk-mitigation middleware for autonomous agents.
Summaries, compatibility signals, and upgrade commands on this page are generated automatically by AI without human editorial review on an "as-is" basis. Verify against official upstream GitHub release notes before upgrading, see Legal Disclaimer or Report an Error.
Security patch for Zod vulnerability and added model router middleware. Upgrade to Zod >=4.6.6. Migration: Low.
Key Release Highlights (langchain@1.6.5)
- Added
modelRouterMiddlewareto dynamically select agent execution models using decision metrics. - Added
autoModeMiddlewareto block high-risk tool calls evaluated by decision models. - Required
zod>=4.6.6 to resolveGHSA-mrhx-c7xc-m3w5, with continued support for legacyzod/v3schemas via explicit entry points.
Security patch for Zod vulnerability and added model router middleware. Upgrade to Zod >=4.6.6. Migration: Low.
npm install zod@^4.6.6 @langchain/core@latestEcosystem Compatibility Matrix & Detected Graph Signals
Zero-Noise Historical Release Timeline (2)
Format: [Core Change] + [Required Action] + [Migration Effort]Security patch for Zod vulnerability and added model router middleware. Upgrade to Zod >=4.6.6. Migration: Low.
Ships @langchain/core@langchain@1.6.2 with upstream runt. Drop-in upgrade. Migration: None.
Upgrade & Migration Q&A (langchain-ai/langchainjs langchain@1.6.5)
Direct Answers for Engineers & AI AgentsIs langchain-ai/langchainjs langchain@1.6.5 safe to upgrade in production?
langchain-ai/langchainjs langchain@1.6.5 is classified as SECURITY_PATCH (PATCH release). Security patch for Zod vulnerability and added model router middleware. Upgrade to Zod >=4.6.6. Migration: Low.
What breaking changes or compatibility risks exist in langchain-ai/langchainjs langchain@1.6.5?
No breaking API changes or peer dependency conflicts are recorded for langchain-ai/langchainjs langchain@1.6.5 in the Reposen compatibility graph.
What is the bundle size impact of @langchain/core langchain@1.6.5?
Measured bundle size telemetry is currently unavailable for @langchain/core langchain@1.6.5; verify build output locally before deploying.
How do I upgrade @langchain/core to langchain@1.6.5?
Upgrade @langchain/core to langchain@1.6.5 by running "npm install @langchain/core@1.6.5" and applying the migration steps: npm install zod@^4.6.6 @langchain/core@latest
Featured in Daily Cortex Briefs (1)
Browse All Daily Briefs →langchain-ai/langchainjs (langchain@1.6.2) & anthropics/anthropic-sdk-typescript (sdk-v1.6.0) — AI Engineering & Agent Runtimes
Ships @langchain/core@langchain@1.6.2 with upstream runt. Drop-in upgrade. Migration: None.