# What changed in @langchain/core

> 119 changes in @langchain/core 1 from its official release notes, upgrade guides and advisories: 7 breaking, 1 deprecations, 6 security, 22 new APIs and options. Each one cited. Sources checked 2026-10-17. HTML: https://unstale.sh/npm/@langchain/core/

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

## @langchain/core 1

### Breaking changes

- Retry middleware respects retryability marks by default and stops retrying non-retryable errors; unclassified errors keep retrying as before. (1.2.8) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.8)
- Passing retryOn: () => true restores the old retry behavior. (1.2.8) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.8)
- Arrays are treated as message content blocks only when every element is an object with a type; other arrays are JSON-stringified. (1.2.1) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.1)
- Reverts adding all chat model and LLM invocation parameters to metadata. (1.1.37) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.37)
- fakeModel has moved from utils/testing to the testing namespace. (1.1.31) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.31)
- Adds createNamespace and the Namespace API for hierarchical symbol-based branding, enabling reliable cross-realm identity for class hierarchies. (1.1.25) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.25)
- When aborted during streaming with streaming callback handlers, invoke throws ModelAbortError with accumulated partialOutput. (1.1.18) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.18)

### Security

- Adds utilities for validating URLs against private IPs, cloud metadata endpoints, and localhost. (1.1.21) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.21)
- Hardens URL loading against SSRF attacks by validating safe URLs and comparing origins. (1.1.21) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.21)
- LangChain serialization injection vulnerability enables secret extraction (1.1.8) — [security advisory](https://github.com/advisories/GHSA-R399-636X-V7F6)
- Security hardening was added for load. (1.1.8) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.8)
- Various security fixes were made in community/core. (1.1.5) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.5)
- LangChain: RediSearch Filter Injection via Unescaped Tag/Text Values (1.1.1) — [security advisory](https://github.com/advisories/GHSA-5X6V-P487-7QH2)

### Deprecations

- Deprecated in favor of LangChainError subclasses. (1.1.25) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.25)

### New APIs and options

- Adds explicit agent address support, inherits project and address destinations together, and delegates default destination resolution to the LangSmith SDK. (1.2.18) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.18)
- Exposes a branded class type for provider declarations, making the type available to provider authors. (1.2.16) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.16)
- ModelProfile now includes fileMimeTypes so models can advertise accepted MIME types for generic file inputs; OpenAI Responses API models report the types supported by input_file, while Chat Completions profiles are unchanged. (1.2.14) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.14)
- Adds an exported function that reads an error's retryability mark and returns undefined when nobody classified it. (1.2.8) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.8)
- Models accept a per-call maxRetries value so a surrounding retry loop can take over. (1.2.8) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.8)
- Adds an exported function to mark an error as retryable or non-retryable without changing its class or shape. (1.2.8) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.8)
- OpenAI, Anthropic, and Fireworks chat models now support LangSmith Gateway environment configuration. (1.2.5) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.5)
- Adds conversion of stream events to an OpenAI-compatible format. (1.2.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.0)
- OpenRouter reasoning content is surfaced as standard reasoning content blocks alongside text and tool calls. (1.1.48) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.48)
- UUID utilities now export v6 generation support, including the upstream v1ToV6 helper. (1.1.47) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.47)
- Adds support for browser tools. (1.1.39) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.39)
- FakeBuiltModel is now exported for use with the fakeModel builder API. (1.1.32) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.32)
- Type inference is implemented for tool streams, allowing developers to infer types from streamed tool calls. (1.1.32) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.32)
- Adds standard schema support for structured output. (1.1.30) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.30)
- Runnable traces now include package version metadata in this.metadata.versions, making version information available in LangSmith trace metadata. (1.1.29) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.29)
- Tool calling supports asynchronous generators for streaming partial tool results. (1.1.28) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.28)
- Adds ContextOverflowError, raised for context overflow in Anthropic and OpenAI; includes a fromError() static factory method. (1.1.25) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.25)
- Adds a static factory method for creating a ContextOverflowError from an error. (1.1.25) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.25)
- Adds a base class that all LangChain errors extend. (1.1.25) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.25)
- Added an error class in @langchain/core/errors that contains partial output when a model invocation is aborted mid-stream. (1.1.18) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.18)
- FakeListChatModel now supports bindTools. (1.1.5) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.5)
- Adds extras to tools. (1.1.1) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.1)

### Performance

- Tool call chunks are collapsed lazily on first read of `tool_calls` or `invalid_tool_calls`, avoiding repeated parsing during streamed delta concatenation. (1.2.18) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.18)
- Caches Zod-to-JSON-Schema conversions in toJsonSchema(), avoiding repeated conversions. (1.1.37) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.37)

### Behavior and default changes

- Long tool-call IDs are abbreviated when chat messages are formatted as strings, while the original messages remain unchanged. (1.2.13) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.13)
- The v0 default replay path reuses response_metadata.output directly, preserving every reasoning item's id and encrypted_content in original order under Zero Data Retention. (1.2.11) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.11)
- A custom handler replaces the built-in handler and opts out of automatic retryability marking. (1.2.8) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.8)
- Retry middleware respects retryability marks by default and stops retrying non-retryable errors; unclassified errors keep retrying as before. (1.2.8) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.8)
- Traced metadata now includes chat model and LLM invocation parameters. (1.1.41) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.41)
- Tracer-scoped inheritable metadata and tag options are separated from runnable metadata; ensureConfig metadata mirroring is limited to model. (1.1.40) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.40)
- Adds LangSmith integration metadata to createAgent. (1.1.35) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.35)
- Adds LangSmith integration metadata to initChatModel. (1.1.35) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.35)
- All invocation parameters are included as part of metadata. (1.1.34) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.34)
- OpenAI image generation outputs are represented as proper image content blocks. (1.1.16) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.16)
- Tool call content returns compacted JSON. (1.1.16) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.16)
- Adds literal name type inference to tool(), improving type inference for tool names. (1.1.12) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.12)
- Run IDs are now generated with UUIDv7 instead of UUIDv4. (1.1.5) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.31), [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.5)
- Parsing now allows more partial JSON, which can affect how developers handle incomplete JSON output. (1.1.2) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.2)

### Tooling

- Exported Zod type references in the public API are replaced with minimal structural interfaces to prevent TypeScript OOMs and unresponsive language servers in monorepo setups. (1.1.35) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.35)
- Adds custom Vitest matchers for LangChain message and tool call assertions, registerable with expect.extend(langchainMatchers). (1.1.31) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.31)

### Fixes and other changes

- Runtime context is preserved in ambient runnable config across tool calls, nested runnables, and streaming. (1.2.17) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.17)
- Structured tool arguments are preserved in tracer run inputs. (1.2.12) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.12)
- OpenAI Responses API replay in v1 preserves every reasoning item's id and encrypted_content in original order under Zero Data Retention. (1.2.11) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.11)
- Streaming token usage is built from fully accumulated chunk metadata instead of being overwritten by the last chunk; this also populates llmOutput for @langchain/google invoke({streaming: true}). (1.2.11) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.11)
- BaseMessage.text now uses contentBlocks. (1.2.10) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.10)
- ChatVertexAI and ChatGoogle contentBlocks now include tool_call blocks from message.tool_calls and skip spurious empty text blocks. (1.2.9) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.9)
- The gateway now uses a unified endpoint. (1.2.8) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.8)
- Peer dependencies were updated for core and langchain, which may affect package compatibility. (1.2.7) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.7)
- Overrides Symbol.hasInstance to use the same logic as .isInstance() for comparable properties, avoiding conflicts when multiple versions of core are installed. (1.2.6) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.6)
- The mustache escape override is now passed per render call. (1.2.5) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.5)
- Nested tracer callbacks that share run bookkeeping are coalesced. (1.2.4) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.4)
- Binds splitText when trimMessages receives a TextSplitter instance. (1.2.4) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.4)
- Reasoning blocks are emitted in standard form with preserved signatures; incomplete signature-only reasoning is omitted during replay, while legacy and redacted reasoning remain compatible. (1.2.3) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.3)
- Coerces string content to text blocks when constructing an AIMessage with v1 output metadata, preventing contentBlocks.push errors. (1.2.2) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.2)
- Provider 429 errors are classified before retrying. (1.2.1) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.1)
- Preserves existing v1 contentBlocks when constructing AIMessage instances, preventing serialized messages from losing block content during deserialization. (1.2.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.2.0)
- CommonJS default re-exports are now callable. (1.1.48) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.48)
- Apply v1 message casting after implicit streaming aggregation. (1.1.47) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.47)
- Different content block types are kept separate when merging chunks. (1.1.46) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.46)
- Inheritance behavior for special keys in tracer metadata was updated. (1.1.41) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.41)
- createAgent now accepts cross-version runnable models. (1.1.38) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.38)
- Normalizes single-block content when merging content. (1.1.37) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.37)
- Surfaces Responses API message phase on text content blocks and supports round-tripping it through standard content paths. (1.1.37) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.37)
- Chained concat() calls no longer spread lc_kwargs into the new constructor, preventing nested duplication of system message content. (1.1.36) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.36)
- Streaming tool call deltas without an index now merge by id, preventing them from accumulating as separate entries in tool_call_chunks and additional_kwargs.tool_calls. (1.1.36) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.36)
- Preserves multimodal content as placeholders. (1.1.33) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.33)
- The timeout option is now respected in streamEvents v2. (1.1.33) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.33)
- Preserves thoughtSignature in array content when streaming with thinking models. (1.1.32) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.32)
- Empty string tool call chunk IDs are treated like null or undefined during merging, allowing old completions-style streaming chunks to merge by index. (1.1.32) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.32)
- An explicit symbol type annotation prevents TypeScript from inferring unique symbol, avoiding incompatibility when multiple package versions are present in a dependency tree. (1.1.30) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.30)
- Uses Symbol.for() and an explicit symbol type annotation for cross-realm compatibility and compatibility when multiple package versions are present. (1.1.30) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.30)
- Standard schema type guards now support callable schemas. (1.1.30) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.30)
- Added usage_metadata to AIMessage lc_aliases. (1.1.29) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.29)
- Content blocks are merged by string index during streaming. (1.1.28) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.28)
- Tool calls are now preserved when concatenating AIMessageChunks. (1.1.26) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.26)
- Supports reasoning/thinking blocks in parsed string output. (1.1.25) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.25)
- Fixes contentBlocks for file_search_call in the OpenAI Responses API. (1.1.24) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.24)
- Fixes contentBlocks for web_search_call in the OpenAI Responses API. (1.1.24) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.24)
- Empty text blocks are skipped in ChatOpenAI contentBlocks. (1.1.22) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.22)
- Avoids long-lived abort signals. (1.1.19) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.19)
- Provider implementations now check and propagate abort signals in both _generate() and _streamResponseChunks(). (1.1.18) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.18)
- Updated invoke, stream, generate, and generatePrompt signatures across Runnable, BaseChatModel, and BaseLLM to accept partial call options without TypeScript errors. (1.1.18) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.18)
- When aborted, stream throws a regular AbortError because chunks have already been yielded to the caller. (1.1.18) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.18)
- Reads error.status when response.status is absent, avoiding retries for OpenAI SDK 4xx errors. (1.1.16) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.16)
- When tracingEnabled is false, inherited LangChainTracer handlers are stripped so child runs do not produce traces. (1.1.16) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.29), [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.16)
- Fixes additional undefined and null errors. (1.1.16) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.16)
- Preserves index and timestamp fields when merging dictionaries. (1.1.15) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.15)
- JsonOutputParser now sources content from the text accessor. (1.1.13) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.13)
- Reasoning tokens are now properly elevated. (1.1.13) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.13)
- Serialization now allows shared object references. (1.1.11) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.11)
- Fixes an error when merging undefined values. (1.1.10) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.10)
- load now handles circular references. (1.1.9) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.9)
- Numeric values are now handled correctly by mergeDicts. (1.1.9) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.9)
- Message summarization now uses getBufferString. (1.1.9) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.9)
- Interop with Zod has been improved. (1.1.9) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.9)
- Ensures streaming test chat models respect AbortSignal. (1.1.6) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.6)
- Avoids writing to TransformStream when the underlying ReadableStream is closed. (1.1.6) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.6)
- Fixes an error when merging two undefined objects. (1.1.6) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.6)
- Graph Mermaid output handles subgraph nesting better. (1.1.5) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.5)
- The tracer handles missing parent runs to prevent LangSmith 400 errors. (1.1.5) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.5)
- MCP tool calls now preserve the timeout from RunnableConfig. (1.1.5) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.5)
- Nested objects in tool call arguments are now displayed properly instead of as [object Object]. (1.1.5) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.5)
- Uses toBase64Url instead of btoa for encoding Mermaid images. (1.1.3) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.3)
- Fixes tool chunk concatenation behavior. (1.1.3) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.3)
- Uses a dynamic import for p-retry to support CommonJS environments. (1.1.1) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/core%401.1.1)
