Packages

langchain

1.6.7 · 18 Nov 2026MIT4.2M / weekRepositoryHomepagenpmAtom feed

Your version

1.2.34

17 Mar 2026Where it was published

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" + afterModel middleware users.

    Previously, when afterModel middleware was present, createAgent always routed all tool calls from an AIMessage to a single ToolNode invocation — regardless of the version option. This meant version: "v2" silently behaved like version: "v1" (parallel via Promise.all in one node) whenever afterModel middleware was used.

    #createAfterModelRouter now correctly respects #toolBehaviorVersion:

    • version: "v1" — routes the full AIMessage to a single ToolNode invocation; all tool calls run concurrently via Promise.all (unchanged behaviour).

    • version: "v2" — dispatches each tool call as a separate Send task, matching the behaviour of #createModelRouter when no afterModel middleware is present, and matching Python LangGraph's post_model_hook_router.

    Migration: If you use version: "v2" (the default) together with afterModel middleware and rely on the previous single-node parallel execution, switch to version: "v1" to preserve that behaviour. See the version JSDoc on CreateAgentParams for 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.