langchain
1.6.7 · 18 Nov 2026MIT4.2M / weekRepositoryHomepagenpmAtom feed
1.6.7 is the newest release of 1.x.
In short
3 fixed
Release note
Patch Changes
langchain: Respect version:"v1" in afterModel router's pending tool call path
agents: Propagate store and configurable to ToolNode middleware runtime
langchain/agents: Dispatch tool calls via Send in afterModel router for version:"v2"
Breaking change for
version: "v2"+afterModelmiddleware users.Previously, when
afterModelmiddleware was present,createAgentalways routed all tool calls from anAIMessageto a singleToolNodeinvocation — regardless of theversionoption. This meantversion: "v2"silently behaved likeversion: "v1"(parallel viaPromise.allin one node) wheneverafterModelmiddleware was used.#createAfterModelRouternow correctly respects#toolBehaviorVersion:version: "v1"— routes the fullAIMessageto a singleToolNodeinvocation; all tool calls run concurrently viaPromise.all(unchanged behaviour).version: "v2"— dispatches each tool call as a separateSendtask, matching the behaviour of#createModelRouterwhen noafterModelmiddleware is present, and matching Python LangGraph'spost_model_hook_router.
Migration: If you use
version: "v2"(the default) together withafterModelmiddleware and rely on the previous single-node parallel execution, switch toversion: "v1"to preserve that behaviour. See theversionJSDoc onCreateAgentParamsfor guidance on which option to choose.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.