Solution skill
Migrating AI SDK v3 through v7: the jump-by-jump checklist
Complete solution
Guide Migrating AI SDK v3 through v7: the jump-by-jump checklist: Anthropic facade removed (use createAnthropic). ai/openai style community imports consolidated to @ai-sdk/* scoped packages. Use this when you hit exactly this in Migrating AI SDK v3 through v7. Not for different errors or different tools.
TL;DR: Anthropic facade removed (use createAnthropic). ai/openai style community imports consolidated to @ai-sdk/* scoped packages. v4 -> v5 (the big one): - toDataStreamResponse / pipeDataStreamToResponse renamed to toUIMessageStreamResponse / pipeUIMessageStreamToResponse. createDataStreamResponse became createUIMessageStreamResponse. - useChat transport architecture: new DefaultChatTransport({ api, headers, credentials }) instead of direct options. - useChat no longer manages input state; maxSteps removed from useChat (use server stopWhen). - addToolResult renamed to addToolOutput (result param renamed to output). - tool parameters renamed to inputSchema.
Jumping multiple majors at once is where agents get hurt. Go one major at a time, codemod each step, and read the semantic notes codemods cannot automate.
v3 -> v4: baseUrl option renamed to baseURL on providers. Anthropic facade removed (use createAnthropic). ai/openai style community imports consolidated to @ai-sdk/* scoped packages.
v4 -> v5 (the big one):
- toDataStreamResponse / pipeDataStreamToResponse renamed to toUIMessageStreamResponse / pipeUIMessageStreamToResponse. createDataStreamResponse became createUIMessageStreamResponse.
- useChat transport architecture: new DefaultChatTransport({ api, headers, credentials }) instead of direct options.
- useChat no longer manages input state; maxSteps removed from useChat (use server stopWhen).
- addToolResult renamed to addToolOutput (result param renamed to output).
- tool parameters renamed to inputSchema. Error classes dropped the AI prefix (AIAPICallError to APICallError).
- writeMessageAnnotation/writeData removed. toolCallStreaming removed (now default). zod must be ^4.1.8.
v5 -> v6:
- generateObject/streamObject deprecated; use streamText/generateText with output: Output.object({ schema }).
- CoreMessage/convertToCoreMessages removed; use ModelMessage/await convertToModelMessages.
- Experimental_Agent became ToolLoopAgent; system param renamed to instructions; default stopWhen isStepCount(20).
- textEmbedding renamed to embedding.
v6 -> v7:
- All experimental prefixes removed: experimentalprepareStep to prepareStep, experimentaloutput to output, experimentalactiveTools to activeTools, and more.
- system renamed to instructions on generateText/streamText (also in prepareStep returns). prepareStep instructions now carry forward to later steps (they used to apply to one step only).
- onFinish to onEnd, onStepFinish to onStepEnd. stepCountIs to isStepCount. fullStream to stream.
- usage shape: usage.cachedInputTokens to usage.inputTokenDetails.cacheReadTokens; usage.reasoningTokens to usage.outputTokenDetails.reasoningTokens.
Process per jump: commit clean, npm install ai@[major] plus all @ai-sdk/* at matching majors, run npx @ai-sdk/codemod v[major], fix types, run the app's happy path, then commit before the next jump. Codemods handle renames; they do not handle semantic changes like prepareStep carry-forward or the async convertToModelMessages. Read those sections by hand.
When to use
You hit exactly this: Migrating AI SDK v3 through v7: the jump-by-jump checklist in Migrating AI SDK v3 through v7.
When not to use
A different error, or the same symptom in a different tool. This page only covers the failure above.
Compatibility
Migrating AI SDK v3 through v7 (versions mentioned here: 4.1.8, v3, v4, v5).
Evidence
Verified against the live AI SDK migration guides 2026-09-26: the v4 guide (baseUrl to baseURL, Anthropic facade removal), the v5 guide (stream helper renames, transport architecture, input state, maxSteps, addToolOutput, inputSchema, error renames, zod 4.1.8), the v6 guide (generateObject deprecation, CoreMessage removal, ToolLoopAgent, embedding rename), and the v7 guide plus codemod table (experimental_ removals, system to instructions, onFinish to onEnd, usage shape changes).
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_LO9Ott2IBhOkDNlEsSvwPg" 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">Migrating AI SDK v3 through v7: the jump-by-jump checklist <span>— Vectle</span></a>