unstale

npm / @ai-sdk/anthropic

@ai-sdk/anthropic

What changed in @ai-sdk/anthropic 2 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

5 breaking34 new APIs and options12 behavior and defaults27 fixes and other

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

npx @unstale/cli init

@unstale/cli on npm

@ai-sdk/anthropic 465 changes

Breaking changes 4

  • Renames evaluate to decide.

    4.0.72release notes

  • For Claude Sonnet 5.5, disabled thinking is replaced with between_tools, reasoning: 'none' maps to between_tools, and budget-based thinking is converted to adaptive thinking.

    4.0.67release notes

  • For models that always use adaptive thinking, unsupported disabled or budget-based thinking settings are dropped, reasoning: 'none' maps to effort: 'low', and a warning is emitted.

    4.0.60release notes

  • Unsupported batch request types are now rejected.

    4.0.53release notes

New APIs and options 32

  • Forwards providerOptions.vertex.labels as a header.

    4.0.80release notes

  • A typed AnthropicCitation export is available for citation data.

    4.0.79release notes

  • A typed AnthropicTextProviderMetadata export is available for text provider metadata.

    4.0.79release notes

  • Adds Claude Haiku 5.5 as a known model with a 128k max output token limit, adaptive thinking, and all five effort levels. Thinking can be disabled up to high effort; xhigh and max are lowered to high with a warning…

    3.0.128, 4.0.75release notesrelease notes

  • Adds the portable max reasoning level, widening LanguageModelV4CallOptions['reasoning'] and requiring exhaustive consumers to handle max.

    4.0.73release notes

  • Exposes message-start usage through custom stream parts.

    4.0.72release notes

  • Adds Claude Sonnet 5.5 as a supported model ID in @ai-sdk/anthropic.

    2.0.107, 3.0.125, 4.0.67release notesrelease notesrelease notes

  • Adds the between_tools thinking type, the lowest thinking setting on Claude Sonnet 5.5.

    2.0.107, 3.0.125, 4.0.67release notesrelease notesrelease notes

  • Supports on-demand compaction and preserves signed compaction blocks.

    4.0.63release notes

  • Adds Claude Opus 5.5 as a supported model.

    2.0.103, 3.0.120, 4.0.60release notesrelease notesrelease notes

  • Adds the computer use toolset required for computer use on Claude Opus 5.5.

    2.0.103, 3.0.120, 4.0.60release notesrelease notesrelease notes

  • Adds the safeguards provider option for the dangerous tool use classifier.

    3.0.127, 4.0.59release notesrelease notes

  • Adds experimental Choice, Score, and Boolean evaluations through Messages structured output, with exact labels, validated score bounds, and prompted Boolean P(true) estimates validated to be in [0, 1].

    4.0.56release notes

  • Adds 20260318 web search and web fetch tools with response inclusion controls.

    4.0.55release notes

  • Image generation requests are now supported in batches.

    4.0.53release notes

  • Adds batch cancellation support.

    4.0.52release notes

  • Adds batch listing support.

    4.0.52release notes

  • Batch requests can now use per-request models, allowing developers to select a model for each request in a batch.

    4.0.50release notes

  • Adds support for Fable 5.1 in the Anthropic provider.

    2.0.101, 3.0.116, 4.0.48release notesrelease notesrelease notes

  • Upload results now expose byteSize.

    4.0.47release notes

  • Upload results now expose createdAt.

    4.0.47release notes

  • FilesV4 now optionally supports deleting files.

    4.0.47release notes

  • provider-utils adds deleteFromApi.

    4.0.47release notes

  • FilesV4 now optionally supports streaming file downloads.

    4.0.47release notes

  • Upload results now expose expiresAt.

    4.0.47release notes

  • FilesV4 call options now accept abortSignal.

    4.0.47release notes

  • FilesV4 call options now accept headers.

    4.0.47release notes

  • FilesV4 now optionally supports retrieving file metadata.

    4.0.47release notes

  • provider-utils adds streaming multipart uploads with deterministic part ordering and failure-path stream teardown.

    4.0.47release notes

  • Upload data now supports the { type: 'stream' } variant.

    4.0.47release notes

  • Accepts webhookUrl for batch completions; the gateway provider registers it, while direct Anthropic and OpenAI batch providers return an unsupported warning when it is provided.

    4.0.42release notes

  • The gateway provider exports typed async-job metadata for batch completions.

    4.0.42release notes

Behavior and default changes 7

  • For Claude Haiku 5.5, an enabled thinking configuration with budgetTokens is converted to adaptive thinking with a warning because the model does not support thinking token budgets.

    2.0.109, 3.0.128, 4.0.75release notesrelease notesrelease notes

  • For Claude Sonnet 5.5, structuredOutputMode: 'jsonTool' falls back to native structured outputs with a warning.

    2.0.107, 3.0.125, 4.0.67release notesrelease notesrelease notes

  • For Claude Sonnet 5.5, required and named tool choices fall back to auto with a warning because forced tool use is rejected.

    2.0.107, 3.0.125, 4.0.67release notesrelease notesrelease notes

  • For models that reject forced tool use, requesting jsonTool falls back to native structured outputs with a warning.

    2.0.103, 3.0.120, 4.0.60release notesrelease notesrelease notes

  • For models that reject forced tool use, required and named tool choices fall back to auto with a warning.

    3.0.120, 4.0.60release notesrelease notes

  • Preserved thinking support now covers prefix_mismatch_behavior: 'error'.

    3.0.118, 4.0.53release notesrelease notes

  • Batch requests support the full language-model option surface.

    4.0.46release notes

Fixes and other changes 22

  • Support provider-referenced files in tool results.

    4.0.81release notes

  • When manual thinking is enabled with a required or named tool choice, falls back to automatic tool choice with a warning to avoid an Anthropic API 400 error.

    3.0.131, 4.0.80release notesrelease notes

  • Named tool choices send only the selected tool.

    3.0.131, 4.0.80release notesrelease notes

  • Retrieved web-search sources are kept separate from normalized inline citations on text parts and text-end events.

    4.0.79release notes

  • Tools are preserved when tool calls are disabled.

    3.0.129, 4.0.79release notesrelease notes

  • Failed tool search results are preserved in conversation history.

    3.0.129, 4.0.79release notesrelease notes

  • Generation, streaming, and batch results preserve every supported web and document citation kind, with document source compatibility and web citation source fallbacks when retrieval results are unavailable.

    4.0.79release notes

  • Avoids unsupported strict mode warnings when tools set strict to false.

    4.0.77release notes

  • Uses the JSON tool fallback for structured output on Amazon Bedrock.

    4.0.75release notes

  • JSONL rows are limited to 64 MB during batch result downloads.

    4.0.73release notes

  • Adds the required beta when replaying server-side fallback blocks.

    4.0.72release notes

  • Preserves invalid toolset calls.

    4.0.71release notes

  • Preserves server-side fallback boundaries when replaying assistant messages.

    4.0.69release notes

  • The User-Agent header is now standards-compliant.

    4.0.68release notes

  • After pruning, missing source code execution caller metadata is omitted before a subsequent user message and a warning is emitted; active tool continuations retain caller metadata.

    4.0.67release notes

  • With between_tools thinking on Claude Sonnet 5.5, xhigh and max effort are lowered to high with a warning because the API rejects them.

    2.0.107, 3.0.125, 4.0.67release notesrelease notesrelease notes

  • Empty compaction blocks are omitted from replay.

    4.0.61release notes

  • Uses the documented beta header for per-message effort.

    2.0.103, 3.0.120, 4.0.60release notesrelease notesrelease notes

  • Recognizes dated Google Vertex Claude 4 model IDs when selecting model capabilities.

    4.0.49release notes

  • The core uploadFile() helper now forwards abortSignal.

    4.0.47release notes

  • The core uploadFile() helper now forwards headers.

    4.0.47release notes

  • Provider metadata now preserves native message batch request counts.

    4.0.46release notes

@ai-sdk/anthropic 35 changes

Breaking changes 1

  • On Claude Sonnet 5.5, disabled thinking is replaced with between_tools thinking and budget-based thinking is converted to adaptive thinking.

    3.0.125release notes

New APIs and options 1

  • Adds the Claude Haiku 5.5 model ID to @ai-sdk/anthropic.

    3.0.128release notes

Behavior and default changes 1

  • For models that always use adaptive thinking, the provider drops unsupported disabled or budget-based thinking settings and emits a warning.

    2.0.103, 3.0.120release notesrelease notes

Fixes and other changes 2

  • After pruning conversation history, dangling caller metadata whose source code execution call is missing is omitted before a subsequent user message, with a warning; retained tool calls and results are preserved, and active tool continuations are unchanged.

    3.0.125release notes

  • Effort updates are preserved on empty system messages at the beginning of a conversation, including consecutive updates.

    2.0.106, 3.0.123release notesrelease notes

@ai-sdk/anthropic 28 changes

New APIs and options 1

  • Adds Claude Haiku 5.5 as a supported model, recognized with a 128k maximum output token limit and all five effort levels.

    2.0.109release notes

Behavior and default changes 4

  • When thinking is disabled, it is supported up to high effort; xhigh and max are lowered to high with a warning.

    2.0.109release notes

  • For claude-sonnet-5-5, budget-based thinking is converted to adaptive thinking.

    2.0.107release notes

  • For claude-sonnet-5-5, disabled thinking is replaced with between_tools thinking, with a warning.

    2.0.107release notes

  • For models that reject forced tool use, required and named tool choices fall back to auto, with a warning.

    2.0.103release notes

Fixes and other changes 3

  • Avoids forcing structured-output tools for incompatible Claude models on Amazon Bedrock.

    2.0.104release notes

  • Tool calls are preserved when using JSON structured output.

    2.0.100release notes

  • Client tool calls are ordered after provider-executed tool results.

    2.0.99release notes