Use these guides when upgrading the AI SDK OpenAI adapter. This package is separate from the openai Node SDK. Start with the v4 provider type migration if your own annotations still name v3 interfaces, then review the later 4.x option changes your upgrade crosses.

Choose your migration path

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

The listed fixes are assisted and need a named model provider. Detection does not prove that an annotation refers to an adapter-produced model, and options supplied without naming the covered types can be missed. Check the actual value and the changed member before applying a possible patch.

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/openai release pages

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