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.
npx skills add https://github.com/vercel/ai --skill migrate-ai-sdk-v6-to-v7
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.
package.json and lockfiles to identify installed ai, @ai-sdk/*, provider, UI, MCP, and telemetry packages.@ai-sdk/otel only if the project uses OpenTelemetry spans.>=22, and AI SDK packages are ESM-only. Replace require() imports with ESM imports and add "type": "module" or use .mjs where needed.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.
experimental_customProvider -> customProvider.experimental_generateImage -> generateImage; Experimental_GenerateImageResult -> GenerateImageResult.experimental_transcribe -> transcribe; Experimental_TranscriptionResult -> TranscriptionResult.experimental_generateSpeech -> generateSpeech; Experimental_SpeechResult -> SpeechResult.experimental_output option/result -> output option/result.CallSettings -> LanguageModelCallOptions & Omit<RequestOptions, 'timeout'>; prepareCallSettings -> prepareLanguageModelCallOptions.stepCountIs -> isStepCount.system to instructions for generateText, streamText, generateObject, streamObject, and streamUI.{ role: 'system' } messages from prompt or messages into top-level instructions. Only use allowSystemInMessages: true for trusted persisted messages.experimental_prepareStep to prepareStep.prepareStep, rename returned system to instructions.experimental_repairToolCall, use { instructions } instead of { system }.prepareStep behavior: returned instructions and messages now carry forward into later steps. If code depended on one-step-only overrides, rebuild from initialInstructions, initialMessages, and responseMessages explicitly.experimental_onStart -> onStart.experimental_onStepStart -> onStepStart.onFinish -> onEnd.onStepFinish -> onStepEnd.embed, embedMany, and rerank, experimental_onFinish -> onEnd.instructions instead of system.usage.cachedInputTokens -> usage.inputTokenDetails.cacheReadTokens.usage.reasoningTokens -> usage.outputTokenDetails.reasoningTokens.ai; install @ai-sdk/otel and call registerTelemetry(new OpenTelemetry(...)) at app startup.isEnabled: true; use isEnabled: false to opt out per call.experimental_telemetry.tracer into the OpenTelemetry constructor.experimental_telemetry -> telemetry.onRerankFinish -> onRerankEnd, onEmbedFinish -> onEmbedEnd. Update tracing-channel subscribers for the same event type names.experimental_include -> include.includeRawChunks -> include.rawChunks.request.body or response.body, opt in with include.requestBody and, for generateText, include.responseBody.StreamTextResult.fullStream -> stream.streamText onChunk now receives all stream parts, including lifecycle, boundary, finish, abort, and error parts. Guard by chunk.type before assuming text/tool/raw content.step.response.messages is no longer accumulated across previous steps. Use result.responseMessages for the full response message history, or flatten result.steps.experimental_onToolCallStart -> onToolExecutionStart, experimental_onToolCallFinish -> onToolExecutionEnd.experimental_context -> context.runtimeContext for orchestration state, declare per-tool contextSchema, and pass per-tool values through toolsContext.needsApproval from tool() / dynamicTool() into per-call or agent toolApproval.experimental_activeTools -> activeTools.ToolCallOptions -> ToolExecutionOptions.isToolOrDynamicToolUIPart -> isToolUIPart.{ type: 'media' } is removed; use { type: 'file-data' }.toModelOutput image-*, file-*, file-id, and image-file-id variants to canonical { type: 'file', mediaType, data: { type: 'data' | 'url' | 'reference', ... } }.{ type: 'image', image, mediaType? } is deprecated; use { type: 'file', mediaType: 'image' | 'image/*', data }.reasoning-file content type in exhaustive switches, renderers, serializers, and validators.reasoning, remove overlapping provider-specific reasoning settings from providerOptions unless provider-specific settings intentionally take precedence.result.usage now includes all steps; result.totalUsage is deprecated. Use result.finalStep.usage for final-step-only usage.content, toolCalls, staticToolCalls, dynamicToolCalls, toolResults, staticToolResults, dynamicToolResults, files, sources, and warnings now include all steps. Use finalStep for previous final-step-only behavior.reasoning, reasoningText, request, response, and providerMetadata are deprecated for final-step data. Use result.finalStep.*; for streamText, await result.finalStep.onEnd events.The streamText result helper methods are deprecated. Replace result methods with top-level stateless helpers:
result.toUIMessageStream(...) -> toUIMessageStream({ stream: result.stream, ... }).result.toUIMessageStreamResponse(...) -> toUIMessageStream(...) plus createUIMessageStreamResponse({ stream }).result.pipeUIMessageStreamToResponse(response, ...) -> toUIMessageStream(...) plus pipeUIMessageStreamToResponse({ response, stream }).result.toTextStreamResponse() -> toTextStream({ stream: result.stream }) plus createTextStreamResponse({ stream }).result.pipeTextStreamToResponse(response) -> toTextStream({ stream: result.stream }) plus pipeTextStreamToResponse({ response, stream }).MCPTransportConfig.redirect now defaults to 'error'. Only set redirect: 'follow' for trusted MCP servers that rely on redirects.@ai-sdk/vue Chat class is deprecated. Prefer useChat, including getter/ref init for reactive chat inputs.@ai-sdk/google-vertex/anthropic: providerMetadata.anthropic.cacheCreationInputTokens was removed. Use usage.inputTokenDetails.cacheWriteTokens; raw Anthropic usage remains at finalStep.providerMetadata?.anthropic?.usage.GoogleGenerativeAI* types, classes, and functions to Google*, e.g. createGoogleGenerativeAI -> createGoogle. The google entry point is unchanged.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.
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Take vercel/migrate-ai-sdk-v6-to-v7 from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.