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 v5 deprecated message names 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.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 rename that needs nothing but the name, from fixtures/ai-v6/positive/renamed-exports.ts:
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.
What Emendant detects, fixes and verifies
8 changes in ai 6.0.0. 6 patched by a transform, 2 patched only with a model provider you name, 0 report only. Every patch is proved in a copy of your repository before it is offered, and its header names the checks that passed. This table is generated from the feed entry, so it cannot claim more than the entry does.
| 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.
Coverage
- Snapshot
2026-08-28.1, sequence 11, signed 28 August 2026- Minimum CLI
emendant@0.1.0- Feed entry
feed/npm/ai/6.0.0.json
emendant feed status shows the snapshot your machine holds, and emendant feed update fetches the latest.
Primary sources
Every claim above was checked against these, each pinned to the release rather than to a default branch.
Scan your repository
Runs locally, reads your lockfile and source, sends nothing anywhere.
npx emendant scanThen npx emendant fix writes the patches the table says exist. The getting started guide covers the flags and the patch grades.