# What changed in langchain

> 121 changes in langchain 0.3 to 1 from its official release notes, upgrade guides and advisories: 18 breaking, 5 security, 28 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/langchain/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## langchain 1

### Breaking changes

- In both modes, setting tool to true allows every decision, including respond. (1.5.18) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.18)
- Respects retryability marks by default and stops retrying once a non-retryable error is found; unclassified errors retain the previous retry behavior. (1.5.9) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.9)
- Aborted calls, context overflow, and oversized payloads are marked non-retryable out of the box, so they fail without consuming retry budgets. (1.5.9) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.9)
- Passing retryOn: () => true restores the previous retry behavior for errors marked non-retryable. (1.5.9) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.9)
- Respects retryability marks by default and stops retrying once a non-retryable error is found; unclassified errors retain the previous retry behavior. (1.5.9) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.9)
- 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.6) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.6)
- 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.1) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.4.1)
- Fireworks is extracted into a standalone provider package. (1.3.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.3.0)
- A standalone Perplexity provider package is available. (1.3.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.3.0)
- Together AI is migrated into a provider package. (1.3.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.3.0)
- Renamed getSubgraphAsync to getSubgraphsAsync. (1.2.35) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.35)
- 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.34) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.34)
- fakeModel moved from utils/testing to the testing namespace, so update imports to use the updated namespace. (1.2.30) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.30)
- The default model changes to claude-sonnet-4-5-20250929, replacing the retired claude-3-5-sonnet-latest. (1.2.26) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.26)
- Hooks that return void no longer re-emit the input state. (1.2.20) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.20)
- strict now defaults to true in providerStrategy for OpenAI compatibility. (1.2.4) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.4)
- Constrained the lower bound of the core peer dependency, affecting which @langchain/core versions satisfy the peer dependency requirement. (1.1.1) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.1.1)
- The exit behavior was renamed from throw to error. (1.0.5) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.0.5)

### Security

- 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.2) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.3.2)
- LangChain serialization injection vulnerability enables secret extraction (1.2.3) — [security advisory](https://github.com/advisories/GHSA-R399-636X-V7F6)
- Security hardening was added for load. (1.2.3) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.3)
- Prevents summarization middleware from leaking streaming events. (1.1.6) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.1.6)

### New APIs and options

- 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.18) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.18)
- Adds Interrupt.response_schema. (1.5.18) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.18)
- Adds an API to read an error's retryability mark; it returns undefined when an error has not been classified. (1.5.9) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.9)
- Models accept a per-call maxRetries value so a surrounding retry loop can take over. (1.5.9) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.9)
- 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.9) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.9)
- initChatModel now supports the LangSmith gateway. (1.5.7) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.7)
- Adds middleware for handling tool execution errors. (1.5.4) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.4)
- V3 runs expose named nested agents invoked from tools through run.subagents, with scoped messages, tool calls, and output. (1.5.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.0)
- Adds a typed stream handle for named nested agents, exposing name, cause, scoped messages and tool calls, and output. (1.5.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.0)
- Adds middleware that makes a best-effort attempt to use prompt caching features for supported Bedrock models. (1.4.6) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.4.6)
- Adds an optional when callback that dynamically skips interrupts for specific tool calls by deciding whether to interrupt or auto-approve. (1.4.6) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.4.6)
- LangChain adds support for browser tools. (1.3.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.3.0)
- initChatModel adds support for ChatGoogle. (1.3.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.3.0)
- Adds support for dynamic structured output. (1.2.39) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.39)
- LangSmith integration metadata is added to createAgent and initChatModel. (1.2.36) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.36)
- Adds a browser export for LangChain, allowing browser-specific module resolution. (1.2.32) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.32)
- Adds Vitest matchers for LangChain message and tool call assertions, registerable with expect.extend; the matchers are also re-exported from langchain. (1.2.30) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.30)
- Structured output now supports standard schemas. (1.2.29) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.29)
- Added a getter/setter that forwards store access to the internal compiled graph. (1.2.28) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.28)
- Adds an optional tools parameter for more accurate token estimates when tools are bound to a model. (1.2.20) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.20)
- Adds an optional modelProvider parameter for direct config lookup, avoiding className collisions while preserving callers that pass only className. (1.2.18) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.18)
- Adds a ReactAgent method for setting default configuration values that merge with invocation-time config. (1.2.17) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.17)
- Summarization model calls are tagged with lc_source metadata, allowing developers to identify their source. (1.2.11) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.11)
- Agent generics now use a type bag pattern with AgentTypeConfig, MiddlewareTypeConfig, and helper types for type extraction. (1.2.7) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.7)
- Prompt pulling now supports secrets. (1.2.4) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.4)
- Prompt pulling now supports secretsFromEnv. (1.2.4) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.4)
- The stream API now supports the callbacks property. (1.2.4) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.4)
- Allows developers to set the strict tag manually in providerStrategy. (1.1.6) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.0), [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.1.6)

### Behavior and default changes

- 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.14) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.14)
- A custom onFailedAttempt handler replaces the built-in handler and opts out of automatic error marking. (1.5.9) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.9)
- 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.1) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.1)
- Adds ls_agent_type to tracing metadata when creating agent runs. (1.3.4) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.3.4)
- Accepts cross-version runnable models. (1.2.39) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.39)
- Dynamic tools can be used in wrapModelCall with wrapToolCall. (1.2.39) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.39)
- Store and configurable are now propagated to the ToolNode middleware runtime. (1.2.34) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.34)
- The middleware runtime now receives configurable from the LangGraph config. (1.2.28) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.28)
- Middleware hooks can return Command objects for advanced control flow, matching the existing wrapToolCall pattern. (1.2.20) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.20)
- Summarization middleware messages now include the lc_source tag. (1.2.8) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.8)
- Adds support for anyOf, allOf, and oneOf in OpenAPI conversion. (1.1.6) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.1.6)
- Context editing was aligned with the summarization interface. (1.0.5) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.0.5)
- Summarization middleware now uses profile.maxInputTokens. (1.0.5) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.0.5)
- Tool call contents and tool call IDs are now included to improve token count approximation. (1.0.5) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.0.5)

### Tooling

- Type inference is implemented for tool streams, allowing developers to infer their types. (1.2.31) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.31)

### Fixes and other changes

- 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.18) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.18)
- 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.16) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.16)
- 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.15) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.15)
- 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.14) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.14)
- Callbacks are preserved when the compiled graph is extracted, without duplicate calls through the agent. (1.5.12) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.12)
- Structured-output parsing now ignores thought/reasoning text blocks. (1.5.11) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.11)
- The gateway now uses a unified endpoint. (1.5.9) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.9)
- Runtime instance comparisons now use the same logic as .isInstance(), avoiding conflicts when multiple versions of core are installed. (1.5.6) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.6)
- Resolves LocalFileStore keys with path.relative. (1.5.5) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.5)
- Malformed tool input schemas are unrecoverable. (1.5.3) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.3)
- Strict tools are decoupled from strict structured output responses. (1.5.2) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.5.2)
- Tool message outputs are unwrapped in agent streams. (1.4.2) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.4.2)
- ToolMessages produced by todoListMiddleware now have a name set. (1.4.2) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.4.2)
- Prevents llmToolSelectorMiddleware from leaking into the message stream. (1.4.1) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.4.1)
- Prevents local file corruption when using LocalFileStore. (1.3.3) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.3.3)
- createAgent and prebuilt middleware are now exported from the browser entry point, making them available to browser users. (1.2.38) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.38)
- Reverting the Zod import in utils.ts fixes interoperability between Zod v3 and v4. (1.2.38) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.38)
- Adds the aws alias so hub/node can auto-detect ChatBedrockConverse from Python-serialized prompts. (1.2.37) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.37)
- Structured output using providerStrategy is supported for Google Gemini models in createAgent. (1.2.36) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.36)
- 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.33) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.33)
- Serializable schemas are now exposed on the create agent response format. (1.2.31) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.31)
- The todo schema is now exported for developers to use. (1.2.31) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.31)
- Structured output retry Commands are now propagated through wrapModelCall middleware. (1.2.29) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.29)
- 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.28) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.28)
- 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.28) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.28)
- Middleware hooks now infer StateSchema value types correctly. (1.2.27) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.27)
- The shared currentSystemMessage is reset when a middleware handler retries. (1.2.26) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.26)
- Export the ModelRequest interface so developers can import and use it. (1.2.25) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.25)
- Persist underscore-prefixed middleware state fields across graph steps. (1.2.25) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.25)
- Fixed streaming types. (1.2.24) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.24)
- Fixed structured output on opus. (1.2.23) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.23)
- Subagent names are now propagated in metadata. (1.2.21) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.21)
- Supports concurrent dynamic prompts in agentNode. (1.2.20) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.20)
- Pregel keys are filtered from the cache key to avoid out-of-memory errors. (1.2.16) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.16)
- StateSchema is now supported in the middleware pipeline. (1.2.15) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.15)
- Middleware state parsing now correctly handles both Zod objects and LangGraph's StateSchema. (1.2.14) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.14)
- Graph interrupt errors are now bubbled up as-is. (1.2.12) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.12)
- Middleware errors use cause instead of concatenating the error, preserving the underlying cause. (1.2.10) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.10)
- createAgent state schemas now preserve reducer metadata. (1.2.8) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.8)
- Models now make only one write_todo call at a time. (1.2.7) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.7)
- The afterModel Router now uses parseJumpToTarget. (1.2.4) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.4)
- Message summarization now uses getBufferString, changing how messages are converted to summary input. (1.2.4) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.4)
- Summarization now preserves tool call and AIMessage pairings. (1.2.4) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.4)
- The schema title is now passed through properly. (1.2.4) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.4)
- Interop with Zod is improved. (1.2.4) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.4)
- Prevents functions from being accidentally assignable to AgentMiddleware. (1.1.6) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.1.6)
- Fixes patch prompts created from runs. (1.1.6) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.1.6)
- Structured output is now properly retrieved from a thinking block. (1.1.6) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.1.6)
- Uses summaryPrefix or falls back to the default prefix. (1.1.6) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.1.6)
- Invoke responses are detected better in agent nodes. (1.1.3) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.1.3)
- State rendering in LangSmith studio was improved. (1.1.3) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.1.3)
- Detection of models with native support for structured output was fixed. (1.1.3) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.1.3)
- AgentNode error handling behaviour was updated. (1.0.6) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.0.6)
- The toolEmulator middleware was improved. (1.0.5) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.0.5)

## langchain 0.3

### Security

- Fixes CVE 2025 12735. (0.3.58) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/0.3.58)

### Fixes and other changes

- Fixes the default temperature option for v0/anthropic. (0.3.58) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/0.3.58)
