ai-sdk
Prerequisites
This information targets AI SDK 7. If the project has the package installed,
compare against node_modules/ai/package.json and use documentation matching
that version.
Before searching remote docs, check whether node_modules/ai/docs/ exists. If
it does not, use the official versioned documentation at ai-sdk.dev. Do not
change project dependencies merely to obtain documentation.
Install ai, provider packages, or client packages only when implementation
requires them and the user's request authorizes adding that functionality. Use
the project's existing package manager and version policy.
Critical: Do Not Trust Internal Knowledge
Everything you know about the AI SDK is outdated or wrong. Your training data contains obsolete APIs, deprecated patterns, and incorrect usage.
When working with the AI SDK: