@ai-sdk/anthropic
4.0.106 · 17 Nov 2026Apache-2.024.5M / weekRepositoryHomepagenpmAtom feed
4.0.106 is the newest release of 4.x.
In short
7 breaking1 removed9 new10 fixed3 internal
- Breaking
anthropic: Remove cacheCreationInputTokens from providerMetadata
- Breaking
ai: Add support for uploading provider skills using the provider references abstraction
- Breaking
Remove CommonJS exports from all packages. All packages are now ESM-only (
"type": "module"). Consumers usingrequire()must switch to ESMimportsyntax. - Breaking
provider: Add new top-level reasoning parameter to spec and support it in
generateTextandstreamText - Breaking
Start v7 pre-release
- Breaking
Make provider implementations code patterns more consistent, including renaming certain exported symbols
- Breaking
Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
- Removed
Remove stale
effort-2025-11-24beta 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.
Release note
The section about @ai-sdk/anthropic of a note shared by several packages.
Major Changes
- Breaking
anthropic: Remove cacheCreationInputTokens from providerMetadata
- Breaking
ai: Add support for uploading provider skills using the provider references abstraction
- Breaking
Remove CommonJS exports from all packages. All packages are now ESM-only (
"type": "module"). Consumers usingrequire()must switch to ESMimportsyntax. - Breaking
provider: Add new top-level reasoning parameter to spec and support it in
generateTextandstreamText - Breaking
Start v7 pre-release
- Breaking
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
provider/anthropic: Fix remaining errors with Anthropic
code_executiontool dynamic calls from latestweb_fetchorweb_searchAdd AI Gateway hint to provider READMEs
anthropic: Reorder assistant content b/w client and provider tool use
Feat (provider/anthropic): support passing metadata.user_id
anthropic: Add the new advisor tool
- Removed
Remove stale
effort-2025-11-24beta 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. provider/anthropic: Automatically use sandbox in bash tool
Trigger release for all packages after provenance setup
More precise default message for tool execution denial
anthropic: Skip passing beta header for tool search tools
anthropic: Preserve the error code returned by model
- Breaking
Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
Feat (provider/anthropic): add support for inference_geo provider option
Trigger initial canary release
provider: Preserve error type prefix in getErrorMessage
provider-utils: Add
spawnCommandmethod toExperimental_Sandboxto allow for detached command executionprovider: Change file part data property to be tagged with a type and remove the image part type
provider: Align tool result output content file part types with top-level message file part types
provider/anthropic: Add support for
claude-fable-5and thefallbacksAPI parameterAdd workflow serialization support to all provider models.
@ai-sdk/provider-utils: NewserializeModel()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:
headersis now optional in provider config types. This is non-breaking — existing code that passesheaderscontinues to work. Custom provider implementations that construct model configs manually can now omitheaders, which is useful when models are deserialized from a workflow step boundary where auth is provided separately.All provider model classes now include
WORKFLOW_SERIALIZEandWORKFLOW_DESERIALIZEstatic methods, enabling them to cross workflow step boundaries without serialization errors.provider/anthropic: Add support for Opus 4.7 and relevant API enhancements
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.