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
Latest stable
1.4.2
Last release 4 days ago
18 Nov 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
371 releases · first in 2023
Drag across the ruler to compare, or tap a release to open it.
Updated dependencies [`e92e44d`]:
e92e44d]:
Updated dependencies [`a7c960f`]:
a7c960f]:
Updated dependencies [`0c268f5`, `8103487`]:
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Nothing published for this version
Nothing published for this version
Updated dependencies [`b5135cc`]:
b5135cc]:
Updated dependencies [`95b191b`]:
95b191b]:
Updated dependencies [`2caf64d`]:
2caf64d]:
Updated dependencies [`d71c542`]:
d71c542]:
Nothing published for this version
Updated dependencies [`4109812`, `4109812`]:
Updated dependencies [`bbed273`]:
bbed273]:
#12263 7f1c5e1 Thanks @thushanth-bengre-langchain! - Add gemini-4-neon model profile and xhigh thinking level support.
#12243 c93f9bc Thanks @afirstenberg! - Adds experimental support for the Google Gemini Decisions API on AI
Studio. (Google Cloud / Vertex support has been added, but final support is
pending platform implementation.)
GoogleClassifier and BaseGoogleClassifier (implementing BaseDecisionModel from @langchain/core/decisions) in @langchain/google and @langchain/google/nodeNoul, Choice, and Score questions across text, structured JSON, BaseMessage conversations, and multimodal ContentBlock inputsPromptRefusedError safety refusalsIncorporates the most recent changes to the Interactions API as well,
including the removal of the Retrieval tools.
Updated dependencies [`663b9a2`, `5d509ad`]:
#12219 bef937b Thanks @afirstenberg! - - Add gemini-4-hydrogen model profile.
xhigh (XHIGH) thinking level (clamping to HIGH on modelsXHIGH and passing through future thinking levels on level-based models).#12189 571a1b4 Thanks @hntrl! - fix(google): add Gemini 4 Carbon model capability profile
Blocked prompts throw PromptRefusedError, which matches ModelRefusalError.isInstance, including when streaming. A streamed safety stop keeps the text
#12122 e92e44d Thanks @thushanth-bengre-langchain! - fix(google): surface model refusals as ModelRefusalError
Blocked prompts throw PromptRefusedError, which matches ModelRefusalError.isInstance, including when streaming. A streamed safety stop keeps the text already streamed and ends with a refusal block, and refusal blocks are dropped when history is sent back.
Updated dependencies [`ffebdc2`]:
ffebdc2]:
9ec213b Thanks @afirstenberg! - Adds experimental support for the Google Interactions API on AI Studio and
Google Cloud (Vertex).
InteractionsApiHandler (apiHandler: "interactions") supporting .invoke(), .stream(), and .streamEvents() across AI Studio (gai) and Vertex AI (gcp)src/chat_models/api_types/interactions.ts)GoogleChatApiHandler, GenerateContentApiHandler, InteractionsApiHandler, and Interactions converters#12141 4585842 Thanks @hntrl! - Only route Google chat models through the LangSmith gateway when no credentials are passed. Explicit apiKey, authOptions, credentials, or googleAuthOptions now go straight to Google.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Updated dependencies [`6bd3a18`, `7d6e1b0`, `80c5c93`]:
#11968 84eca2b Thanks @afirstenberg! - refactoring in preparation for Interactions API
GoogleChatApiHandler
subclassUpdated dependencies [`53dbfc2`]:
53dbfc2]:
Updated dependencies [`c26c87e`]:
c26c87e]:
Updated dependencies [`5c9fdf2`, `fe8eec1`, `5c9fdf2`]:
241a046 Thanks @thushanth-bengre-langchain! - fix(google): send thinkingLevel LOW instead of MINIMAL to Gemini 3 models that reject MINIMAL (e.g. gemini-3.7-flash, gemini-3.8-flash), so thinkingBudget: 0 and reasoningEffort: "minimal" no longer 400Updated dependencies [`3b0e4c4`]:
3b0e4c4]:
#11342 3b0e4c4 Thanks @thushanth-bengre-langchain! - fix(fireworks): stop retrying deterministic embeddings failures
FireworksEmbeddings threw errors with the HTTP status buried in the message text, so nothing downstream could act on it and a bad API key was retried to exhaustion on every embed call. The status is now available on the error, and failures are marked retryable or not using stampRetryable from @langchain/core. Error messages are unchanged.
ChatFireworks and Fireworks already inherit marking from @langchain/openai.
Also forwards a per-call maxRetries to the retry loop, so a surrounding retry loop such as modelRetryMiddleware can take over instead of the two multiplying against each other.
The @langchain/core peer range moves from ^1.0.0 to workspace:^, since this release depends on stampRetryable.
Updated dependencies [3b0e4c4]:
#11641 12626c2 Thanks @ccurme! - Add LANGSMITH_GATEWAY direct routing for Bedrock Converse and Vertex AI chat models.
#11680 29caa17 Thanks @jackjin1997! - Fix service account authentication on the Node client. NodeApiClient.fetch interpolated the unresolved access token promise, sending Bearer [object Promise], and the JWT it exchanges carried no scope claim, which Google requires on the assertion for an access token request. Credentials supplied through GOOGLE_CLOUD_CREDENTIALS now reach Vertex AI instead of failing with invalid credentials and then an invalid scope error.
Updated dependencies [`3fe4c43`]:
3fe4c43]:
16c5a5e Thanks @jackjin1997! - Configure the required OAuth scopes when the Node.js client falls back to Application Default Credentials.Updated dependencies [`e654022`]:
e654022]:
#11305 e654022 Thanks @jacoblee93! - Add LangSmith Gateway environment configuration to OpenAI, Anthropic, and Fireworks chat models.
Updated dependencies [e654022]:
#11433 bc88b75 Thanks @jackjin1997! - Fix Vertex AI endpoint routing for multi-region locations such as eu and us.
#11606 194a063 Thanks @thushanth-bengre-langchain! - fix: allowlist JSON Schema keywords for Gemini function/response schemas instead of denylisting, fixing propertyNames/exclusiveMinimum/etc. 400s (#8584)
#11611 c9ae847 Thanks @thushanth-bengre-langchain! - fix(google): set toolConfig.includeServerSideToolInvocations when mixing built-in and function-declaration tools, which Gemini otherwise rejects with a 400
#11616 35368db Thanks @thushanth-bengre-langchain! - fix(google): surface groundingMetadata/groundingSupport/citationMetadata on .stream() and .streamEvents(), matching what .invoke() already returns
#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.
#11602 78b2923 Thanks @thushanth-bengre-langchain! - fix(google): preserve tool call id and thoughtSignature in native stream events
Preserves tool call id and Gemini's thoughtSignature through @langchain/google's native streamEvents() path.
Updated dependencies [`a9f123a`, `09e7f6d`]:
#10047 ff1248f Thanks @afirstenberg! - fix(core): BaseMessage.text use contentBlocks
#11574 5c89094 Thanks @afirstenberg! - This addresses four specific issues:
It does so by, largely, keeping the existing logic converting from LangChain representation to a Google.Part in both the v0 (legacy) and v1 (standard) paths intact. (This is done in both in the messages.ts file.)
The last point is done because Gemini can attach "thought" or "thoughtSignature" to any block type. Not just text.
Updated dependencies [`988ca7d`]:
988ca7d]:
#11426 2e865ea Thanks @thushanth-bengre-langchain! - fix: keep image/audio/video content in ToolMessages as sibling Gemini parts instead of losing it inside functionResponse.response.result JSON, and stop double-stringifying non-string tool results (#10297, #10439)
#11477 9a0f244 Thanks @hntrl! - Fix convertMessagesToGeminiContents merging a ToolMessage (functionResponse)
with a following HumanMessage (text) into one user content. Both map to the
user role, and Vertex/Gemini rejects a single user content that mixes a
functionResponse with text, so a tool result followed by a user message would
fail with a 400. Merging is now limited to runs of adjacent tool results
(parallel tool calls), which the API requires to be grouped into one content;
all other same-role contents stay separate.
Also fixes the v1 standard-content path, where a single ToolMessage could emit
a user content mixing its functionResponse part with text parts; tool turns
now carry only their functionResponse part(s), mirroring the legacy path.
Updated dependencies \[`3205b35`]:
3205b35]:
8cfff4d Thanks @hntrl! - Add LangSmith gateway support for Google Gemini (Developer API) models. When LANGSMITH_GATEWAY is set, ChatGoogleGenerativeAI and ChatGoogle (and initChatModel("google-genai:...")) route requests through the gateway's Gemini path, using the gateway key (falling back to LANGSMITH_API_KEY). An explicit baseUrl/endpoint, an explicit apiKey, or a Vertex AI configuration suppress gateway routing. Also adds GEMINI_API_KEY as a fallback env var for ChatGoogleGenerativeAI.Builds on stampRetryable in @langchain/core so the retry middleware can tell a transient failure from a deterministic one. Timeouts, rate limits, and
#11342 3b0e4c4 Thanks @thushanth-bengre-langchain! - feat(google): mark Google provider errors as retryable or not
Builds on stampRetryable in @langchain/core so the retry middleware can tell a transient failure from a deterministic one. Timeouts, rate limits, and server errors are marked retryable; bad credentials, blocked prompts, invalid tools, and invalid input non-retryable. Errors that may succeed on a regeneration stay unmarked and retry as before.
Also forwards a per-call maxRetries to the retry loop, so a surrounding retry loop such as modelRetryMiddleware can take over instead of the two multiplying against each other.
The @langchain/core peer range moves from ^1.0.0 to workspace:^, since this release depends on stampRetryable.
### Patch Changes - #10674 `f017708` Thanks @christian-bromann! - fix: classify provider 429s before retrying
f017708 Thanks @christian-bromann! - fix: classify provider 429s before retrying9920d4b Thanks @jkennedyvz! - Require Zod 4.6.6 or newer for installed dependencies to exclude versions affected by GHSA-mrhx-c7xc-m3w5. Zod v3 schemas remain supported through the bundled zod/v3 entry point.Updated dependencies \[`2e28115`]:
2e28115 Thanks @christian-bromann! - feat(together-ai): enable native OpenAI-compatible streamEvents events2e28115]:
2e28115 Thanks @christian-bromann! - feat(ibm): add native watsonx streamEvents event conversion2e28115 Thanks @christian-bromann! - feat(google): add native Gemini streamEvents event conversion#10537 cdb465b Thanks @raashish1601! - fix(google): normalize ChatGoogle callback token usage metadata
#10586 43b10d2 Thanks @tysoncung! - strip type field from executableCode and codeExecutionResult parts
2e28115 Thanks @christian-bromann! - feat(fireworks): enable native OpenAI-compatible streamEvents events2e28115]:
17aedaa Thanks @mdrxy! - Add appCategories field for OpenRouter marketplace attribution (X-OpenRouter-Categories header) and update default siteUrl/siteName values. Attribution headers are now only sent when set.d6bf4fc]:
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
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
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
One column per quarter.