Packages

@ai-sdk/anthropic

4.0.106 · 17 Nov 2026Apache-2.024.5M / weekRepositoryHomepagenpmAtom feed

Your version

457 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 4.0.53

    11 Sep 2026
    • Reject unsupported batch request types

    • Support image generation requests in batches

    • anthropic: Expand preserved thinking support to cover prefix_mismatch_behavior: 'error'

  2. 4.0.52

    9 Sep 2026
    • anthropic: Add batch cancellation and listing

  3. 4.0.50

    8 Sep 2026
    • Support per-request models in batch

  4. 4.0.49

    2 Sep 2026
    • anthropic: Recognize dated Google Vertex Claude 4 model IDs when selecting model capabilities

  5. 4.0.48

    2 Sep 2026
    • anthropic: Add fable 5.1 support

  6. 4.0.47

    1 Sep 2026
    • provider: Extend the FilesV4 interface with optional getFileMetadata, downloadFile (streaming), and deleteFile operations, plus abortSignal/headers call options and a { type: 'stream' } upload data variant; upload results now expose byteSize, createdAt, and expiresAt (also surfaced by the core uploadFile() helper, which now forwards abortSignal/headers); add postMultipartStreamToApi (streaming multipart uploads with deterministic part ordering and failure-path stream teardown), deleteFromApi, and createBinaryStreamResponseHandler to provider-utils

  7. 4.0.46

    30 Aug 2026
    • provider/anthropic: Preserve native message batch request counts in provider metadata and support the full language-model option surface in batch requests

  8. 4.0.44 – 4.0.452 releases that only update dependencies@ai-sdk/provider-utils 5.0.33Show each
  9. 4.0.42

    25 Aug 2026
    • Add batch completion webhooks. experimental_startTextBatch accepts a webhookUrl, and the gateway provider registers it through the batch callbackUrl contract and exports typed async-job metadata. Direct Anthropic and OpenAI batch providers return an unsupported warning when the option is provided.

  10. 4.0.40 – 4.0.412 releases that only update dependencies@ai-sdk/provider-utils 5.0.29Show each
  11. 4.0.39

    14 Aug 2026
    • Preserve Anthropic server-tool caller metadata in multi-turn conversations.

  12. 4.0.35 – 4.0.384 releases that only update dependencies@ai-sdk/provider-utils 5.0.27@ai-sdk/provider 4.0.7Show each
  13. 4.0.34

    7 Aug 2026
    • anthropic: Add text batch support

  14. 4.0.32

    6 Aug 2026
    • Reject spliced Anthropic generations while allowing duplicate message start events for the active message.

  15. 4.0.29 – 4.0.302 releases that only update dependencies@ai-sdk/provider-utils 5.0.21Show each
  16. 4.0.28

    3 Aug 2026
    • Preserve Anthropic prompt-cache matches by replaying complete code-execution transcripts in their original wire shape.

  17. 4.0.27

    31 Jul 2026

    Only updates a dependency:@ai-sdk/provider-utils 5.0.18

  18. 4.0.26

    31 Jul 2026
    • Return visible summarized reasoning when generic reasoning enables adaptive thinking.

  19. 4.0.25

    30 Jul 2026
    • Add experimental_toolCaller routing to generateText for code mode

  20. 4.0.22 – 4.0.243 releases that only update dependencies@ai-sdk/provider-utils 5.0.15@ai-sdk/provider 4.0.4Show each
  21. 4.0.21

    26 Jul 2026
    • anthropic: Report thinking tokens as reasoning token usage

  22. 4.0.20

    24 Jul 2026
    • Feat (provider/anthropic): support fallbacks 'default' mode, which routes safety classifier refusals to Anthropic's recommended fallback model (adds the server-side-fallback-2026-07-01 beta automatically)

    • Feat (provider/anthropic): support mid-conversation tool changes via the toolChanges system message provider option, emitting tool_addition/tool_removal content blocks and the mid-conversation-tool-changes-2026-07-01 beta

    • Feat (provider/anthropic): add claude-opus-5 model id with frontier-tier capabilities (128k output tokens, structured output, adaptive thinking, xhigh effort, sampling parameter rejection, thinking-disabled only at effort high or below)

  23. 4.0.19

    23 Jul 2026
    • Fix (provider/anthropic): use current-generation capability defaults for unrecognized Claude model IDs while retaining conservative defaults for legacy Claude and non-Claude models.

  24. 4.0.18

    21 Jul 2026
    • Warn when an unknown model uses the default 4096 max output token limit.

  25. 4.0.17

    21 Jul 2026
    • amazon-bedrock: Sanitize unsupported JSON Schema constraints in native Anthropic structured output

    • provider/anthropic: Warn when parallel tool use is requested with JSON tool structured output

  26. 4.0.16

    17 Jul 2026
    • provider/anthropic: Preserve web search citations when replaying assistant messages

  27. 4.0.15

    14 Jul 2026

    Only updates a dependency:@ai-sdk/provider-utils 5.0.10

  28. 4.0.14

    13 Jul 2026
    • provider-utils: Validate provider-response URLs in getFromApi

      getFromApi now has a validateUrl flag. It is optional so existing callers keep compiling (omitting it behaves like false, i.e. no validation), but all AI SDK provider packages set it explicitly at every call site so each one makes a visible trust decision. When true, the URL is routed through fetchWithValidatedRedirects — the same guard used by downloadBlob — which rejects private/loopback/link-local targets, re-validates every redirect hop, strips proxy/metadata/cookie request headers, and drops all caller headers except the user-agent on cross-origin redirects (custom API-key headers must not follow a redirect off-origin any more than Authorization may); blocked URLs throw DownloadError. It is enabled at the image/video/audio download and polling call sites where the URL comes from a provider response body; URLs built from developer-configured endpoints pass validateUrl: false and are unaffected.

      A new optional credentialedOrigin withholds caller headers unless the URL is same-origin with it, so the API key is not sent to a response-supplied host on a different origin.

      A new optional trustedOrigin exempts URLs (and redirect hops) that are same-origin with the developer-configured provider endpoint from target validation, so self-hosted and localhost deployments whose response URLs point back at the configured host keep working; all other hops are still validated.

      Also closes range gaps in validateDownloadUrl (IPv4 224.0.0.0/4 multicast and the TEST-NET documentation ranges 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24; IPv6 documentation ranges 2001:db8::/32 and 3fff::/20), and follows only the fetch-spec redirect status codes (301/302/303/307/308) — a Location header on any other status is not followed. This guard performs string/literal checks only and does not resolve DNS; hostnames that resolve to private addresses and DNS rebinding remain out of scope and must be constrained at the network layer (or by injecting a Node fetch that pins the resolved IP at connect time) for server deployments handling untrusted URLs. See contributing/secure-url-handling.md.

    • Reject empty OpenAI, Anthropic, and Replicate base URLs with a helpful AI SDK
      invalid argument error.

  29. 4.0.10 – 4.0.123 releases with no change for you2 dependency updates, 1 maintenance@ai-sdk/provider 4.0.3@ai-sdk/provider-utils 5.0.7Show each
  30. 4.0.9

    7 Jul 2026
    • anthropic: Wrap invalid tool input in object

  31. 4.0.8

    4 Jul 2026
    • anthropic: Forward thinking: { type: 'disabled' } to the API instead of stripping it

      Previously, setting providerOptions.anthropic.thinking = { type: 'disabled' } (or top-level reasoning: 'none') was accepted by the schema but silently dropped from the outgoing request. For models that default thinking on (e.g. Sonnet 5), this left thinking enabled and could consume a small max_tokens budget entirely. The disabled value is now sent to the Anthropic Messages API.

  32. 4.0.7

    2 Jul 2026
    • Add experimental streaming transcription support for transcription models, including OpenAI gpt-realtime-whisper and xAI WebSocket STT.

  33. 4.0.6

    2 Jul 2026
    • Security

      Prevent prototype pollution when synchronously parsing provider JSON inputs and expose secureJsonParse from provider-utils.

    • Normalize a bare https://api.anthropic.com base URL to include /v1.

  34. 4.0.5

    1 Jul 2026

    Only updates a dependency:@ai-sdk/provider-utils 5.0.3

  35. 4.0.4

    30 Jun 2026
    • Feat (provider/anthropic): add claude-sonnet-5 model id

  36. 4.0.3

    30 Jun 2026
  37. 4.0.2

    29 Jun 2026
    • anthropic: Correctly map delta type when code execution tools are used

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.