NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #4362 most downloaded on npm
Core LangChain.js abstractions and schemas
Last release 5 days ago
01 Oct 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
355 releases · first in 2023
### Patch Changes - #11771 `bbed273` Thanks @thushanth-bengre-langchain! - Add fileMimeTypes to ModelProfile so models can advertise the MIME types th
bbed273 Thanks @thushanth-bengre-langchain! - Add fileMimeTypes to ModelProfile so models can advertise the MIME types they accept as generic file inputs. OpenAI Responses API models now report the file types input_file supports;
Chat Completions profiles are unchanged.### Patch Changes - #11714 `a83dfb1` Thanks @ccurme! - Abbreviate long tool-call IDs when formatting chat messages as strings, keeping original messag
One column per month.
Patch Changes #11675 030a726 Thanks @hntrl ! - Preserve structured tool arguments in tracer run inputs.
Affects both core streaming paths — .stream()/.streamEvents() (_streamIterator) and .invoke()/.generate() when a streaming-preferring callback is atta
#11603 fec9cd8 Thanks @thushanth-bengre-langchain! - fix(core): build streaming llmOutput.tokenUsage from the fully-accumulated chunk instead of whichever individual chunk's usage_metadata arrived last
Affects both core streaming paths — .stream()/.streamEvents() (_streamIterator) and .invoke()/.generate() when a streaming-preferring callback is attached (_generateWithCache's hasStreamingHandler branch). Previously, llmOutput.tokenUsage was overwritten by each chunk in turn, so only the last chunk carrying usage_metadata won — correct for providers that emit one cumulative total on a final chunk, but wrong for providers (e.g. @langchain/google, @langchain/anthropic) that emit usage_metadata as a per-chunk delta across multiple chunks, where the values must be summed.
Note for provider authors: this assumes each streamed chunk's usage_metadata is either a per-chunk delta or appears only on a single final chunk. A provider that instead repeats a cumulative total on every chunk will now see it summed (and inflated) in llmOutput.tokenUsage, matching the existing behavior of the correctly-working message.usage_metadata field.
Also fixes @langchain/google's invoke({streaming: true}) path (no streaming-preferring callback attached), where llmOutput was never populated at all.
#11590 ffebdc2 Thanks @thushanth-bengre-langchain! - Fix OpenAI Responses API replay under Zero Data Retention when a response contains more than one reasoning item, for both v0 and v1. In v0, the default replay path now reuses response_metadata.output directly, preserving every reasoning item's id/encrypted_content in original order. In v1, AIMessage.contentBlocks (outputVersion: "v1") is fixed the same way. additional_kwargs.reasoning is unchanged.
### Patch Changes - #10047 `ff1248f` Thanks @afirstenberg! - fix(core): BaseMessage.text use contentBlocks
ff1248f Thanks @afirstenberg! - fix(core): BaseMessage.text use contentBlocks### Patch Changes - #11402 `43e4396` Thanks @thushanth-bengre-langchain! - Fix ChatVertexAI/ChatGoogle content blocks: include tool_call blocks from m
43e4396 Thanks @thushanth-bengre-langchain! - Fix ChatVertexAI/ChatGoogle content blocks: include tool_call blocks from message.tool_calls and skip spurious empty text blocks in contentBlocks.Retry middleware retried every failure up to maxRetries, including deterministic ones like a bad API key or an unknown model. Retries also nest, so a
#11369 d6ad973 Thanks @hntrl! - fix(langchain): use unified endpoint for gateway
#11342 3b0e4c4 Thanks @thushanth-bengre-langchain! - feat(core): mark errors as retryable or not, and stop retrying the ones that aren't
Retry middleware retried every failure up to maxRetries, including deterministic ones like a bad API key or an unknown model. Retries also nest, so a single such failure could cost dozens of API calls.
@langchain/core/errors adds stampRetryable(error, retryable) and getRetryable(error). Marking an error leaves its class and shape untouched, so a provider SDK error can be classified without breaking instanceof. getRetryable returns undefined for errors nobody classified, and both are exported so tool authors can mark their own failures.
modelRetryMiddleware and toolRetryMiddleware now respect the mark by default, and retries stop as soon as one is found rather than each layer spending its own budget. Aborted calls, context overflow, and oversized payloads are marked non-retryable out of the box.
Models accept a per-call maxRetries so a surrounding retry loop can take over.
Behavior change: errors marked non-retryable now fail on the first attempt. Unclassified errors — including any from third-party integrations or custom tools — retry exactly as before. Pass retryOn: () => true to restore the old default. A custom onFailedAttempt replaces the built-in handler and opts out of marking.
### Patch Changes - #11366 `c068bbf` Thanks @hntrl! - fix(core,langchain): patch and release core, update peer dependencies
We have some internal schemas that rely on z.instanceof(). This uses a strict instanceof check which can conflict if there are multiple versions of co
#11344 f08e0c6 Thanks @hntrl! - fix: apply [Symbol.hasInstance] method to all comparable properties using .isInstance()
We have some internal schemas that rely on z.instanceof(). This uses a strict instanceof check which can conflict if there are multiple versions of core installed. This overrides the Symbol.hasInstance method to use the same logic as .isInstance() to compare objects at runtime.
### Patch Changes - #11305 `e654022` Thanks @jacoblee93! - Add LangSmith Gateway environment configuration to OpenAI, Anthropic, and Fireworks chat mo
#11305 e654022 Thanks @jacoblee93! - Add LangSmith Gateway environment configuration to OpenAI, Anthropic, and Fireworks chat models.
#11295 1a1b347 Thanks @vladislav-nechakhin! - fix(core): pass the mustache escape override per render call
### Patch Changes - #11190 `9654bde` Thanks @pawel-twardziak! - Coalesce nested LangChain tracer callbacks that share run bookkeeping. - #11153 `84ce6
#11190 9654bde Thanks @pawel-twardziak! - Coalesce nested LangChain tracer callbacks that share run bookkeeping.
#11153 84ce6d6 Thanks @parveshsaini! - fix(core): bind splitText when trimMessages receives a TextSplitter instance
Emit standard reasoning blocks with preserved signatures, omit incomplete signature-only reasoning during replay, and retain compatibility with legacy
Prevent contentBlocks.push is not a function when constructing an AIMessage with response_metadata.output_version === "v1" and string content (common
#11171 82bef01 Thanks @christian-bromann! - fix(core): coerce string v1 AIMessage content to text blocks
Prevent contentBlocks.push is not a function when constructing an
AIMessage with response_metadata.output_version === "v1" and string
content (common in serialized LangGraph stream payloads).
Fix tool outputs that are arrays of plain objects being forwarded as malformed message content. An array is now only treated as message content blocks
#10674 f017708 Thanks @christian-bromann! - fix: classify provider 429s before retrying
#11092 7918bbd Thanks @aolsenjazz! - fix(core): only treat arrays of content blocks as ToolMessage content
Fix tool outputs that are arrays of plain objects being forwarded as malformed message content. An array is now only treated as message content blocks when every element is an object with a type; otherwise it is JSON-stringified.
### Minor Changes - #10924 `2e28115` Thanks @christian-bromann! - feat(mistralai): add native streamEvents event conversion
2e28115 Thanks @christian-bromann! - feat(mistralai): add native streamEvents event conversion2e28115 Thanks @christian-bromann! - feat(core): add OpenAI-compatible stream event conversion#11047 ac0f71d Thanks @christian-bromann! - fix(core): preserve AIMessage content blocks
Keep existing v1 contentBlocks when constructing AIMessage instances so serialized messages do not lose block content during deserialization.
66effb0 Thanks @dependabot! - chore(deps): bump groq-sdk from 0.37.0 to 1.1.2Nothing published for this version
Nothing published for this version
Nothing published for this version
Remove unnecessary TStructure generic from RemoveMessage — its content is always [], so the type parameter only caused incompatibilities when passing
#10679 1f7b495 Thanks @hnustwjj! - fix(core): make RemoveMessage type-compatible across MessageStructure variants
Remove unnecessary TStructure generic from RemoveMessage — its content is always [], so the type parameter only caused incompatibilities when passing RemoveMessage into APIs expecting a different MessageStructure (e.g. @langchain/langgraph-sdk's Message<DefaultToolCall>). Also add { type: "remove"; id: string } to BaseMessageLike so the serialized format is accepted by TypeScript, matching the existing runtime behavior in coerceMessageLikeToMessage.
Nothing published for this version
Nothing published for this version
convertOpenRouterResponseToBaseMessage and convertOpenRouterDeltaToBaseMessageChunk now copy OpenRouter's reasoning (flat string) and reasoning_detail
#10832 1b24369 Thanks @info-arnav! - fix(core, openrouter): make CJS default re-exports callable
#10666 2bb55b0 Thanks @hnustwjj! - feat(openrouter): surface reasoning content as v1 standard content blocks
convertOpenRouterResponseToBaseMessage and
convertOpenRouterDeltaToBaseMessageChunk now copy OpenRouter's
reasoning (flat string) and reasoning_details (structured array) fields
onto additional_kwargs.reasoning_content / additional_kwargs.reasoning_details.
A new ChatOpenRouterTranslator is registered in @langchain/core under
the "openrouter" provider key so AIMessage.contentBlocks emits standard
{type: "reasoning"} blocks alongside text and tool calls.
Previously, reasoning text returned by reasoning-capable models routed
through OpenRouter (DeepSeek R1, Minimax M2, Claude extended thinking,
o-series, etc.) was silently dropped: only the reasoning_tokens count
was preserved via usage_metadata. Consumers using standard content blocks
(including the frontend agent UI patterns shown in the docs) could not
display the model's chain of thought.
#10918 3999fab Thanks @christian-bromann! - fix(openai): stream custom tool calls through Responses API chunks
Add v6 UUID generation support to @langchain/core/utils/uuid by vendoring the upstream uuidjs v6 implementation and its v1ToV6 helper, exporting v6 fr
#10906 f61b345 Thanks @hntrl! - feat(core): add uuid v6 utility support
Add v6 UUID generation support to @langchain/core/utils/uuid by vendoring the upstream uuidjs v6 implementation and its v1ToV6 helper, exporting v6 from the UUID utils index, and adding tests for deterministic generation, buffer/offset behavior, validation/versioning, and ordering.
#10872 a640079 Thanks @hntrl! - chore(deps): remove redundant @types/uuid declarations
Remove @types/uuid from package manifests that rely on @langchain/core/utils/uuid or do not require uuid type stubs directly, and refresh the lockfile entries accordingly.
#10792 3682268 Thanks @Genmin! - fix(core): apply v1 message casting after implicit streaming aggregation
#10901 f26fc4a Thanks @christian-bromann! - fix(testing): share fakeModel invocation state across bindTools instances
Remove direct runtime dependencies on ansi-styles, camelcase, and decamelize by inlining equivalent logic in core internals, and enable npm provenance
#10847 1659e7d Thanks @hntrl! - chore(core): reduce transitive dependency exposure and tighten release hygiene
Remove direct runtime dependencies on ansi-styles, camelcase, and decamelize
by inlining equivalent logic in core internals, and enable npm provenance in the
release workflow.
#10790 ef78bc6 Thanks @Genmin! - fix(core): keep different content block types separate when merging chunks
### Patch Changes - #10833 `6cf39fe` Thanks @colifran! - chore(core): deprecate streamLog, streamEvents v1, RunnableWithMessageHistory and improve thr
### Patch Changes - #10822 `922a040` Thanks @christian-bromann! - fix(core): translate content block delta for other models
922a040 Thanks @christian-bromann! - fix(core): translate content block delta for other modelsEnsure structured output parsers read BaseMessage text content when includeRaw: true, so responses that include reasoning/thought blocks plus JSON tex
#10814 dfec1b7 Thanks @hntrl! - fix(google): restore structured output parsing with includeRaw and reasoning blocks
Ensure structured output parsers read BaseMessage text content when includeRaw: true, so responses that include reasoning/thought blocks plus JSON text continue to parse correctly.
#10772 1ba7131 Thanks @christian-bromann! - chore(core): new stream primitives
Nothing published for this version
### Patch Changes - #10776 `20a9abe` Thanks @hntrl! - fix(deps): remediate uuid vulnerability by removing direct uuid usage
### Patch Changes - #10733 `589f29c` Thanks @jacoblee93! - fix(core): Update inheritance behavior for tracer metadata for special keys - #10711 `2e9e6
#10733 589f29c Thanks @jacoblee93! - fix(core): Update inheritance behavior for tracer metadata for special keys
#10711 2e9e696 Thanks @jacoblee93! - feat(core): Add chat model and llm invocation params to traced metadata
Add tracer-scoped inheritable metadata/tag options in callback manager while keeping backward-compatible aliases.
d3e0809 Thanks @hntrl! - refactor(core): decouple tracer-only metadata defaults from runnable metadata
ensureConfig metadata mirroring limited to model.LangChainTracer default metadata/tag handling and add regression tests for stream events metadata behavior.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
### Patch Changes - #10430 `d3d0922` Thanks @christian-bromann! - feat(langchain): support for browser tools
d3d0922 Thanks @christian-bromann! - feat(langchain): support for browser toolsNothing published for this version
### Patch Changes - #10552 `589ab9b` Thanks @christian-bromann! - fix(langchain): accept cross-version runnable models in createAgent
589ab9b Thanks @christian-bromann! - fix(langchain): accept cross-version runnable models in createAgentExtract phase from message output items and surface it on text content blocks
#10511 6933769 Thanks @hntrl! - cache Zod-to-JSON-Schema conversions in toJsonSchema()
#10541 50d5f32 Thanks @jacoblee93! - revert: Revert "feat(core): Add all chat model/llm invocation params to metadata"
#10509 5552999 Thanks @hntrl! - feat(openai): add support for phase parameter on Responses API messages
phase from message output items and surface it on text content blocksresponse.output_item.added eventsextras dict in the core standard content translator#10528 8331833 Thanks @christian-bromann! - fix(core): normalize single-block content in mergeContent
_mergeLists now falls back to id-based matching when items don't have an index field. Previously, providers routing through the OpenAI-compatible API
#10512 bbbfea1 Thanks @hntrl! - fix(core): fix streaming chunk merge for providers without index on tool call deltas
_mergeLists now falls back to id-based matching when items don't have an index field. Previously, providers routing through the OpenAI-compatible API without index on streaming tool call deltas (e.g. Anthropic models via ChatOpenAI) would accumulate hundreds of individual raw deltas in tool_call_chunks and additional_kwargs.tool_calls instead of merging them into a single entry per tool call. In a real trace with 3 concurrent subagents, this caused a single AI message to balloon from ~4KB to 146KB -- with 826 uncollapsed streaming fragments carrying a few bytes each.
Also fixes SystemMessage.concat() which used ...this to spread all instance properties (including lc_kwargs) into the new constructor, causing each chained concat() call to nest one level deeper. After 7 middleware concat() calls (typical in deepagents), a 7KB system prompt would serialize to 81KB due to content being duplicated at every nesting level.
Replaces all exported Zod type references (z3.ZodType, z4.$ZodType, etc.) in @langchain/core's public API with minimal structural ("duck-type") interf
#10327 5dc11b5 Thanks @hntrl! - fix(core): replace exported zod type references with structural duck-type interfaces to fix TypeScript OOM
Replaces all exported Zod type references (z3.ZodType, z4.$ZodType, etc.) in @langchain/core's public API with minimal structural ("duck-type") interfaces. This prevents TypeScript from performing expensive deep structural comparisons (~3,400+ lines of mutually recursive generics) when downstream packages resolve a different Zod version than @langchain/core, which was causing OOM crashes and unresponsive language servers in monorepo setups.
#10433 7af0b65 Thanks @tanushree-sharma! - feat: Add LangSmith integration metadata to createAgent and initChatModel
### Patch Changes - #10312 `bfb7944` Thanks @jacoblee93! - feat(core): Add all invocation params as part of metadata
bfb7944 Thanks @jacoblee93! - feat(core): Add all invocation params as part of metadata### Patch Changes - #10412 `6db417b` Thanks @pawel-twardziak! - fix(core): respect timeout option in streamEvents v2 - #10424 `d69dfcc` Thanks @pawel-
#10412 6db417b Thanks @pawel-twardziak! - fix(core): respect timeout option in streamEvents v2
#10424 d69dfcc Thanks @pawel-twardziak! - fix(core): preserve multimodal content in getBufferString as placeholders
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fixed _mergeLists in message base to treat empty string "" IDs the same as null/undefined when merging tool call chunks. This fixes old completions-st
#10330 26488b5 Thanks @hntrl! - fix(core): treat empty string tool call chunk IDs as missing during merge
Fixed _mergeLists in message base to treat empty string "" IDs the same as null/undefined when merging tool call chunks. This fixes old completions-style streaming where follow-up chunks carry id: "" instead of undefined, which previously prevented chunks from being merged by index.
#10167 ca826f6 Thanks @colifran! - feat: implement type inference for tool streams
#10334 a602c42 Thanks @maahir30! - fix(core): add JSDoc docstrings to fakeModel builder API and export FakeBuiltModel
#10254 db7d017 Thanks @pawel-twardziak! - fix(core): preserve thoughtSignature in array content during streaming with thinking models
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →