migrate-ai-sdk-v6-to-v7

Migrates applications from Vercel AI SDK 6.x to AI SDK 7.0 using a structured checklist.

1|Updated Jun 17, 2026
One-click install
npx skills add https://github.com/Lento47/arcana --skill migrate-ai-sdk-v6-to-v7-lento47
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: migrate-ai-sdk-v6-to-v7
Source: https://github.com/Lento47/arcana/tree/main/.agents/skills/migrate-ai-sdk-v6-to-v7
Command: npx skills add https://github.com/Lento47/arcana --skill migrate-ai-sdk-v6-to-v7-lento47

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Upgrading from Vercel AI SDK 6.x to 7.0 involves dozens of breaking changes across APIs, streaming, telemetry, tools, and result shapes, and missing any one of them causes type errors or silent behavior changes. This Skill provides a systematic migration workflow and a complete rename/change checklist so nothing is overlooked. ## Core Features & Use Cases - Step-by-step migration workflow: Inspect package.json, upgrade packages, enforce Node.js >=22 and ESM-only requirements, then migrate only the patterns that actually exist in the codebase. - Comprehensive breaking-change checklist: Covers renamed APIs (system to instructions, fullStream to stream, onFinish to onEnd), telemetry migration to @ai-sdk/otel, multi-step result shape changes, and deprecated stream response helpers. - Package-specific guidance: Handles MCP redirect defaults, Vue Chat deprecation, Anthropic cache token changes, and Google provider renames. - Use Case: A team upgrading a Next.js chat application from AI SDK 6 to 7 uses this Skill to find every occurrence of system, fullStream, and experimental_* options, apply the correct replacements, and validate with typecheck and targeted tests. ## Quick Start Ask the agent to migrate this project from AI SDK v6 to v7 and fix all resulting type errors.

Frequently Asked Questions about migrate-ai-sdk-v6-to-v7

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate from Vercel AI SDK 6 to AI SDK 7?▼

Upgrade all ai and @ai-sdk packages, ensure Node.js 22 or later with ESM imports, then apply the breaking-change checklist: rename system to instructions, fullStream to stream, and onFinish to onEnd. Finish by running typecheck and targeted tests.

What breaking changes are in AI SDK 7.0?▼

Key changes include system renamed to instructions, fullStream renamed to stream, lifecycle callbacks renamed (onFinish to onEnd, onStepFinish to onStepEnd), telemetry moved to @ai-sdk/otel, and top-level result fields now aggregating all steps with finalStep holding final-step-only data.

Does AI SDK 7 require a specific Node.js version?▼

Yes, AI SDK 7 requires Node.js 22 or later, and all AI SDK packages are ESM-only. Replace require() calls with ESM imports and add "type": "module" to package.json or use .mjs files where needed.

How do I set up OpenTelemetry in AI SDK 7?▼

Install @ai-sdk/otel and call registerTelemetry(new OpenTelemetry(...)) at application startup, since OpenTelemetry moved out of the core ai package. Telemetry is enabled by default once registered; use isEnabled: false to opt out per call.

Why did result.totalUsage stop working after upgrading to AI SDK 7?▼

In AI SDK 7, result.usage now includes all steps and result.totalUsage is deprecated. Use result.finalStep.usage if you need the previous final-step-only usage numbers.