Agent skill · software engineering · vercel

migrate-ai-sdk-v6-to-v7

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.

Why this skill is useful

Provides detailed migration steps and specific code changes for upgrading from AI SDK v6 to v7 that the AI wouldn't reliably generate on its own.

What it needs

About 4k tokens when loaded. Last updated 2026-08-07. 26,057 stars on the source repository.

What this skill does

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 1. Ensure the user has a clean backup or committed baseline before editing. 2. Inspect package.json and lockfiles to identify installed ai, @ai-sdk/, provider, UI, MCP, and telemetry packages. 3. Upgrade AI SDK packages to latest versions, and add @ai-sdk/otel only if the project uses OpenTelemetry spans. 4. Update runtime and module assumptions: Node.js must be >=22, and AI SDK packages are ESM-only. Replace require() imports with ESM imports and add "type": "module" or use .mjs where needed. 5. 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 experimentalcustomProvider -> customProvider. experimentalgenerateImage -> generateImage; ExperimentalGenerateImageResult -> GenerateImageResult. experimentaltranscribe -> transcribe; ExperimentalTranscriptionResult -> TranscriptionResult. experimentalgenerateSpeech -> generateSpeech; ExperimentalSpeechResult -> SpeechResult. experimentaloutput option/result -> output option/result. CallSettings -> LanguageModelCallOptions & Omit<RequestOptions, 'timeout'>; prepareCallSettings -> prepareLanguageModelCallOptions. stepCountIs -> isStepCount. Prompts and Steps Rename top-level system to instructions for generateText, streamText, generateObject, streamObject, and streamUI. Move { role: 'system' } messages from prompt or messages into top-level instructions. Only use allowSystemInMessages: true for trusted persisted messages. Rename experimentalprepareStep to prepareStep. In prepareStep, rename returned system to instructions. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills vercel/migrate-ai-sdk-v6-to-v7

View the source on GitHub

Browse the @skills marketplace