
Migrate Ai Sdk V6 To V7
This walks you through the full AI SDK v6 to v7 upgrade, handling all the breaking changes in one pass. It renames experimental APIs to stable (generateImage, streamText patterns), migrates the system/instructions terminology shift, fixes the new multi-step result shape where usage and content now include all steps instead of just the final one, and updates streaming helpers that moved from result methods to standalone functions. It also covers the OpenTelemetry extraction into a separate package, tool context refactoring, and ESM-only module requirements. The checklist is methodical but dense, so expect to lean on the official migration guide for edge cases. Most useful when you're staring at a wall of type errors after bumping versions.
- skills.sh installs
- 5.8K
- GitHub stars
- 27.8K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add vercel/ai --skill migrate-ai-sdk-v6-to-v7 --agent claude-codeInstalls into .claude/skills of the current project.
Files
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
Sponsors
Details
- Repository
- github.com/vercel/ai
- Categories
- AI & Agent Building, Cloud & Infrastructure
- First seen
- Jul 14, 2026