unstale

npm / @langchain/core

@langchain/core

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

7 breaking6 security1 deprecations22 new APIs and options2 performance14 behavior and defaults2 tooling65 fixes and other

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

npx @unstale/cli init

@unstale/cli 0.1.1 on npm

@langchain/core 1119 changes

Breaking changes 7

  • Retry middleware respects retryability marks by default and stops retrying non-retryable errors; unclassified errors keep retrying as before.

    1.2.8release notes

  • Passing retryOn: () => true restores the old retry behavior.

    1.2.8release notes

  • Arrays are treated as message content blocks only when every element is an object with a type; other arrays are JSON-stringified.

    1.2.1release notes

  • Reverts adding all chat model and LLM invocation parameters to metadata.

    1.1.37release notes

  • fakeModel has moved from utils/testing to the testing namespace.

    1.1.31release notes

  • Adds createNamespace and the Namespace API for hierarchical symbol-based branding, enabling reliable cross-realm identity for class hierarchies.

    1.1.25release notes

  • When aborted during streaming with streaming callback handlers, invoke throws ModelAbortError with accumulated partialOutput.

    1.1.18release notes

Security 6

  • Adds utilities for validating URLs against private IPs, cloud metadata endpoints, and localhost.

    1.1.21release notes

  • Hardens URL loading against SSRF attacks by validating safe URLs and comparing origins.

    1.1.21release notes

  • LangChain serialization injection vulnerability enables secret extraction

    1.1.8security advisory

  • Security hardening was added for load.

    1.1.8release notes

  • Various security fixes were made in community/core.

    1.1.5release notes

  • LangChain: RediSearch Filter Injection via Unescaped Tag/Text Values

    1.1.1security advisory

Deprecations 1

  • Deprecated in favor of LangChainError subclasses.

    1.1.25release notes

New APIs and options 22

  • Adds explicit agent address support, inherits project and address destinations together, and delegates default destination resolution to the LangSmith SDK.

    1.2.18release notes

  • Exposes a branded class type for provider declarations, making the type available to provider authors.

    1.2.16release notes

  • 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.14release notes

  • Adds an exported function that reads an error's retryability mark and returns undefined when nobody classified it.

    1.2.8release notes

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

    1.2.8release notes

  • Adds an exported function to mark an error as retryable or non-retryable without changing its class or shape.

    1.2.8release notes

  • OpenAI, Anthropic, and Fireworks chat models now support LangSmith Gateway environment configuration.

    1.2.5release notes

  • Adds conversion of stream events to an OpenAI-compatible format.

    1.2.0release notes

  • OpenRouter reasoning content is surfaced as standard reasoning content blocks alongside text and tool calls.

    1.1.48release notes

  • UUID utilities now export v6 generation support, including the upstream v1ToV6 helper.

    1.1.47release notes

  • Adds support for browser tools.

    1.1.39release notes

  • FakeBuiltModel is now exported for use with the fakeModel builder API.

    1.1.32release notes

  • Type inference is implemented for tool streams, allowing developers to infer types from streamed tool calls.

    1.1.32release notes

  • Adds standard schema support for structured output.

    1.1.30release notes

  • Runnable traces now include package version metadata in this.metadata.versions, making version information available in LangSmith trace metadata.

    1.1.29release notes

  • Tool calling supports asynchronous generators for streaming partial tool results.

    1.1.28release notes

  • Adds ContextOverflowError, raised for context overflow in Anthropic and OpenAI; includes a fromError() static factory method.

    1.1.25release notes

  • Adds a static factory method for creating a ContextOverflowError from an error.

    1.1.25release notes

  • Adds a base class that all LangChain errors extend.

    1.1.25release notes

  • Added an error class in @langchain/core/errors that contains partial output when a model invocation is aborted mid-stream.

    1.1.18release notes

  • FakeListChatModel now supports bindTools.

    1.1.5release notes

  • Adds extras to tools.

    1.1.1release notes

Performance 2

  • 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.18release notes

  • Caches Zod-to-JSON-Schema conversions in toJsonSchema(), avoiding repeated conversions.

    1.1.37release notes

Behavior and default changes 14

  • Long tool-call IDs are abbreviated when chat messages are formatted as strings, while the original messages remain unchanged.

    1.2.13release notes

  • 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.11release notes

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

    1.2.8release notes

  • Retry middleware respects retryability marks by default and stops retrying non-retryable errors; unclassified errors keep retrying as before.

    1.2.8release notes

  • Traced metadata now includes chat model and LLM invocation parameters.

    1.1.41release notes

  • Tracer-scoped inheritable metadata and tag options are separated from runnable metadata; ensureConfig metadata mirroring is limited to model.

    1.1.40release notes

  • Adds LangSmith integration metadata to createAgent.

    1.1.35release notes

  • Adds LangSmith integration metadata to initChatModel.

    1.1.35release notes

  • All invocation parameters are included as part of metadata.

    1.1.34release notes

  • OpenAI image generation outputs are represented as proper image content blocks.

    1.1.16release notes

  • Tool call content returns compacted JSON.

    1.1.16release notes

  • Adds literal name type inference to tool(), improving type inference for tool names.

    1.1.12release notes

  • Run IDs are now generated with UUIDv7 instead of UUIDv4.

    1.1.5release notesrelease notes

  • Parsing now allows more partial JSON, which can affect how developers handle incomplete JSON output.

    1.1.2release notes

Tooling 2

  • 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.35release notes

  • Adds custom Vitest matchers for LangChain message and tool call assertions, registerable with expect.extend(langchainMatchers).

    1.1.31release notes

Fixes and other changes 65

  • Runtime context is preserved in ambient runnable config across tool calls, nested runnables, and streaming.

    1.2.17release notes

  • Structured tool arguments are preserved in tracer run inputs.

    1.2.12release notes

  • OpenAI Responses API replay in v1 preserves every reasoning item's id and encrypted_content in original order under Zero Data Retention.

    1.2.11release notes

  • 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.11release notes

  • BaseMessage.text now uses contentBlocks.

    1.2.10release notes

  • ChatVertexAI and ChatGoogle contentBlocks now include tool_call blocks from message.tool_calls and skip spurious empty text blocks.

    1.2.9release notes

  • The gateway now uses a unified endpoint.

    1.2.8release notes

  • Peer dependencies were updated for core and langchain, which may affect package compatibility.

    1.2.7release notes

  • Overrides Symbol.hasInstance to use the same logic as .isInstance() for comparable properties, avoiding conflicts when multiple versions of core are installed.

    1.2.6release notes

  • The mustache escape override is now passed per render call.

    1.2.5release notes

  • Nested tracer callbacks that share run bookkeeping are coalesced.

    1.2.4release notes

  • Binds splitText when trimMessages receives a TextSplitter instance.

    1.2.4release notes

  • 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.3release notes

  • Coerces string content to text blocks when constructing an AIMessage with v1 output metadata, preventing contentBlocks.push errors.

    1.2.2release notes

  • Provider 429 errors are classified before retrying.

    1.2.1release notes

  • Preserves existing v1 contentBlocks when constructing AIMessage instances, preventing serialized messages from losing block content during deserialization.

    1.2.0release notes

  • CommonJS default re-exports are now callable.

    1.1.48release notes

  • Apply v1 message casting after implicit streaming aggregation.

    1.1.47release notes

  • Different content block types are kept separate when merging chunks.

    1.1.46release notes

  • Inheritance behavior for special keys in tracer metadata was updated.

    1.1.41release notes

  • createAgent now accepts cross-version runnable models.

    1.1.38release notes

  • Normalizes single-block content when merging content.

    1.1.37release notes

  • Surfaces Responses API message phase on text content blocks and supports round-tripping it through standard content paths.

    1.1.37release notes

  • Chained concat() calls no longer spread lc_kwargs into the new constructor, preventing nested duplication of system message content.

    1.1.36release notes

  • 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.36release notes

  • Preserves multimodal content as placeholders.

    1.1.33release notes

  • The timeout option is now respected in streamEvents v2.

    1.1.33release notes

  • Preserves thoughtSignature in array content when streaming with thinking models.

    1.1.32release notes

  • 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.32release notes

  • 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.30release notes

  • Uses Symbol.for() and an explicit symbol type annotation for cross-realm compatibility and compatibility when multiple package versions are present.

    1.1.30release notes

  • Standard schema type guards now support callable schemas.

    1.1.30release notes

  • Added usage_metadata to AIMessage lc_aliases.

    1.1.29release notes

  • Content blocks are merged by string index during streaming.

    1.1.28release notes

  • Tool calls are now preserved when concatenating AIMessageChunks.

    1.1.26release notes

  • Supports reasoning/thinking blocks in parsed string output.

    1.1.25release notes

  • Fixes contentBlocks for file_search_call in the OpenAI Responses API.

    1.1.24release notes

  • Fixes contentBlocks for web_search_call in the OpenAI Responses API.

    1.1.24release notes

  • Empty text blocks are skipped in ChatOpenAI contentBlocks.

    1.1.22release notes

  • Avoids long-lived abort signals.

    1.1.19release notes

  • Provider implementations now check and propagate abort signals in both _generate() and _streamResponseChunks().

    1.1.18release notes

  • Updated invoke, stream, generate, and generatePrompt signatures across Runnable, BaseChatModel, and BaseLLM to accept partial call options without TypeScript errors.

    1.1.18release notes

  • When aborted, stream throws a regular AbortError because chunks have already been yielded to the caller.

    1.1.18release notes

  • Reads error.status when response.status is absent, avoiding retries for OpenAI SDK 4xx errors.

    1.1.16release notes

  • When tracingEnabled is false, inherited LangChainTracer handlers are stripped so child runs do not produce traces.

    1.1.16release notesrelease notes

  • Fixes additional undefined and null errors.

    1.1.16release notes

  • Preserves index and timestamp fields when merging dictionaries.

    1.1.15release notes

  • JsonOutputParser now sources content from the text accessor.

    1.1.13release notes

  • Reasoning tokens are now properly elevated.

    1.1.13release notes

  • Serialization now allows shared object references.

    1.1.11release notes

  • Fixes an error when merging undefined values.

    1.1.10release notes

  • load now handles circular references.

    1.1.9release notes

  • Numeric values are now handled correctly by mergeDicts.

    1.1.9release notes

  • Message summarization now uses getBufferString.

    1.1.9release notes

  • Interop with Zod has been improved.

    1.1.9release notes

  • Ensures streaming test chat models respect AbortSignal.

    1.1.6release notes

  • Avoids writing to TransformStream when the underlying ReadableStream is closed.

    1.1.6release notes

  • Fixes an error when merging two undefined objects.

    1.1.6release notes

  • Graph Mermaid output handles subgraph nesting better.

    1.1.5release notes

  • The tracer handles missing parent runs to prevent LangSmith 400 errors.

    1.1.5release notes

  • MCP tool calls now preserve the timeout from RunnableConfig.

    1.1.5release notes

  • Nested objects in tool call arguments are now displayed properly instead of as [object Object].

    1.1.5release notes

  • Uses toBase64Url instead of btoa for encoding Mermaid images.

    1.1.3release notes

  • Fixes tool chunk concatenation behavior.

    1.1.3release notes

  • Uses a dynamic import for p-retry to support CommonJS environments.

    1.1.1release notes