@langchain/anthropic
1.6.6 · 20 Nov 2026MIT2.1M / weekRepositoryHomepagenpmAtom feed
149 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
1.6.6
20 Nov 2026Set
finish_reason(thestop_reason),normalized_finish_reasonandfinish_stateinresponse_metadataoninvokeand streamed results, and emit them onmessage-finish.refusalandmodel_context_window_exceededmap torefusalandcontext_exceeded, andpause_turnsetsfinish_state: "suspended".
1.6.5
13 Nov 2026Fall back to
tool_callsinAnthropicToolsOutputParsersowithStructuredOutputworks when streamed content is normalized totool_callblocks
1.6.4
11 Nov 2026- Breaking
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/v3entry point.
1.6.3
10 Nov 2026anthropic: Surface model refusals as
ModelRefusalErrorA
refusalstop reason maps to thecontent_filterfinish reason in stream events, andwithStructuredOutputthrowsModelRefusalErroron a refusal, including when thinking is enabled.
1.6.2
9 Nov 2026Report streamed usage from the cumulative
message_deltausage, aslangchain-anthropicdoes, so input and cache tokens from server tool passes (e.g. web search) are counted and output tokens aren't double counted.Support Claude Fable 5.2 and Mythos 5.2 profiles, always-on adaptive thinking, and the nameless computer toolset. Upgrade the Anthropic SDK and avoid forced tool choice for always-on thinking models.
1.6.1
7 Nov 2026anthropic: Keep streamed
server_tool_useinput when replaying messages
1.6.0
22 Oct 2026Stream tool-call args as
tool-call-deltaslicesTool-call and server-tool-call args now stream as
tool-call-deltaevents, which carry only the new slice of the args, instead ofblock-deltasnapshots of the args so far. A large tool call now costs about the same bytes on the wire as the same length of text.
1.5.13
20 Oct 2026anthropic: Declare mid-conversation support in model profiles. Claude Opus 4.8, Opus 5, Opus 5.5, Sonnet 5.5, Haiku 5.5, Fable 5 and 5.1, and Mythos 5 and 5.1 set
midConversationSystemMessagesandmidConversationTools. Sonnet 5 sets system messages only.Regenerating the profiles from models.dev also adds Claude Opus 5.5, Sonnet 5.5 and Haiku 5.5, removes Claude Opus 4.1, and lowers Claude Sonnet 4.5's
maxInputTokensto 200,000.
1.5.12
1 Oct 2026anthropic: Support mid-conversation tool changes. A
SystemMessagecan now carry Anthropic'stool_additionandtool_removalblocks, either bare incontentor wrapped in anon_standardblock, and they reach the provider verbatim. The required beta is added automatically:mid-conversation-tool-changes-2026-07-01for tools named by reference, orinline-tools-2026-09-15when atool_additiondefines a tool by value (tool: { type: "tool_definition", definition }).System content is now narrowed to what Anthropic accepts there.
text,tool_additionandtool_removalare sent; any other block is dropped instead of being forwarded for the provider to reject. A system message left with no content is omitted.
1.5.11
21 Sep 2026anthropic: Accept a
SystemMessageanywhere in the message list. Previously only the first message could be a system message. Anything else threw.A system message that isn't first is now sent at its own position. It applies from that point in the conversation onwards, and adding one leaves the prompt cache for the earlier turns intact.
Two smaller changes come with it. A leading run of two or more
SystemMessages now merges into the top-levelsystemfield instead of being rejected. System content built from standard content blocks no longer sends the internal blockidto the provider.
1.5.10
9 Sep 2026Add support for Claude Fable 5.1.
1.5.9
1 Sep 2026anthropic: Add claude-sonnet-5 support
1.5.8
20 Aug 2026Preserve the generic
tool_search_tool_resultblock type in streaming output and message payload conversion. The Anthropic API emits this un-suffixed type for both tool search variants; previously only the variant-suffixed names were allowlisted, so multi-turn conversations using tool search still failed with INVALID_TOOL_RESULTS after a client-tool round-trip.
1.5.7
20 Aug 2026Round-trip the tool search server-tool result blocks (
tool_search_tool_bm25_tool_result/tool_search_tool_regex_tool_result) through message translation, mirroringweb_search_tool_result. Without this, a multi-turn conversation using the tool search tool fails on the next request with400 invalid_request_error … tool use … found without a corresponding … tool_result block, because the result block was dropped from the assistant message (streaming capture) and on re-send (toolTypespassthrough).
1.5.6
14 Aug 2026anthropic: Mark Anthropic provider errors as retryable or not
Builds on
stampRetryablein@langchain/coreso the retry middleware can tell a transient failure from a deterministic one. Rate limits are marked retryable; context overflow, invalid tool results, bad credentials, and unknown models non-retryable. Anything else stays unmarked and retries as before.Also forwards a per-call
maxRetriesto the retry loop, so a surrounding retry loop such asmodelRetryMiddlewarecan take over instead of the two multiplying against each other.Errors keep their original class, so
instanceofagainst the@anthropic-ai/sdkerror types is unaffected.
1.5.5
13 Aug 2026anthropic: Preserve gateway cost on the native stream path
convertAnthropicStreamnow surfaces an Anthropic-compatible gateway's numericusage.costatresponse_metadata.usage.cost, matching the chunk path. Token accounting inusage_metadatais unchanged.
1.5.4
5 Aug 2026Add LangSmith Gateway environment configuration to OpenAI, Anthropic, and Fireworks chat models.
anthropic: Filter tools with unsupported root schema composition
1.5.3
5 Aug 2026Preserve gateway-provided cost metadata in Anthropic streams.
1.5.2
24 Jul 2026anthropic: Add claude-opus-5 support
1.5.1
22 Jun 2026Stop sending
thinking: { type: "disabled" }onChatAnthropicrequests when the user never configured thinking. The disabled value is now only emitted when it is explicitly set, so adaptive-only models (e.g.claude-fable-5) that reject an explicitthinking.type: "disabled"no longer fail with a 400 on a defaultChatAnthropicinstance.
1.5.0
17 Jun 2026anthropic: Update native streamEvents event coverage
1.4.1
12 Jun 20261.4.0
18 May 2026anthropic: Support strict tool calling for custom tools
1.3.27
22 Apr 2026anthropic: Add Claude Opus 4.7 compatibility updates
Patch Changes
anthropic: Add Claude Opus 4.7 compatibility updates
1.3.26
31 Mar 2026Implement tool choice required on anthropic
Patch Changes
Implement tool choice required on anthropic
1.3.25
18 Mar 2026Add default max tokens for sonnet
Patch Changes
Add default max tokens for sonnet
1.3.24
17 Mar 2026Fix temperature/topK/topP handling: guard all three so undefined values are not
set on the request object, and fix broken topK/topP validation when thinking is
enabled.
Patch Changes
Fix temperature/topK/topP handling: guard all three so undefined values are not
set on the request object, and fix broken topK/topP validation when thinking is
enabled.
1.3.23
11 Mar 2026anthropic: Prevent cache token double-counting in streaming
Patch Changes
anthropic: Prevent cache token double-counting in streaming
1.3.22
3 Mar 2026anthropic: Implement standard schema support for structured output
Patch Changes
anthropic: Implement standard schema support for structured output
1.3.21
26 Feb 2026Add package version metadata to runnable traces. Each package now stamps its version in
this.metadata.versionsat construction time, making version info available in LangSmith trace metadata.anthropic: Only set topP when defined to avoid API error
Patch Changes
Add package version metadata to runnable traces. Each package now stamps its version in
this.metadata.versionsat construction time, making version info available in LangSmith trace metadata.anthropic: Only set topP when defined to avoid API error
1.3.20
23 Feb 2026anthropic: Convert tool_calls to tool_use blocks when AIMessage content is an empty array
When
AIMessage.contentwas an empty array `` withtool_callspresent, the tool calls were silently dropped during message formatting. This caused Anthropic API requests to fail with a 400 error. The array content branch now appends any tool_calls not already represented in the content array astool_useblocks, matching the behavior of the string content path.Replace retired Anthropic model IDs with active replacements
1.3.19
20 Feb 20261.3.18
17 Feb 2026core: Add ContextOverflowError, raise in anthropic and openai
core: Add namespace-based symbol branding for error class hierarchies
Introduces
createNamespaceutility for hierarchical symbol-based branding of class hierarchies.
All LangChain error classes now use this pattern, replacing hand-rolled duck-typeisInstancechecks
with reliable cross-realmSymbol.for-based identity.
Patch Changes
core: Add ContextOverflowError, raise in anthropic and openai
core: Add namespace-based symbol branding for error class hierarchies
Introduces
createNamespaceutility for hierarchical symbol-based branding of class hierarchies.
All LangChain error classes now use this pattern, replacing hand-rolled duck-typeisInstancechecks
with reliable cross-realmSymbol.for-based identity.New
LangChainErrorbase class that all LangChain errors extendNew
createNamespace/NamespaceAPI in@langchain/core/utils/namespaceRefactored
ModelAbortError,ContextOverflowErrorto use namespace brandingAdded
ContextOverflowError.fromError()static factory methodDeprecated
addLangChainErrorFieldsin favor ofLangChainErrorsubclassesMigrated Google provider errors (
GoogleError,ConfigurationError, etc.) to namespace brandingUpdated Anthropic and OpenAI providers to use
ContextOverflowError.fromError()
1.3.17
11 Feb 2026anthropic: Update MODEL_DEFAULT_MAX_OUTPUT_TOKENS with correct values for all Claude models
Patch Changes
anthropic: Update MODEL_DEFAULT_MAX_OUTPUT_TOKENS with correct values for all Claude models
1.3.16
9 Feb 20261.3.15
5 Feb 2026anthropic: Add Claude Opus 4.6 support with adaptive thinking, effort parameter, compaction API, output_config migration, inference_geo, and structured outputs GA
1.3.14
4 Feb 2026Only updates a dependency:@langchain/core 1.1.19
1.3.13
30 Jan 2026Handle standard file content blocks
Improved abort signal handling for chat models:
providers: Add proper abort signal handling for invoke and stream operations
This enables proper cancellation behavior for both invoke and streaming operations, and allows fallback chains to correctly proceed to the next runnable when the previous one is aborted.
Patch Changes
Handle standard file content blocks
Improved abort signal handling for chat models:
Added
ModelAbortErrorclass in@langchain/core/errorsthat contains partial output when a model invocation is aborted mid-streaminvoke()now throwsModelAbortErrorwith accumulatedpartialOutputwhen aborted during streaming (when using streaming callback handlers)stream()throws a regularAbortErrorwhen aborted (since chunks are already yielded to the caller)All provider implementations now properly check and propagate abort signals in both
_generate()and_streamResponseChunks()methodsAdded standard tests for abort signal behavior
providers: Add proper abort signal handling for invoke and stream operations
Added early abort check (
signal.throwIfAborted()) at the start of_generatemethods to immediately throw when signal is already abortedAdded abort signal checks inside streaming loops in
_streamResponseChunksto return early when signal is abortedPropagated abort signals to underlying SDK calls where applicable (Google GenAI, Google Common/VertexAI, Cohere)
Added standard tests for abort signal behavior in
@langchain/standard-tests
This enables proper cancellation behavior for both invoke and streaming operations, and allows fallback chains to correctly proceed to the next runnable when the previous one is aborted.
1.3.12
24 Jan 20261.3.11
20 Jan 2026anthropic: Consolidate input_json_delta blocks in streaming toolcalls
Patch Changes
anthropic: Consolidate input_json_delta blocks in streaming toolcalls
1.3.10
14 Jan 2026Fixed converting partial tool inputs
Patch Changes
Fixed converting partial tool inputs
1.3.8
13 Jan 2026core: Properly elevate reasoning tokens
Patch Changes
core: Properly elevate reasoning tokens
1.3.2 – 1.3.76 releases with no change for you5 dependency updates, 1 without a note@langchain/core 1.1.12Show each
- 1.3.78 Jan 2026@langchain/core 1.1.12
- 1.3.67 Jan 2026@langchain/core 1.1.11
- 1.3.56 Jan 2026@langchain/core 1.1.10
- 1.3.46 Jan 2026@langchain/core 1.1.9
- 1.3.322 Dec 2025@langchain/core 1.1.8
- 1.3.218 Dec 2025no note
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.