@ai-sdk/anthropic 4.0.0 moved the whole package to the v4 provider specification. At 3.0.86 AnthropicProvider extended ProviderV3 and every model the package returned was LanguageModelV3; at 4.0.0 the same interface extends ProviderV4 and the models are LanguageModelV4, and no v3 name survives anywhere in the published declarations. Nothing was removed and nothing was renamed, so the code that breaks is your own: a value you declare against one of the v3 types and assign one of this package’s models to.
What changed
- The provider and its models are the v4 types.
AnthropicProviderextendsProviderV4where it extendedProviderV3, and the fiveLanguageModelV3positions in the 3.0.86 declarations areLanguageModelV4at 4.0.0. The export list is byte for byte the same across the two releases:anthropic,createAnthropicand every option type keep their names.@ai-sdk/provider4.0.0 still exportsLanguageModelV3andProviderV3beside the v4 pair, so the old names still resolve and the assignment is what fails, with TS2322, becausespecificationVersiongoes from'v3'to'v4'. aiis not where this surfaces.ai7.0.0 still admitsLanguageModelV3in itsLanguageModelunion, so passing one of these models intogenerateText,streamTextorwrapLanguageModelcompiles before and after. Emendant reports the annotation, never the call.
Before and after
A module that pins this package’s values to the v3 types:
import type { LanguageModelV3, ProviderV3 } from '@ai-sdk/provider';import { anthropic, createAnthropic } from '@ai-sdk/anthropic';
export const claude: LanguageModelV3 = anthropic('claude-sonnet-4-5');
export class Models { readonly provider: ProviderV3 = createAnthropic({ apiKey: 'unused' });}The 4.0.0 declarations say what these values now are, so the annotations follow them:
import type { LanguageModelV4, ProviderV4 } from '@ai-sdk/provider';import { anthropic, createAnthropic } from '@ai-sdk/anthropic';
export const claude: LanguageModelV4 = anthropic('claude-sonnet-4-5');
export class Models { readonly provider: ProviderV4 = createAnthropic({ apiKey: 'unused' });}Two more shapes are reported the same way: anthropic('claude-haiku-4-5') satisfies LanguageModelV3, and a function whose return annotation is LanguageModelV3.
Migration guidance and its limits
Emendant writes this rewrite for you only when you name a model provider, on the command line or in emendant.json. The edit is narrow: the annotation and the specifier it was imported under both move to the v4 name, and no import is added or removed, because @ai-sdk/provider 4.0.0 exports all four names, the two v3 and the two v4. Without a provider the sites are reported with the same guidance and nothing is written, and the compiler finds every one of them once you upgrade.
Review each suggested type change. Confirm that the value comes from @ai-sdk/anthropic before changing its annotation to v4. Keep v3 annotations on your own v3 model implementations and on wrappers that must remain compatible with an older provider. These findings have medium confidence because a v3 annotation can also describe code that needs no migration.
Naming a v3 type is not enough to be reported, and it is not enough to be broken. A parameter annotated LanguageModelV3, a type argument such as Array<LanguageModelV3>, a cast, and an alias body are all left alone: each receives a model rather than building one, and each keeps compiling at 4.0.0. The scan checks the import source, so LanguageModelV3 imported from a local provider module of your own is not this finding.
A clean scan is narrower than the release. This coverage is about the v3 to v4 move and nothing else in 4.0.0, and it says nothing about @ai-sdk/provider itself, which removed no v3 name at its own 4.0.0 and so breaks nothing on its own.
What Emendant detects, fixes and verifies
1 change in @ai-sdk/anthropic 4.0.0. 0 automatic fixes, 1 fixes requiring a model provider you choose, 0 report only. Each patch states which checks passed. Understand patch evidence.
| Change | Severity | Detects | Fix | Verified by |
|---|---|---|---|---|
@ai-sdk/anthropic models are the v4 provider types, so a v3 annotation stops type checkingai-sdk-anthropic-npm-4.0.0-provider-types-v3-to-v4 | Breaking medium confidence |
| Patch, only when you name a model provider | Your typecheck and tests |
emendant explain <change-id> prints any row's entry, guidance and sources at the terminal.
Coverage
Requires emendant@0.3.0 or later. Run emendant feed update to get the latest coverage.
Coverage details
- Snapshot
2026-09-19.4, sequence 26, signed 19 September 2026- Feed entry
feed/npm/@ai-sdk/anthropic/4.0.0.json
emendant feed status shows the snapshot your machine holds.
Primary sources
- package.jsonvercel/ai at @ai-sdk/anthropic@4.0.0
- package.jsonvercel/ai at @ai-sdk/provider@4.0.0
- @ai-sdk/anthropic@4.0.0npm registry, the published package
- @ai-sdk/anthropic@3.0.86npm registry, the published package
- @ai-sdk/provider@4.0.0npm registry, the published package
- @ai-sdk/provider@3.0.10npm registry, the published package
Scan your repository
Find affected code without editing your files.
npx emendant scanThen npx emendant fix writes the patches the table says exist. The getting started guide covers the flags and the patch grades.
Related release pages
Every @ai-sdk/anthropic release page is listed on one page.