@ai-sdk/anthropic migration guide
Review @ai-sdk/anthropic v4 model annotations and the authToken type change in 4.0.90, with release guides and coverage limits.
These guides cover the AI SDK Anthropic adapter, rather than the separate @anthropic-ai/sdk client. The 4.0 migration changes the shared provider types used by adapter models. A later 4.0.90 change affects authToken on AnthropicProviderSettings, which needs a separate review of credential handling.
Choose your migration path
- Align model annotations with provider v4: Review LanguageModelV3 and ProviderV3 annotations on values produced by this adapter. Confirm where the value comes from before changing the annotation; a custom v3 implementation is not necessarily broken.
- Review the authToken type change: AnthropicProviderSettings declares authToken with another type. Check code that supplies or reads it against the new declaration. Code that only passes settings along may need no edit.
Check your upgrade
Check your installed version in the manifest and lockfile, then read the release pages your upgrade crosses. Run npx emendant scan to find supported changes in TypeScript and JavaScript source without editing your files. Use npx emendant fix --dry-run to preview deterministic patches where available. The preview does not install dependencies, run your checks or call a model. Assisted patches need a named model provider and a fix run without --dry-run. After updating dependencies, run your typecheck and tests and review the patch grades in the fix guide.
Coverage and limits
Both release guides describe possible assisted fixes, which need a named model provider. A type reference alone does not establish affected member use, and an object passed directly to createAnthropic without naming the settings type is not reported. Test authentication and model calls after the upgrade.
The linked release pages list covered findings, possible fixes and tagged sources. A clean scan does not prove that every migration step is complete. Read the supported projects guide for the scan's scope.
@ai-sdk/anthropic release pages
- @ai-sdk/anthropic 4.x breaking changes: 4.0.90 to 4.0.98
3 releases, 4.0.90 to 4.0.98, released 27 October 2026 to 6 November 2026. 4 breaking, 0 deprecations. - @ai-sdk/anthropic 4.0.0: v4 model type migration
@ai-sdk/anthropic 4.0.0, released 25 June 2026. 1 breaking, 0 deprecations.
Releases without a page here may still be in the feed. Run emendant feed status to see what your snapshot holds.