PackageTrack

npm · #4482

@ai-sdk/anthropic

4.0.44vercel/ai

Release timeline

588 releases since 2024
20252026

Releases

  1. 4.0.4426 Aug 2026
    Release notes

    Patch Changes

    Open source →
  2. 4.0.4225 Aug 2026
    Release notes

    Patch Changes

    • 591d25b: feat: 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.
    • Updated dependencies [591d25b]
    Open source →
  3. 4.0.4122 Aug 2026
    Release notes

    Patch Changes

    Open source →
  4. 4.0.4019 Aug 2026
    Release notes

    Patch Changes

    Open source →
  5. 4.0.3914 Aug 2026
    Release notes

    Patch Changes

    • 4579b08: Preserve Anthropic server-tool caller metadata in multi-turn conversations.
    Open source →
  6. 4.0.3811 Aug 2026
    Release notes

    Patch Changes

    Open source →
  7. 4.0.3710 Aug 2026
    Release notes

    Patch Changes

    Open source →
  8. 4.0.367 Aug 2026
    Release notes

    Patch Changes

    Open source →
  9. 4.0.357 Aug 2026
    Release notes

    Patch Changes

    Open source →
  10. 4.0.347 Aug 2026
    Release notes

    Patch Changes

    • e6415bd: feat(anthropic): add text batch support
    Open source →
  11. 4.0.336 Aug 2026
    Release notes

    Patch Changes

    Open source →
  12. 4.0.326 Aug 2026
    Release notes

    Patch Changes

    • 8b96941: Reject spliced Anthropic generations while allowing duplicate message start events for the active message.
    Open source →
  13. 4.0.304 Aug 2026
    Release notes

    Patch Changes

    Open source →
  14. 4.0.294 Aug 2026
    Release notes

    Patch Changes

    Open source →
  15. 4.0.283 Aug 2026
    Release notes

    Patch Changes

    • 9337ecd: Preserve Anthropic prompt-cache matches by replaying complete code-execution transcripts in their original wire shape.
    • Updated dependencies [79e133c]
    Open source →
  16. 4.0.2731 Jul 2026
    Release notes

    Patch Changes

    • Updated dependencies [5fc7da5]
    • Updated dependencies [93b2acd]
    Open source →
  17. 4.0.2631 Jul 2026
    Release notes

    Patch Changes

    • dc0c28e: Return visible summarized reasoning when generic reasoning enables adaptive thinking.
    • Updated dependencies [fa95504]
    Open source →
  18. 4.0.2530 Jul 2026
    Release notes

    Patch Changes

    • d8210b6: chore: centralize record type guards in provider-utils
    • b192878: feat: add experimental_toolCaller routing to generateText for code mode
    • Updated dependencies [d8210b6]
    • Updated dependencies [b192878]
    Open source →
  19. 4.0.2429 Jul 2026
    Release notes

    Patch Changes

    • Updated dependencies [1659cd5]
    • Updated dependencies [6a5bdff]
    Open source →
  20. 4.0.2328 Jul 2026
    Release notes

    Patch Changes

    • Updated dependencies [0c464d9]
    • Updated dependencies [c49380c]
    Open source →
  21. 4.0.2227 Jul 2026
    Release notes

    Patch Changes

    Open source →
  22. 4.0.2126 Jul 2026
    Release notes

    Patch Changes

    • e29788d: fix(anthropic): report thinking tokens as reasoning token usage
    Open source →
  23. 4.0.2024 Jul 2026
    Release notes

    Patch Changes

    • cbdc990: 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)
    • cbdc990: 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
    • cbdc990: 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)
    Open source →
  24. 4.0.1923 Jul 2026
    Release notes

    Patch Changes

    • 01a596a: fix (provider/anthropic): use current-generation capability defaults for unrecognized Claude model IDs while retaining conservative defaults for legacy Claude and non-Claude models.
    Open source →
  25. 4.0.1821 Jul 2026
    Release notes

    Patch Changes

    • 97de198: Warn when an unknown model uses the default 4096 max output token limit.
    Open source →
  26. 4.0.1721 Jul 2026
    Release notes

    Patch Changes

    • b72fc7c: fix(amazon-bedrock): sanitize unsupported JSON Schema constraints in native Anthropic structured output
    • 9218ebe: fix(provider/anthropic): warn when parallel tool use is requested with JSON tool structured output
    • Updated dependencies [02ffdcb]
    • Updated dependencies [76cb673]
    Open source →
  27. 4.0.1617 Jul 2026
    Release notes

    Patch Changes

    • afcf19c: fix(provider/anthropic): preserve web search citations when replaying assistant messages
    • Updated dependencies [cd06458]
    Open source →
  28. 4.0.1514 Jul 2026
    Release notes

    Patch Changes

    Open source →
  29. 4.0.1413 Jul 2026
    Release notes

    Patch Changes

    • 4be62c1: fix(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.

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

    • Updated dependencies [4be62c1]

    • Updated dependencies [7805e4a]

    • Updated dependencies [cd12954]

    Open source →
  30. 4.0.1210 Jul 2026
    Release notes

    Patch Changes

    • 308a519: chore: enforce consistent imports from zod/v4 instead of zod
    Open source →
  31. 4.0.119 Jul 2026
    Release notes

    Patch Changes

    Open source →
  32. 4.0.108 Jul 2026
    Release notes

    Patch Changes

    Open source →
  33. 4.0.97 Jul 2026
    Release notes

    Patch Changes

    • 2e45d9c: fix(anthropic): wrap invalid tool input in object
    Open source →
  34. 4.0.84 Jul 2026
    Release notes

    Patch Changes

    • 0aa0ff3: fix(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.

    Open source →
  35. 4.0.72 Jul 2026
    Release notes

    Patch Changes

    • 5c5c0f5: Add experimental streaming transcription support for transcription models, including OpenAI gpt-realtime-whisper and xAI WebSocket STT.
    • Updated dependencies [5c5c0f5]
    Open source →
  36. 4.0.62 Jul 2026
    Release notes

    Patch Changes

    • c6f5e62: Prevent prototype pollution when synchronously parsing provider JSON inputs and expose secureJsonParse from provider-utils.
    • 679c52a: Normalize a bare https://api.anthropic.com base URL to include /v1.
    • Updated dependencies [c6f5e62]
    Open source →
  37. 4.0.51 Jul 2026
    Release notes

    Patch Changes

    Open source →
  38. 4.0.430 Jun 2026
    Release notes

    Patch Changes

    • c18018c: feat (provider/anthropic): add claude-sonnet-5 model id
    Open source →
  39. 4.0.330 Jun 2026
    Release notes

    Patch Changes

    Open source →
  40. 4.0.229 Jun 2026
    Release notes

    Patch Changes

    • dfffb27: fix(anthropic): correctly map delta type when code execution tools are used
    Open source →
  41. 4.0.127 Jun 2026
    Release notes

    Patch Changes

    Open source →
  42. 4.0.025 Jun 2026
    Release notes

    Major Changes

    • 832f86f: fix(anthropic): remove cacheCreationInputTokens from providerMetadata

    • 34bd95d: feat(ai): add support for uploading provider skills using the provider references abstraction

    • ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only ("type": "module"). Consumers using require() must switch to ESM import syntax.

    • c29a26f: feat(provider): add support for provider references and uploading files as supported per provider

    • 3887c70: feat(provider): add new top-level reasoning parameter to spec and support it in generateText and streamText

    • 8359612: Start v7 pre-release

    • 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols

      For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases.

    Patch Changes

    • e02f041: feat(provider/anthropic): add support for claude-opus-4-8

    • 648705c: fix(provider/anthropic): fix remaining errors with Anthropic code_execution tool dynamic calls from latest web_fetch or web_search

    • 38fc777: Add AI Gateway hint to provider READMEs

    • ee798eb: chore(provider-utils): rename Experimental_Sandbox to Experimental_SandboxSession

    • e748b35: chore: update v3 specs to v4

    • 19c5ee2: fix(anthropic): reorder assistant content b/w client and provider tool use

    • 0ee8aec: feat (provider/anthropic): support passing metadata.user_id

    • c012d57: feat(anthropic): sanitize the unsupported JSON schema validation properties

    • 8018480: feat(anthropic): add the new advisor tool

    • e5c4f40: Remove stale effort-2025-11-24 beta header — the extended thinking effort parameter is GA and no longer requires the beta flag. Vertex AI's strict validator was actively rejecting requests with this header.

    • f57c702: fix(anthropic): allow both temperature and topP for non-Anthropic models using the Anthropic-compatible API

      The temperature/topP mutual exclusivity check now only applies to known Anthropic models (model IDs starting with claude-). Non-Anthropic models using the Anthropic-compatible API (e.g. Minimax) can now send both parameters as required by their APIs.

    • 2610e84: feat(provider/anthropic): automatically use sandbox in bash tool

    • d848405: feat: add optional abortSignal parameters to sandbox command execution

    • 87d1723: chore(anthropic): remove unnecessary messages affix from Anthropic symbols and files

    • 9f0e36c: trigger release for all packages after provenance setup

    • acdbf84: Handle errors from anthropic websearch tool

    • ad0b376: fix(provider/anthropic): stop adding fine-grained-tool-streaming-2025-05-14 beta for claude-opus-4-7

    • 58a2ad7: fix: more precise default message for tool execution denial

    • 21d1ee3: fix(anthropic): skip passing beta header for tool search tools

    • 1fe058b: fix(anthropic): preserve the error code returned by model

    • 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.

    • 09bd27b: feat (provider/anthropic): add support for inference_geo provider option

    • 0c4c275: trigger initial canary release

    • 6fd51c0: fix(provider): preserve error type prefix in getErrorMessage

    • e311194: feat(ai): allow passing provider instance to uploadFile and uploadSkill as shorthand

    • 6c93e36: feat(provider-utils): add spawnCommand method to Experimental_Sandbox to allow for detached command execution

    • 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type

    • 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles

    • 5463d0d: feat(provider): align tool result output content file part types with top-level message file part types

    • b8396f0: trigger initial beta release

    • 6b4d325: feat(provider/anthropic): add support for claude-fable-5 and the fallbacks API parameter

    • f05a40d: fix(vertex): throw warning when strict: true for vertexAnthropic

    • a6617c5: feat(provider-utils): add readFile and writeFile plus convenience wrappers to Experimental_Sandbox abstraction

    • a464505: fix(anthropic): propagate toModelOutput providerOption to anthropic tool results

    • 90e2d8a: chore: fix unused vars not being flagged by our lint tooling

    • b3976a2: Add workflow serialization support to all provider models.

      @ai-sdk/provider-utils: New serializeModel() helper that extracts only serializable properties from a model instance, filtering out functions and objects containing functions. Third-party provider authors can use this to add workflow support to their own models.

      All providers: headers is now optional in provider config types. This is non-breaking — existing code that passes headers continues to work. Custom provider implementations that construct model configs manually can now omit headers, which is useful when models are deserialized from a workflow step boundary where auth is provided separately.

      All provider model classes now include WORKFLOW_SERIALIZE and WORKFLOW_DESERIALIZE static methods, enabling them to cross workflow step boundaries without serialization errors.

    • 0d8f107: feat(provider/anthropic): add support for Opus 4.7 and relevant API enhancements

    • ff5eba1: feat: roll image-* tool output types into their equivalent file-* types

    Open source →
  43. 4.0.0-canary.6612 Jun 2026pre-release
    Release notes

    Patch Changes

    • Updated dependencies [aeda373]
    • Updated dependencies [375fdd7]
    • Updated dependencies [b4507d5]
    Open source →
  44. 4.0.0-canary.6511 Jun 2026pre-release
    Release notes

    Patch Changes

    Open source →
  45. 4.0.0-canary.649 Jun 2026pre-release
    Release notes

    Patch Changes

    • 6b4d325: feat(provider/anthropic): add support for claude-fable-5 and the fallbacks API parameter
    Open source →
  46. 4.0.0-canary.635 Jun 2026pre-release
    Release notes

    Patch Changes

    Open source →
  47. 4.0.0-canary.624 Jun 2026pre-release
    Release notes

    Patch Changes

    • ee798eb: chore(provider-utils): rename Experimental_Sandbox to Experimental_SandboxSession
    • Updated dependencies [ee798eb]
    • Updated dependencies [daf6637]
    Open source →
  48. 4.0.0-canary.6128 May 2026pre-release
    Release notes

    Patch Changes

    • e02f041: feat(provider/anthropic): add support for claude-opus-4-8
    Open source →
  49. 4.0.0-canary.6026 May 2026pre-release
    Release notes

    Patch Changes

    • 6c93e36: feat(provider-utils): add spawnCommand method to Experimental_Sandbox to allow for detached command execution
    • Updated dependencies [6c93e36]
    • Updated dependencies [f617ac2]
    Open source →
  50. 4.0.0-canary.5922 May 2026pre-release
    Release notes

    Patch Changes

    • 648705c: fix(provider/anthropic): fix remaining errors with Anthropic code_execution tool dynamic calls from latest web_fetch or web_search
    Open source →
  51. 4.0.0-canary.5822 May 2026pre-release
    Release notes

    Patch Changes

    • acdbf84: Handle errors from anthropic websearch tool
    Open source →
  52. 4.0.0-canary.5719 May 2026pre-release
    Release notes

    Patch Changes

    Open source →
  53. 4.0.0-canary.5515 May 2026pre-release
    Release notes

    Patch Changes

    • a464505: fix(anthropic): propagate toModelOutput providerOption to anthropic tool results
    • Updated dependencies [28dfa06]
    • Updated dependencies [e93fa91]
    Open source →
  54. 4.0.0-canary.5413 May 2026pre-release
    Release notes

    Patch Changes

    Open source →
  55. 4.0.0-canary.5313 May 2026pre-release
    Release notes

    Patch Changes

    Open source →
  56. 4.0.0-canary.5212 May 2026pre-release
    Release notes

    Patch Changes

    • 8018480: feat(anthropic): add the new advisor tool
    Open source →
  57. 4.0.0-canary.5111 May 2026pre-release
    Release notes

    Patch Changes

    Open source →
  58. 4.0.0-canary.508 May 2026pre-release
    Release notes

    Patch Changes

    • d848405: feat: add optional abortSignal parameters to sandbox command execution
    • Updated dependencies [d848405]
    Open source →
  59. 4.0.0-canary.498 May 2026pre-release
    Release notes

    Patch Changes

    Open source →
  60. 4.0.0-canary.487 May 2026pre-release
    Release notes

    Patch Changes

    Open source →