migrate-ai-sdk-v6-to-v7
Migrate applications from AI SDK 6.x to AI SDK 7.0
Install / Use
npx skills add vercel/ai --skill migrate-ai-sdk-v6-to-v7Installs into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
AutomationSupported Platforms
Tags
Our assessment of migrate-ai-sdk-v6-to-v7
migrate-ai-sdk-v6-to-v7 scores 84/100 on our quality scale, 2046th of 2,780 Automation skills we index.
Its SKILL.md is 8.2 KB long, well organised into 12 sections and no code examples: a thorough specification that gives an agent plenty to work with.
With 26,924 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so migrate-ai-sdk-v6-to-v7 is actively maintained.
- Our last check on 2026-11-05 found the source still online.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-27. Automated pattern scan on 2026-09-27. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
migrate-ai-sdk-v6-to-v7 compared with similar skills
All 4 of these similar skills score higher than migrate-ai-sdk-v6-to-v7; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| migrate-ai-sdk-v6-to-v7 (this skill)by vercel | 84 | 26.9k | 53d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 112.3k | 8d ago | CLAUDE.md |
| rufloby ruvnet | 100 | 81.9k | today | CLAUDE.md |
| Claude-Code-Game-Studiosby Donchitos | 100 | 39.7k | 7d ago | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 103.6k | 2d ago | MCP Server |
Frequently asked questions
- How do I install migrate-ai-sdk-v6-to-v7?
- Run
npx skills add vercel/ai --skill migrate-ai-sdk-v6-to-v7. The install tabs above show the steps for each supported agent. - Which AI agents does migrate-ai-sdk-v6-to-v7 work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is migrate-ai-sdk-v6-to-v7 safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is migrate-ai-sdk-v6-to-v7 still maintained?
- The repository was last updated about 2 months ago, so migrate-ai-sdk-v6-to-v7 is actively maintained.
Skill content
View source on GitHubname: migrate-ai-sdk-v6-to-v7 description: Migrate applications from AI SDK 6.x to AI SDK 7.0. Use when upgrading Vercel AI SDK packages, fixing v7 migration errors, or when the user mentions AI SDK v6, v7, upgrade, migration, breaking changes, system to instructions, fullStream, telemetry, tool context, or finalStep.
AI SDK 6 to 7 Migration
Use content/docs/08-migration-guides/23-migration-guide-7-0.mdx from the AI SDK repo as the source of truth. This skill is the working checklist; read the guide for exact examples or when behavior is unclear.
Migration Workflow
- Ensure the user has a clean backup or committed baseline before editing.
- Inspect
package.jsonand lockfiles to identify installedai,@ai-sdk/*, provider, UI, MCP, and telemetry packages. - Upgrade AI SDK packages to latest versions, and add
@ai-sdk/otelonly if the project uses OpenTelemetry spans. - Update runtime and module assumptions: Node.js must be
>=22, and AI SDK packages are ESM-only. Replacerequire()imports with ESM imports and add"type": "module"or use.mjswhere needed. - Search for the v6 patterns below, migrate only the code that exists, then run typecheck and targeted tests.
Prefer behavior-preserving changes. When v7 changes semantics, decide whether the app wants the new all-steps behavior or the previous final-step-only behavior.
Core API Changes
experimental_customProvider->customProvider.experimental_generateImage->generateImage;Experimental_GenerateImageResult->GenerateImageResult.experimental_transcribe->transcribe;Experimental_TranscriptionResult->TranscriptionResult.experimental_generateSpeech->generateSpeech;Experimental_SpeechResult->SpeechResult.experimental_outputoption/result ->outputoption/result.CallSettings->LanguageModelCallOptions & Omit<RequestOptions, 'timeout'>;prepareCallSettings->prepareLanguageModelCallOptions.stepCountIs->isStepCount.
Prompts and Steps
- Rename top-level
systemtoinstructionsforgenerateText,streamText,generateObject,streamObject, andstreamUI. - Move
{ role: 'system' }messages frompromptormessagesinto top-levelinstructions. Only useallowSystemInMessages: truefor trusted persisted messages. - Rename
experimental_prepareSteptoprepareStep. - In
prepareStep, rename returnedsystemtoinstructions. - In
experimental_repairToolCall, use{ instructions }instead of{ system }. - Audit
prepareStepbehavior: returnedinstructionsandmessagesnow carry forward into later steps. If code depended on one-step-only overrides, rebuild frominitialInstructions,initialMessages, andresponseMessagesexplicitly.
Lifecycle Callbacks
experimental_onStart->onStart.experimental_onStepStart->onStepStart.onFinish->onEnd.onStepFinish->onStepEnd.- For
embed,embedMany, andrerank,experimental_onFinish->onEnd. - Callback event fields use
instructionsinstead ofsystem.
Usage, Telemetry, and Include Options
usage.cachedInputTokens->usage.inputTokenDetails.cacheReadTokens.usage.reasoningTokens->usage.outputTokenDetails.reasoningTokens.- OpenTelemetry moved out of
ai; install@ai-sdk/oteland callregisterTelemetry(new OpenTelemetry(...))at app startup. - Telemetry is enabled by default once an integration is registered. Remove redundant
isEnabled: true; useisEnabled: falseto opt out per call. - Move
experimental_telemetry.tracerinto theOpenTelemetryconstructor. experimental_telemetry->telemetry.- Telemetry integration callbacks:
onRerankFinish->onRerankEnd,onEmbedFinish->onEmbedEnd. Update tracing-channel subscribers for the same event type names. experimental_include->include.includeRawChunks->include.rawChunks.- Request and response bodies are excluded by default. If code reads
request.bodyorresponse.body, opt in withinclude.requestBodyand, forgenerateText,include.responseBody.
Streaming, Messages, and Tools
StreamTextResult.fullStream->stream.streamTextonChunknow receives all stream parts, including lifecycle, boundary, finish, abort, and error parts. Guard bychunk.typebefore assuming text/tool/raw content.step.response.messagesis no longer accumulated across previous steps. Useresult.responseMessagesfor the full response message history, or flattenresult.steps.- Tool execution callbacks:
experimental_onToolCallStart->onToolExecutionStart,experimental_onToolCallFinish->onToolExecutionEnd. - Tool callback
experimental_context->context. - Split shared runtime data from tool-specific data: use top-level
runtimeContextfor orchestration state, declare per-toolcontextSchema, and pass per-tool values throughtoolsContext. - Move
needsApprovalfromtool()/dynamicTool()into per-call or agenttoolApproval. experimental_activeTools->activeTools.ToolCallOptions->ToolExecutionOptions.isToolOrDynamicToolUIPart->isToolUIPart.
Content Parts and Reasoning
- Tool result
{ type: 'media' }is removed; use{ type: 'file-data' }. - Migrate
toModelOutputimage-*,file-*,file-id, andimage-file-idvariants to canonical{ type: 'file', mediaType, data: { type: 'data' | 'url' | 'reference', ... } }. - User message
{ type: 'image', image, mediaType? }is deprecated; use{ type: 'file', mediaType: 'image' | 'image/*', data }. - Add support for the new
reasoning-filecontent type in exhaustive switches, renderers, serializers, and validators. - When adopting top-level
reasoning, remove overlapping provider-specific reasoning settings fromproviderOptionsunless provider-specific settings intentionally take precedence.
Multi-Step Result Shape
result.usagenow includes all steps;result.totalUsageis deprecated. Useresult.finalStep.usagefor final-step-only usage.- Top-level
content,toolCalls,staticToolCalls,dynamicToolCalls,toolResults,staticToolResults,dynamicToolResults,files,sources, andwarningsnow include all steps. UsefinalStepfor previous final-step-only behavior. - Top-level
reasoning,reasoningText,request,response, andproviderMetadataare deprecated for final-step data. Useresult.finalStep.*; forstreamText, awaitresult.finalStep. - Apply the same result-shape rules to
onEndevents.
Stream Response Helpers
The streamText result helper methods are deprecated. Replace result methods with top-level stateless helpers:
result.toUIMessageStream(...)->toUIMessageStream({ stream: result.stream, ... }).result.toUIMessageStreamResponse(...)->toUIMessageStream(...)pluscreateUIMessageStreamResponse({ stream }).result.pipeUIMessageStreamToResponse(response, ...)->toUIMessageStream(...)pluspipeUIMessageStreamToResponse({ response, stream }).result.toTextStreamResponse()->toTextStream({ stream: result.stream })pluscreateTextStreamResponse({ stream }).result.pipeTextStreamToResponse(response)->toTextStream({ stream: result.stream })pluspipeTextStreamToResponse({ response, stream }).
Package-Specific Checks
- MCP:
MCPTransportConfig.redirectnow defaults to'error'. Only setredirect: 'follow'for trusted MCP servers that rely on redirects. - Vue:
@ai-sdk/vueChatclass is deprecated. PreferuseChat, including getter/ref init for reactive chat inputs. - Anthropic and
@ai-sdk/google-vertex/anthropic:providerMetadata.anthropic.cacheCreationInputTokenswas removed. Useusage.inputTokenDetails.cacheWriteTokens; raw Anthropic usage remains atfinalStep.providerMetadata?.anthropic?.usage. - Google: rename
GoogleGenerativeAI*types, classes, and functions toGoogle*, e.g.createGoogleGenerativeAI->createGoogle. Thegoogleentry point is unchanged.
Validation
Run the project typecheck after edits, then the smallest relevant test suite. Also smoke-test streaming, chat UI, tool execution, telemetry, and multi-step flows if the migration touched them. If type errors remain, search the migration guide for the exact removed or renamed symbol before inventing a workaround.
Related Skills
Agent-Reach
112.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
ruflo
81.9k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
Claude-Code-Game-Studios
39.7kTurn Claude Code into a full game dev studio — 49 AI agents, 72 workflow skills, and a complete coordination system mirroring real studio hierarchy.
Scrapling
103.6k🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
