# What changed in @langchain/anthropic

> 65 changes in @langchain/anthropic 0.3 to 1 from its official release notes, upgrade guides and advisories: 3 breaking, 1 deprecations, 3 security, 22 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/@langchain/anthropic/

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

## @langchain/anthropic 1

### Breaking changes

- Only text, tool_addition and tool_removal blocks are sent; other blocks are dropped, and a system message with no remaining content is omitted. (1.5.12) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.5.12)
- The default model changes from claude-3-5-sonnet-latest to claude-sonnet-4-5-20250929. (1.3.20) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.20)
- Usage metadata input_tokens now includes cache creation and cache read tokens. (1.2.2) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.2.2)

### Security

- LangChain: MongoDBChatMessageHistory query injection can allow cross-session access (1.3.1) — [security advisory](https://github.com/advisories/GHSA-M6RX-H84Q-8R95)
- LangChain: RediSearch Filter Injection via Unescaped Tag/Text Values (1.1.1) — [security advisory](https://github.com/advisories/GHSA-5X6V-P487-7QH2)

### Deprecations

- The output format setting moves to outputConfig.format; outputFormat remains available for backwards compatibility but is deprecated. (1.3.15) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.15)

### New APIs and options

- Adds support for Claude Fable 5.1. (1.5.10) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.5.10)
- Adds support for Claude Sonnet 5. (1.5.9) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.5.9)
- Adds LangSmith Gateway environment configuration to Anthropic chat models. (1.5.4) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.5.4)
- Adds support for the claude-opus-5 model. (1.5.2) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.5.2)
- Adds support for strict tool calling for custom tools. (1.4.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.4.0)
- Anthropic structured output now supports standard schemas. (1.3.22) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.22)
- Anthropic raises ContextOverflowError for context overflow errors. (1.3.18) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.18)
- Adds the Claude Opus 4.6 model with 16384 default max output tokens. (1.3.15) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.15)
- Adds beta compaction support, including auto-detection of compact_20260112 edits and streaming handlers for compaction content blocks. (1.3.15) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.15)
- Adds a parameter for data residency controls. (1.3.15) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.15)
- Adds effort levels low, medium, high, and max for controlling token usage. (1.3.15) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.15)
- Supports adaptive thinking, recommended for Opus 4.6. (1.3.15) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.15)
- Exports ChatAnthropicInput, an intersection of AnthropicInput and BaseChatModelParams, for type-safe configuration and IntelliSense. (1.3.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.0)
- Adds a named computer use tool for use with Anthropic. (1.3.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.0)
- Adds a named mcp toolset tool for use with Anthropic. (1.3.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.0)
- Adds a named text editor tool for use with Anthropic. (1.3.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.0)
- Adds a named webfetch tool for use with Anthropic. (1.3.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.0)
- Adds support for the Anthropic tool search tool. (1.3.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.0)
- Adds support for advanced tool use. (1.2.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.2.0)
- Adds opus-4.5 to the supported model strings. (1.1.3) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.1.3)
- Support for the betas parameter was added. (1.1.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.1.0)
- Native structured output is now supported. (1.1.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.1.0)

### Behavior and default changes

- SystemMessage content can carry tool_addition and tool_removal blocks, which are forwarded verbatim; the required beta is added automatically based on how the tool is defined. (1.5.12) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.5.12)
- System content built from standard content blocks no longer sends the internal block id to the provider. (1.5.11) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.5.11)
- Rate limits are marked retryable; context overflow, invalid tool results, bad credentials, and unknown models are marked non-retryable. Other errors remain unmarked and retry as before. (1.5.6) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.5.6)
- Native streamEvents event coverage was updated, changing which events are covered. (1.5.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.5.0)
- Adds compatibility updates for Claude Opus 4.7, allowing developers to use the model with this package. (1.3.27) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.27)
- Adds a default max token value for Sonnet models. (1.3.25) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.25)
- Runnable traces now include package version metadata, making version information available in LangSmith trace metadata. (1.3.21) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.21)
- Structured outputs are GA and no longer require a beta header. (1.3.15) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.15)
- Anthropic models handle standard file content blocks. (1.3.13) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.13)
- Invocation parameters now set an empty tool array. (1.3.1) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.1)

### Fixes and other changes

- SystemMessage can appear anywhere in the message list; it applies from its position onwards, and adding one preserves the prompt cache for earlier turns. (1.5.11) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.5.11)
- A leading run of two or more SystemMessages is merged into the top-level system field instead of being rejected. (1.5.11) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.5.11)
- Preserves the generic tool search result block type in streaming output and message payload conversion, preventing INVALID_TOOL_RESULTS in multi-turn conversations after a client-tool round-trip. (1.5.8) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.5.8)
- Message translation now round-trips this tool search result block, preventing multi-turn requests from failing when the block is dropped. (1.5.7) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.5.7)
- Message translation now round-trips this tool search result block, preventing multi-turn requests from failing when the block is dropped. (1.5.7) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.5.7)
- A per-call maxRetries is forwarded to the retry loop, allowing a surrounding retry loop such as modelRetryMiddleware to take over instead of multiplying retry counts. (1.5.6) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.5.6)
- convertAnthropicStream now surfaces an Anthropic-compatible gateway's numeric usage.cost in response_metadata.usage.cost; token accounting in usage_metadata is unchanged. (1.5.5) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.5.5)
- Filters tools with unsupported root schema composition. (1.5.4) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.5.4)
- Anthropic streams preserve cost metadata provided by the gateway. (1.5.3) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.5.3)
- Requests no longer include thinking: { type: "disabled" } unless the user explicitly configured it, preventing default instances from failing with adaptive-only models that reject this setting. (1.5.1) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.5.1)
- Tool choice required is now implemented for Anthropic. (1.3.26) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.26)
- Undefined values are no longer set on the request object. (1.3.24) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.24)
- Undefined values are no longer set on the request object, and validation works when thinking is enabled. (1.3.24) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.24)
- Undefined values are no longer set on the request object, and validation works when thinking is enabled. (1.3.24) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.24)
- Prevents cache tokens from being double-counted during streaming. (1.3.23) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.23)
- Only set topP when it is defined, avoiding an API error. (1.3.21) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.21)
- When content is an empty array and tool_calls are present, formatting now appends unrepresented calls as tool_use blocks instead of silently dropping them and causing Anthropic API requests to fail. (1.3.20) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.20)
- Model profiles were updated. (1.3.18) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.18)
- Corrected the default maximum output token values for all Claude models. (1.3.17) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.17)
- Chat model invocations and streams now properly handle abort signals; invoke() throws ModelAbortError with accumulated partial output when aborted during streaming, while stream() throws AbortError. (1.3.13) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.13)
- Consolidates input_json_delta blocks in streaming tool calls, improving how streamed tool-call inputs are handled. (1.3.11) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.11)
- Fixed converting partial tool inputs. (1.3.10) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.10)
- Reasoning tokens are now properly elevated. (1.3.8) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.8)
- Fixes the `.js` import issue in chat_models.ts. (1.3.0) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.3.0)
- Fixes passing betas to the client when streaming. (1.1.1) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain/anthropic%401.1.1)

## @langchain/anthropic 0.3

### Security

- A fix addresses CVE-2025-12735. (0.3.58) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/0.3.58)

### Fixes and other changes

- The default temperature option in v0/anthropic is fixed. (0.3.58) — [release notes](https://github.com/langchain-ai/langchainjs/releases/tag/0.3.58)
