unstale

npm / langchain

langchain

What changed in langchain 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

16 breaking4 security28 new APIs and options11 behavior and defaults1 tooling49 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

langchain 1109 changes

Breaking changes 16

  • In both modes, setting tool to true allows every decision, including respond.

    1.5.18release notes

  • Respects retryability marks by default and stops retrying once a non-retryable error is found; unclassified errors retain the previous retry behavior.

    1.5.9release notes

  • Aborted calls, context overflow, and oversized payloads are marked non-retryable out of the box, so they fail without consuming retry budgets.

    1.5.9release notes

  • Passing retryOn: () => true restores the previous retry behavior for errors marked non-retryable.

    1.5.9release notes

  • Respects retryability marks by default and stops retrying once a non-retryable error is found; unclassified errors retain the previous retry behavior.

    1.5.9release notes

  • Middleware-internal model calls and summaries are no longer projected as messages in run.messages or message streams; they remain observable through v2 stream events via lc_source.

    1.5.6release notes

  • Throws StructuredOutputParsingError when a terminal providerStrategy response cannot be parsed or does not satisfy the schema; tool calls can still continue the agent loop.

    1.4.1release notes

  • Fireworks is extracted into a standalone provider package.

    1.3.0release notes

  • A standalone Perplexity provider package is available.

    1.3.0release notes

  • Together AI is migrated into a provider package.

    1.3.0release notes

  • Renamed getSubgraphAsync to getSubgraphsAsync.

    1.2.35release notes

  • The afterModel router now respects the tool behavior version: v1 routes the full AIMessage to one ToolNode invocation, while v2 dispatches each tool call as a separate Send task.

    1.2.34release notes

  • fakeModel moved from utils/testing to the testing namespace, so update imports to use the updated namespace.

    1.2.30release notes

  • The default model changes to claude-sonnet-4-5-20250929, replacing the retired claude-3-5-sonnet-latest.

    1.2.26release notes

  • Hooks that return void no longer re-emit the input state.

    1.2.20release notes

  • strict now defaults to true in providerStrategy for OpenAI compatibility.

    1.2.4release notes

Security 4

  • Middleware hook input state is derived from the current invocation state instead of cross-node cached state, preventing state from leaking across threads.

    1.3.2release notes

  • LangChain serialization injection vulnerability enables secret extraction

    1.2.3security advisory

  • Security hardening was added for load.

    1.2.3release notes

  • Prevents summarization middleware from leaking streaming events.

    1.1.6release notes

New APIs and options 28

  • Adds opt-in per_call mode, which raises a separate tool_approval interrupt for each gated tool call, answered by interrupt ID; respond is supported.

    1.5.18release notes

  • Adds Interrupt.response_schema.

    1.5.18release notes

  • Adds an API to read an error's retryability mark; it returns undefined when an error has not been classified.

    1.5.9release notes

  • Models accept a per-call maxRetries value so a surrounding retry loop can take over.

    1.5.9release notes

  • Adds an API to mark errors as retryable or non-retryable without changing their class or shape, allowing provider SDK errors and tool failures to be classified.

    1.5.9release notes

  • initChatModel now supports the LangSmith gateway.

    1.5.7release notes

  • Adds middleware for handling tool execution errors.

    1.5.4release notes

  • V3 runs expose named nested agents invoked from tools through run.subagents, with scoped messages, tool calls, and output.

    1.5.0release notes

  • Adds a typed stream handle for named nested agents, exposing name, cause, scoped messages and tool calls, and output.

    1.5.0release notes

  • Adds middleware that makes a best-effort attempt to use prompt caching features for supported Bedrock models.

    1.4.6release notes

  • Adds an optional when callback that dynamically skips interrupts for specific tool calls by deciding whether to interrupt or auto-approve.

    1.4.6release notes

  • LangChain adds support for browser tools.

    1.3.0release notes

  • initChatModel adds support for ChatGoogle.

    1.3.0release notes

  • Adds support for dynamic structured output.

    1.2.39release notes

  • LangSmith integration metadata is added to createAgent and initChatModel.

    1.2.36release notes

  • Adds a browser export for LangChain, allowing browser-specific module resolution.

    1.2.32release notes

  • Adds Vitest matchers for LangChain message and tool call assertions, registerable with expect.extend; the matchers are also re-exported from langchain.

    1.2.30release notes

  • Structured output now supports standard schemas.

    1.2.29release notes

  • Added a getter/setter that forwards store access to the internal compiled graph.

    1.2.28release notes

  • Adds an optional tools parameter for more accurate token estimates when tools are bound to a model.

    1.2.20release notes

  • Adds an optional modelProvider parameter for direct config lookup, avoiding className collisions while preserving callers that pass only className.

    1.2.18release notes

  • Adds a ReactAgent method for setting default configuration values that merge with invocation-time config.

    1.2.17release notes

  • Summarization model calls are tagged with lc_source metadata, allowing developers to identify their source.

    1.2.11release notes

  • Agent generics now use a type bag pattern with AgentTypeConfig, MiddlewareTypeConfig, and helper types for type extraction.

    1.2.7release notes

  • Prompt pulling now supports secrets.

    1.2.4release notes

  • Prompt pulling now supports secretsFromEnv.

    1.2.4release notes

  • The stream API now supports the callbacks property.

    1.2.4release notes

  • Allows developers to set the strict tag manually in providerStrategy.

    1.1.6release notesrelease notes

Behavior and default changes 11

  • Error ToolMessages from the tool node carry status: "error"; a ToolMessage returned by a custom handleToolErrors function defaults to that status if none is set.

    1.5.14release notes

  • A custom onFailedAttempt handler replaces the built-in handler and opts out of automatic error marking.

    1.5.9release notes

  • Tool-call streams now treat any serialized graph interrupt as control flow, keeping the call pending so it can resume instead of rejecting its output promise.

    1.5.1release notes

  • Adds ls_agent_type to tracing metadata when creating agent runs.

    1.3.4release notes

  • Accepts cross-version runnable models.

    1.2.39release notes

  • Dynamic tools can be used in wrapModelCall with wrapToolCall.

    1.2.39release notes

  • Store and configurable are now propagated to the ToolNode middleware runtime.

    1.2.34release notes

  • The middleware runtime now receives configurable from the LangGraph config.

    1.2.28release notes

  • Middleware hooks can return Command objects for advanced control flow, matching the existing wrapToolCall pattern.

    1.2.20release notes

  • Summarization middleware messages now include the lc_source tag.

    1.2.8release notes

  • Adds support for anyOf, allOf, and oneOf in OpenAPI conversion.

    1.1.6release notes

Tooling 1

  • Type inference is implemented for tool streams, allowing developers to infer their types.

    1.2.31release notes

Fixes and other changes 49

  • Edits in per_call mode are pinned to the called tool and checked against the input side of its Zod v4 schema, so transforms run once when the tool does; invalid answers throw without being saved.

    1.5.18release notes

  • With middleware, createAgent now passes a Command built by a different copy of @langchain/langgraph to the graph as-is instead of merging it into the input state as a plain object.

    1.5.16release notes

  • Preserves LangGraph interrupts instead of retrying them or converting them into tool errors, allowing interrupted tool calls to pause and resume through their checkpointer.

    1.5.15release notes

  • A failed returnDirect tool call, including one with arguments that fail the tool schema, now returns to the model for correction and retry; the run ends on the first successful returnDirect result.

    1.5.14release notes

  • Callbacks are preserved when the compiled graph is extracted, without duplicate calls through the agent.

    1.5.12release notes

  • Structured-output parsing now ignores thought/reasoning text blocks.

    1.5.11release notes

  • The gateway now uses a unified endpoint.

    1.5.9release notes

  • Runtime instance comparisons now use the same logic as .isInstance(), avoiding conflicts when multiple versions of core are installed.

    1.5.6release notes

  • Resolves LocalFileStore keys with path.relative.

    1.5.5release notes

  • Malformed tool input schemas are unrecoverable.

    1.5.3release notes

  • Strict tools are decoupled from strict structured output responses.

    1.5.2release notes

  • Tool message outputs are unwrapped in agent streams.

    1.4.2release notes

  • ToolMessages produced by todoListMiddleware now have a name set.

    1.4.2release notes

  • Prevents llmToolSelectorMiddleware from leaking into the message stream.

    1.4.1release notes

  • Prevents local file corruption when using LocalFileStore.

    1.3.3release notes

  • createAgent and prebuilt middleware are now exported from the browser entry point, making them available to browser users.

    1.2.38release notes

  • Reverting the Zod import in utils.ts fixes interoperability between Zod v3 and v4.

    1.2.38release notes

  • Adds the aws alias so hub/node can auto-detect ChatBedrockConverse from Python-serialized prompts.

    1.2.37release notes

  • Structured output using providerStrategy is supported for Google Gemini models in createAgent.

    1.2.36release notes

  • Fixes routing when an agent combines returnDirect tools with beforeModel middleware, preventing non-returnDirect tools from failing with an unknown or null destination.

    1.2.33release notes

  • Serializable schemas are now exposed on the create agent response format.

    1.2.31release notes

  • The todo schema is now exported for developers to use.

    1.2.31release notes

  • Structured output retry Commands are now propagated through wrapModelCall middleware.

    1.2.29release notes

  • Added a getter/setter that forwards checkpointer access to the internal compiled graph, fixing ignored LangGraph API server checkpointer injection and lost thread state across restarts.

    1.2.28release notes

  • The middleware runtime now receives store from the LangGraph config; previously, runtime.store was always undefined even when a store was provided to createAgent().

    1.2.28release notes

  • Middleware hooks now infer StateSchema value types correctly.

    1.2.27release notes

  • The shared currentSystemMessage is reset when a middleware handler retries.

    1.2.26release notes

  • Export the ModelRequest interface so developers can import and use it.

    1.2.25release notes

  • Persist underscore-prefixed middleware state fields across graph steps.

    1.2.25release notes

  • Fixed streaming types.

    1.2.24release notes

  • Fixed structured output on opus.

    1.2.23release notes

  • Subagent names are now propagated in metadata.

    1.2.21release notes

  • Supports concurrent dynamic prompts in agentNode.

    1.2.20release notes

  • Pregel keys are filtered from the cache key to avoid out-of-memory errors.

    1.2.16release notes

  • StateSchema is now supported in the middleware pipeline.

    1.2.15release notes

  • Middleware state parsing now correctly handles both Zod objects and LangGraph's StateSchema.

    1.2.14release notes

  • Graph interrupt errors are now bubbled up as-is.

    1.2.12release notes

  • Middleware errors use cause instead of concatenating the error, preserving the underlying cause.

    1.2.10release notes

  • createAgent state schemas now preserve reducer metadata.

    1.2.8release notes

  • Models now make only one write_todo call at a time.

    1.2.7release notes

  • The afterModel Router now uses parseJumpToTarget.

    1.2.4release notes

  • Message summarization now uses getBufferString, changing how messages are converted to summary input.

    1.2.4release notes

  • Summarization now preserves tool call and AIMessage pairings.

    1.2.4release notes

  • The schema title is now passed through properly.

    1.2.4release notes

  • Interop with Zod is improved.

    1.2.4release notes

  • Prevents functions from being accidentally assignable to AgentMiddleware.

    1.1.6release notes

  • Fixes patch prompts created from runs.

    1.1.6release notes

  • Structured output is now properly retrieved from a thinking block.

    1.1.6release notes

  • Uses summaryPrefix or falls back to the default prefix.

    1.1.6release notes