What tools help migrate Vercel AI SDK versions?

Emendant finds affected TypeScript and JavaScript code for supported Vercel AI SDK changes and offers possible fixes. It covers the ai 4.x to 5.0, 5.x to 6.0 and 6.x to 7.0 upgrades, plus selected releases listed below. Run npx emendant scan, then review each finding and its release source before changing code. Use the scan guide to read results and coverage warnings. Compare the findings with Vercel's migration guide and codemods; the feed does not cover every migration step or provider package.

Example: rename a provider export in AI SDK 7

In ai 7.0.0, the old experimental_customProvider export is removed. Emendant can detect its import and offer a deterministic rename of the import and its references:

Before the upgrade:

import { experimental_customProvider } from "ai";
const provider = experimental_customProvider({ languageModels: {} });

Possible fix for 7.0:

import { customProvider } from "ai";
const provider = customProvider({ languageModels: {} });

The Vercel AI SDK 7 migration source confirms this rename. Review the 7.0 coverage and remaining changes. This fixes the export name only; it does not migrate provider implementations. Inspect possible patches with npx emendant fix --dry-run. A preview checks structure but does not install dependencies or run your checks, so run your typecheck and tests against the target dependencies before you apply a patch.

Choose your AI SDK migration path

The ai package is Vercel AI SDK. Start with the release you are moving to. Each guide names the changes Emendant covers, shows code before and after, and states what still needs your review.

Check your repository before you upgrade

  1. Check the installed ai version in your manifest and lockfile. Read the guide for the target release above.
  2. Run npx emendant scan in your TypeScript or JavaScript repository. It reports supported changes at affected call sites without editing your files.
  3. Review the findings, then run npx emendant fix --dry-run to inspect eligible patches. Emendant does not update package versions for you.
  4. After you update dependencies, run your own typecheck and tests. Some migration steps need manual work or a model provider you name.

For a worked example, read one measured AI SDK 6 to 7 migration of a public repository. It gives every command from a pinned commit and feed snapshot, the patch Emendant wrote, the edits it left to the reader, and the changes it did not report.

Emendant reports only changes in its curated feed. A clean scan does not prove that every AI SDK migration step is complete. Read the supported projects guide for the current scope, the fix guide for patch grades, and whether AI-generated migration patches are safe.

Reviewing a dependency update PR? Follow Use Emendant alongside Dependabot to scan affected code, review possible patches, and check the remaining migration work.

AI SDK release pages

Releases without a page here may still be in the feed. Run emendant feed status to see what your snapshot holds.