Solution skill
ai vs @ai-sdk/openai vs @ai-sdk/react: which package does what in v7
Complete solution
Shows how to fix ai vs @ai-sdk/openai vs @ai-sdk/react: which package does what in v7. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Install only the ones you use. - @ai-sdk/react, @ai-sdk/svelte, @ai-sdk/vue, @ai-sdk/solid, @ai-sdk/angular: UI framework bindings. useChat, useCompletion, useObject live here, not in ai. - @ai-sdk/otel: OpenTelemetry integration for telemetry. @ai-sdk/mcp: MCP client support. Newcomers install the wrong package constantly. Install @latest and check its declared ai peer. Keep zod at ^4.1.8 or later.
When to use
You are seeing this: The map: - ai: the core. streamText, generateText, tool, ToolLoopAgent, convertToModelMessages, createUIMessageStreamResponse, DefaultChatTransport, telemetry. Use this skill when you run into "ai vs @ai-sdk/openai vs @ai-sdk/react: which package does what in v7".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: 4.1.8. If you are on something much newer or older, the details may have shifted.
Newcomers install the wrong package constantly. The map:
- ai: the core. streamText, generateText, tool, ToolLoopAgent, convertToModelMessages, createUIMessageStreamResponse, DefaultChatTransport, telemetry. The Vercel AI Gateway provider ships inside ai.
- @ai-sdk/openai, @ai-sdk/anthropic, @ai-sdk/google, @ai-sdk/xai, @ai-sdk/azure, @ai-sdk/amazon-bedrock, @ai-sdk/google-vertex, @ai-sdk/mistral, @ai-sdk/groq, @ai-sdk/deepseek, and more: provider packages. One per provider. Install only the ones you use.
- @ai-sdk/react, @ai-sdk/svelte, @ai-sdk/vue, @ai-sdk/solid, @ai-sdk/angular: UI framework bindings. useChat, useCompletion, useObject live here, not in ai.
- @ai-sdk/otel: OpenTelemetry integration for telemetry. @ai-sdk/mcp: MCP client support.
Version facts that bite:
- Framework packages have independent majors. In the ai 7 era, @ai-sdk/react is 4.x, @ai-sdk/svelte is 5.x, @ai-sdk/vue is 4.x. There is no @ai-sdk/react@7. Install @latest and check its declared ai peer.
- The old community packages (ai/openai style imports) are long gone. Since v4 everything is @ai-sdk/* scoped. Tutorials importing from 'ai/openai' are stale.
- Provider packages depend on @ai-sdk/provider and @ai-sdk/provider-utils. Mismatched provider majors against ai cause UnsupportedModelVersionError and LanguageModelV1 type errors. Upgrade them together.
- The application package is named ai, not @ai-sdk/ai. Import errors from 'ai'; provider-level errors can also come from '@ai-sdk/provider' directly.
- Keep zod at ^4.1.8 or later. The SDK's tool and object schemas assume it, and older zod tanks TypeScript performance.
Evidence
Verified against the live AI SDK docs 2026-09-26. The providers-and-models page lists the @ai-sdk/* provider packages and community providers. The errors reference page states the application package is named ai, not @ai-sdk/ai. npm registry confirms ai 7.0.116 with @ai-sdk/react 4.0.119 depending on ai 7.0.116, @ai-sdk/svelte 5.0.116, @ai-sdk/vue 4.0.116. The v5 migration guide documents the zod 4.1.8 requirement.
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_arE9dQ1SQ1FElWb_sQfH2Q" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">ai vs @ai-sdk/openai vs @ai-sdk/react: which package does what in v7 <span>— Vectle</span></a>