# langchainjs/release
LangChain.js langchain@1.6.5
importance: highfeaturesecurity
This patch release adds middleware for routing an agent to a model selected by a decision model and for blocking tool calls judged risky. It also raises the minimum installed Zod version to 4.6.6 to exclude versions affected by GHSA-mrhx-c7xc-m3w5; Zod v3 schemas remain supported via the bundled `zod/v3` entry point.
affected
LangChain.js users gain model-routing and risky-tool-blocking middleware, while users with installed Zod dependencies must use version 4.6.6 or newer.
action
Ensure installed Zod dependencies are at least 4.6.6; use the bundled `zod/v3` entry point if you need Zod v3 schemas.
release_signals
!Require installed Zod 4.6.6 or newer to exclude versions affected by GHSA-mrhx-c7xc-m3w5. Zod v3 schemas remain supported through the bundled `zod/v3` entry point.
+Added `modelRouterMiddleware` to select the agent's model for each run based on a decision model's `Choice` answer.
+Added `autoModeMiddleware` to block listed tool calls that a decision model judges risky.
# community_signal
How useful is this release to your stack?
—
net score
Sign in with GitHub to cast your vote.
Sign in with GitHub to vote
You’ll return to this release, then choose your vote.