@ai-sdk/provider migration guide
Review selected @ai-sdk/provider 4.x changes to evaluation, decision and finish-reason types, with release links and detection limits.
This hub is for code that names the shared AI SDK provider interfaces. It covers selected 4.x type changes, rather than a general migration from provider specification v3 to v4. Applications using a provider adapter should also read that adapter's release guide.
Choose your migration path
- Review evaluation type deprecations: Several experimental evaluation interfaces are deprecated. A deprecation is a reason to review the replacement guidance, not proof that the old import has stopped resolving.
- Check evaluation and decision call options: This release changes members of the experimental call option types. Later listed releases also change the evaluation and decision model interfaces, so review each release your upgrade crosses.
- Check the finish-reason type: LanguageModelV4FinishReason changes the declared type of unified. Review code that supplies or reads that member against the release declaration.
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
A type-reference finding says your code names an affected type. It does not establish that a changed member reaches that code. Review the actual member use before requesting an assisted patch, and check custom provider implementations with your own typecheck and tests.
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/provider release pages
- @ai-sdk/provider 4.x breaking changes: 4.0.22 to 4.0.40
6 releases, 4.0.22 to 4.0.40, released 5 October 2026 to 1 December 2026. 6 breaking, 10 deprecations.
Releases without a page here may still be in the feed. Run emendant feed status to see what your snapshot holds.