AI SDK 6 removes the message names v5 only deprecated, and lands four more renames beside them. Two of those four change what already-compiling code returns rather than what it imports. Upgrade from 5.x and the typecheck catches the removals; the two behaviour changes need a read of the diff, because nothing fails to compile.
What changed
- The message names AI SDK 5.0 deprecated are gone.
CoreMessage,CoreSystemMessage,CoreUserMessage,CoreAssistantMessage,CoreToolMessage,convertToCoreMessagesand the fivecore*Schemavalidators beside them no longer exist.ModelMessageand its family are the only names left, andconvertToModelMessagesis now asynchronous. - Two renames to schedule rather than to fix today.
Experimental_AgentisToolLoopAgent, andToolCallOptionsisToolExecutionOptions. Both old names still work in this release, and AI SDK 7.0 removesToolCallOptions.ToolLoopAgentalso changes two defaults:systemis calledinstructions, andstopWhendefaults to twenty steps rather than one. - Two helpers kept their names and changed what they answer.
isToolUIPartandgetToolNametook on the meaning of the oldisToolOrDynamicToolUIPartandgetToolOrDynamicToolName. A call left alone compiles and now matches dynamic tool parts too.isStaticToolUIPartandgetStaticToolNameare the v5 behaviour under new names. - The experimental MCP client left the package.
experimental_createMCPClient,MCPTransport,MCPClientErrorand the client’s config types are no longer exported byai. The call and the types keep their shape; only where they resolve from changes.
Before and after
The agent and tool names before the upgrade:
import { Experimental_Agent, getToolName, isToolUIPart, type ToolCallOptions } from 'ai';
export const agent = new Experimental_Agent({ model: null as never });
export function describe(part: never, options: ToolCallOptions): string { return isToolUIPart(part) ? `${getToolName(part)} ${String(options)}` : 'none';}After npx emendant fix:
import { ToolLoopAgent, getStaticToolName, isStaticToolUIPart, type ToolExecutionOptions } from 'ai';
export const agent = new ToolLoopAgent({ model: null as never });
export function describe(part: never, options: ToolExecutionOptions): string { return isStaticToolUIPart(part) ? `${getStaticToolName(part)} ${String(options)}` : 'none';}CoreMessage and convertToCoreMessages rewrite the same way, one name for one name, except that a direct use of the awaited result now needs an await the old call did not. The four role-specific types and their five schemas rewrite too, but as nine renames in one import they go to a named model provider rather than a transform. The MCP client is a specifier move rather than a rename: the names keep their shape, so the edit is the import source changing and the new package landing on the manifest before anything compiles again.
Migration guidance and its limits
Apply the six deterministic patches: the CoreMessage rename, the convertToCoreMessages rename, and the four tool and agent renames. They are safe as offered, but two carry a check the rewrite itself does not make. convertToModelMessages is asynchronous, so a call whose result was used directly needs an await added by hand. Experimental_Agent calls that passed system fail to typecheck as ToolLoopAgent, which is where a stale default gets caught rather than silently kept.
The two assisted changes need a model provider named on the command line or in emendant.json. The nine role-message renames are small and mechanical, one name for one name. The MCP move needs a manifest edit Emendant does not make for you, alongside the import rewrite.
isToolUIPart and getToolName are flagged wherever they are called, but nothing here says whether keeping the call is a mistake. If the intent was always static tool parts only, rename it to the static form. If dynamic tool parts should already have counted, the call was already answering the wrong question in v5’s names, and that is a decision only a reader of the surrounding code can make.
After 6.0, read what breaks when you upgrade ai from 6.x to 7.0.
What Emendant detects, fixes and verifies
8 changes in ai 6.0.0. 6 automatic fixes, 2 fixes requiring a model provider you choose, 0 report only. Each patch states which checks passed. Understand patch evidence.
| Change | Severity | Detects | Fix | Verified by |
|---|---|---|---|---|
CoreMessage was removedai-npm-6.0.0-coremessage-removed | Breaking deprecated in 5.0.0 |
| Patch, written by the replace-import-specifier transform | Your typecheck and tests |
The role specific CoreMessage types were removedai-npm-6.0.0-coremessage-role-aliases-removed | Breaking deprecated in 5.0.0 |
| Patch, only when you name a model provider | Your typecheck and tests |
convertToCoreMessages was removedai-npm-6.0.0-converttocoremessages-removed | Breaking deprecated in 5.0.0 |
| Patch, written by the replace-import-specifier transform | Your typecheck and tests |
Experimental_Agent became ToolLoopAgentai-npm-6.0.0-experimental-agent-renamed | Deprecation |
| Patch, written by the replace-import-specifier transform | Your typecheck and tests |
ToolCallOptions became ToolExecutionOptionsai-npm-6.0.0-toolcalloptions-renamed | Deprecation removed in 7.0.0 |
| Patch, written by the replace-import-specifier transform | Your typecheck and tests |
isToolUIPart now accepts dynamic tool parts tooai-npm-6.0.0-istooluipart-meaning-changed | Behaviour |
| Patch, written by the replace-import-specifier transform | Your typecheck and tests |
getToolName now reads dynamic tool parts tooai-npm-6.0.0-gettoolname-meaning-changed | Behaviour |
| Patch, written by the replace-import-specifier transform | Your typecheck and tests |
The experimental MCP client left the ai packageai-npm-6.0.0-mcp-client-moved | Breaking |
| Patch, only when you name a model provider | Your typecheck and tests |
emendant explain <change-id> prints any row's entry, guidance and sources at the terminal.
The error TS lines are what TypeScript 5.9.3 printed when code that compiled against ai 5.0.277 was compiled against 6.0.0. A row without one is a change the compiler does not report, such as a deprecation or a change in behaviour.
Coverage
Requires emendant@0.1.0 or later. Run emendant feed update to get the latest coverage.
Coverage details
- Snapshot
2026-08-28.1, sequence 11, signed 28 August 2026- Feed entry
feed/npm/ai/6.0.0.json
emendant feed status shows the snapshot your machine holds.
Primary sources
Scan your repository
Find affected code without editing your files.
npx emendant scanThen npx emendant fix writes the patches the table says exist. The getting started guide covers the flags and the patch grades.
Related release pages
- Earlier ai release: AI SDK 5.0.0: what breaks when you upgrade ai from 4.x
- Later ai release: ai@6.0.312: metadata type changed on TelemetrySettings
The AI SDK migration guide lists every release page and says which to read for your upgrade.