AI SDK 7.0.0 removes exports that earlier renames left behind as deprecated aliases, and deletes a long tail of internal types alongside them. Four experimental-prefixed functions, two names v6 already deprecated, and the types for streamText’s finish callbacks are gone or renamed. Anyone importing the old names from ai needs a typecheck to find every site before upgrading. Many more break code whose imports are already correct: four experimental_ option keys on the two generation calls, the two token counts v7 moved under detail objects, the property the response helpers take their stream on, the options object handed to a tool’s execute, and a middleware written against the v3 provider types.

What changed

Before and after

The clearest deterministic patch is the experimental-prefix rename, on a file that calls four of them and re-exports one under another name:

import {
experimental_customProvider,
experimental_generateImage,
experimental_generateSpeech,
experimental_transcribe,
} from 'ai';
export const registry = experimental_customProvider({ languageModels: {} });
export const image = () => experimental_generateImage({ model: null as never, prompt: 'a cat' });
export const speech = () => experimental_generateSpeech({ model: null as never, text: 'hello' });
export const text = () => experimental_transcribe({ model: null as never, audio: new Uint8Array() });
export { experimental_transcribe as transcribeAudio };

After npx emendant fix, every import and every reference is renamed, including inside the re-export:

import {
customProvider,
generateImage,
generateSpeech,
transcribe,
} from 'ai';
export const registry = customProvider({ languageModels: {} });
export const image = () => generateImage({ model: null as never, prompt: 'a cat' });
export const speech = () => generateSpeech({ model: null as never, text: 'hello' });
export const text = () => transcribe({ model: null as never, audio: new Uint8Array() });
export { transcribe as transcribeAudio };

The other four deterministic patches are the same specifier rewrite: ToolCallOptions to ToolExecutionOptions, isToolOrDynamicToolUIPart to isToolUIPart, stepCountIs to isStepCount, and CallSettings to LanguageModelCallOptions.

Fourteen more rename a property rather than an import specifier. One of them rewrites fullStream to stream, and only where the receiver is what streamText returned, so the read on streamObject’s result beside it is left alone:

const result = streamText({ model, prompt: 'hi' });
for await (const part of result.fullStream) console.log(part);
const object = streamObject({ model, prompt: 'hi', schema: undefined as never });
for await (const part of object.fullStream) console.log(part);

After the patch the first loop reads result.stream and the second is unchanged. A pipeThrough or a tee over the same read is the same site and needs no other edit.

The largest group of property renames is the four experimental_ options, reported at the key in the options literal:

return generateText({
model,
prompt: 'hi',
experimental_activeTools: ['weather'],
experimental_output: undefined,
experimental_prepareStep: () => undefined,
experimental_context: { tenant: 'acme' },
});

After the patches, three keys have lost the prefix and the fourth has a new name:

return generateText({
model,
prompt: 'hi',
activeTools: ['weather'],
output: undefined,
prepareStep: () => undefined,
runtimeContext: { tenant: 'acme' },
});

The token counts move a path rather than a name, so usage.reasoningTokens becomes usage.outputTokenDetails.reasoningTokens and usage.cachedInputTokens becomes usage.inputTokenDetails.cacheReadTokens, on the usage and the totalUsage of both results. generateText’s result.experimental_output becomes result.output. The two response helpers take stream where they took textStream, and a shorthand property is rewritten as a pair: createTextStreamResponse({ status: 200, textStream }) becomes createTextStreamResponse({ status: 200, stream: textStream }).

Thirty-eight changes are assisted rather than deterministic, and two of them are worth showing. The first is the streamText callback types. Emendant reports the import of StreamTextOnFinishCallback, StreamTextOnStepFinishCallback or TelemetrySettings, but writing the replacement means typing the callback from the option it fills (onEnd or onStepEnd) rather than from a name that no longer exists, and that needs a named model provider.

The second is the tool options literal, which is reported at the literal rather than at an import, because the key that would be the site is the one that is missing:

await weather.execute({ city: 'Exeter' }, { toolCallId: 'a', messages: [] });

The value to add is the tool’s context, an empty object where the tool declares no contextSchema and otherwise a value of that schema’s type. toolCallId and messages stay as they are. An options object passed by name, or a literal holding a spread, is not reported, since the key may be there at runtime.

The other thirty-six assisted changes are the removed and newly deprecated exports the table names, and the option keys on consumeStream, experimental_generateVideo and the two internal helpers. Use assisted fixes for these sites and check each replacement against the migration guide.

Migration guidance and its limits

Apply the twenty-two deterministic patches. Eight rename an import specifier and fourteen rename a property, which is an option key in a literal or a read on a result. The values either side are unchanged, so the call sites are correct once the name is, with one thing to check after: runtimeContext is typed through the call’s own runtime context parameter where experimental_context was unknown, so a context object that carried no type of its own may now need one.

The forty-seven assisted changes need a model provider named on the command line or in emendant.json. Without one they are reported with their guidance and nothing is sent anywhere. For callbacks, use the type of the option they fill. For tool calls, supply context that matches the tool’s contextSchema. Review the remaining replacements against the release guidance.

Read those patches before applying them. Each patch is limited to the affected file and checked, in a copy of your repository moved to 7.0.0 and put through whichever of your own typecheck and tests it finds there, and a patch that fails is withheld. A repository declaring neither gets its patches graded structurally checked (what each patch grade means), which says the edits applied and the workspace matched again, and that nothing compiled or ran the code. Removed names without a documented replacement, such as OutputInterface and the telemetry hooks, may need developer changes instead of an offered patch.

Seven findings are report only, and each for its own reason. The two telemetry keys are the first: neither has a destination inside the call. A custom Tracer now goes to the OpenTelemetry constructor from @ai-sdk/otel and is registered once with registerTelemetry, which the migration guide places at application startup rather than in the file the finding is in. metadata has no replacement key at all; per-call attributes reach telemetry through includeRuntimeContext and includeToolsContext, which name properties of a runtime context rather than carrying a literal map.

timeout on generateObject and streamObject is report only because there is no option to rename it to. Pass an abortSignal from a timer instead, which both releases accept.

StepResult’s functionId and metadata are report only for the same reason as the telemetry keys: v7 keeps no per-step copy of what you passed in. Read them from the telemetry settings you handed to the call, which still declares both.

LanguageModelMiddleware is report only for a third reason: the edit is inside your middleware’s own body, wherever it names a v3 type or reads a field the v4 call options and results dropped. The finding says a value is built against the type, not which members that value names, which is why its confidence is medium and no patch is offered.

This page needs emendant@0.3.0 or later. Older clients cannot read all the coverage for this release and skip it with a coverage warning. Update the CLI before scanning for this migration.

This release also renamed the system prompt option to instructions, and moved onRerankFinish and onEmbedFinish to onRerankEnd and onEmbedEnd. Neither is a name the table below covers, so nothing here detects them. A clean scan says a file uses none of the constructs below, nothing more.

One measured 6.x to 7.0 migration of a public repository shows the completed migration, the patch Emendant prepared, and the additional developer changes needed to pass the repository checks.

What Emendant detects, fixes and verifies

77 changes in ai 7.0.0. 22 automatic fixes, 48 fixes requiring a model provider you choose, 7 report only. Each patch states which checks passed. Understand patch evidence.

ChangeSeverityDetectsFixVerified by
experimental_customProvider was removed
ai-npm-7.0.0-experimental-customprovider-removed
error TS2305: Module '"ai"' has no exported member 'experimental_customProvider'.
Breaking
  • experimental_customProvider imported from ai
Patch, written by the replace-import-specifier transformYour typecheck and tests
experimental_generateImage was removed
ai-npm-7.0.0-experimental-generateimage-removed
error TS2724: '"ai"' has no exported member named 'experimental_generateImage'. Did you mean 'Experimental_GeneratedImage'?
Breaking
  • experimental_generateImage imported from ai
Patch, written by the replace-import-specifier transformYour typecheck and tests
ToolCallOptions was removed
ai-npm-7.0.0-toolcalloptions-removed
error TS2305: Module '"ai"' has no exported member 'ToolCallOptions'.
Breaking
deprecated in 6.0.0
  • ToolCallOptions imported from ai
Patch, written by the replace-import-specifier transformYour typecheck and tests
isToolOrDynamicToolUIPart was removed
ai-npm-7.0.0-istoolordynamictooluipart-removed
error TS2724: '"ai"' has no exported member named 'isToolOrDynamicToolUIPart'. Did you mean 'isDynamicToolUIPart'?
Breaking
deprecated in 6.0.0
  • isToolOrDynamicToolUIPart imported from ai
Patch, written by the replace-import-specifier transformYour typecheck and tests
experimental_transcribe became transcribe
ai-npm-7.0.0-experimental-transcribe-renamed
Deprecation
  • experimental_transcribe imported from ai
Patch, written by the replace-import-specifier transformYour typecheck and tests
experimental_generateSpeech became generateSpeech
ai-npm-7.0.0-experimental-generatespeech-renamed
Deprecation
  • experimental_generateSpeech imported from ai
Patch, written by the replace-import-specifier transformYour typecheck and tests
stepCountIs became isStepCount
ai-npm-7.0.0-stepcountis-renamed
Deprecation
  • stepCountIs imported from ai
Patch, written by the replace-import-specifier transformYour typecheck and tests
CallSettings became LanguageModelCallOptions
ai-npm-7.0.0-callsettings-renamed
Deprecation
  • CallSettings imported from ai
Patch, written by the replace-import-specifier transformYour typecheck and tests
The streamText callback types were removed
ai-npm-7.0.0-streamtext-callback-types-removed
error TS2724: '"ai"' has no exported member named 'StreamTextOnFinishCallback'. Did you mean 'StreamObjectOnFinishCallback'?
Breaking
  • StreamTextOnFinishCallback imported from ai
  • StreamTextOnStepFinishCallback imported from ai
  • TelemetrySettings imported from ai
Patch, only when you name a model providerYour typecheck and tests
Removed Experimental_GenerateImageResult
ai-npm-7.0.0-experimental-generate-image-result-removed
error TS2724: '"ai"' has no exported member named 'Experimental_GenerateImageResult'. Did you mean 'Experimental_GeneratedImage'?
Breaking
  • Experimental_GenerateImageResult imported from ai
Patch, only when you name a model providerYour typecheck and tests
Removed GenerateTextOnToolCallFinishCallback
ai-npm-7.0.0-generate-text-on-tool-call-finish-callback-removed
error TS2724: '"ai"' has no exported member named 'GenerateTextOnToolCallFinishCallback'. Did you mean 'GenerateTextOnFinishCallback'?
Breaking
  • GenerateTextOnToolCallFinishCallback imported from ai
Patch, only when you name a model providerYour typecheck and tests
Removed GenerateTextOnToolCallStartCallback
ai-npm-7.0.0-generate-text-on-tool-call-start-callback-removed
error TS2724: '"ai"' has no exported member named 'GenerateTextOnToolCallStartCallback'. Did you mean 'GenerateTextOnStartCallback'?
Breaking
  • GenerateTextOnToolCallStartCallback imported from ai
Patch, only when you name a model providerYour typecheck and tests
Removed OutputInterface
ai-npm-7.0.0-output-interface-removed
error TS2305: Module '"ai"' has no exported member 'OutputInterface'.
Breaking
  • OutputInterface imported from ai
Patch, only when you name a model providerYour typecheck and tests
Removed StreamTextOnStartCallback
ai-npm-7.0.0-stream-text-on-start-callback-removed
error TS2724: '"ai"' has no exported member named 'StreamTextOnStartCallback'. Did you mean 'StreamTextOnErrorCallback'?
Breaking
  • StreamTextOnStartCallback imported from ai
Patch, only when you name a model providerYour typecheck and tests
Removed StreamTextOnStepStartCallback
ai-npm-7.0.0-stream-text-on-step-start-callback-removed
error TS2724: '"ai"' has no exported member named 'StreamTextOnStepStartCallback'. Did you mean 'GenerateTextOnStepStartCallback'?
Breaking
  • StreamTextOnStepStartCallback imported from ai
Patch, only when you name a model providerYour typecheck and tests
Removed StreamTextOnToolCallFinishCallback
ai-npm-7.0.0-stream-text-on-tool-call-finish-callback-removed
error TS2305: Module '"ai"' has no exported member 'StreamTextOnToolCallFinishCallback'.
Breaking
  • StreamTextOnToolCallFinishCallback imported from ai
Patch, only when you name a model providerYour typecheck and tests
Removed StreamTextOnToolCallStartCallback
ai-npm-7.0.0-stream-text-on-tool-call-start-callback-removed
error TS2305: Module '"ai"' has no exported member 'StreamTextOnToolCallStartCallback'.
Breaking
  • StreamTextOnToolCallStartCallback imported from ai
Patch, only when you name a model providerYour typecheck and tests
Removed TelemetryIntegration
ai-npm-7.0.0-telemetry-integration-removed
error TS2305: Module '"ai"' has no exported member 'TelemetryIntegration'.
Breaking
  • TelemetryIntegration imported from ai
Patch, only when you name a model providerYour typecheck and tests
Removed ToolLoopAgentOnFinishCallback
ai-npm-7.0.0-tool-loop-agent-on-finish-callback-removed
error TS2305: Module '"ai"' has no exported member 'ToolLoopAgentOnFinishCallback'.
Breaking
  • ToolLoopAgentOnFinishCallback imported from ai
Patch, only when you name a model providerYour typecheck and tests
Removed ToolLoopAgentOnStepFinishCallback
ai-npm-7.0.0-tool-loop-agent-on-step-finish-callback-removed
error TS2305: Module '"ai"' has no exported member 'ToolLoopAgentOnStepFinishCallback'.
Breaking
  • ToolLoopAgentOnStepFinishCallback imported from ai
Patch, only when you name a model providerYour typecheck and tests
Removed bindTelemetryIntegration
ai-npm-7.0.0-bind-telemetry-integration-removed
error TS2305: Module '"ai"' has no exported member 'bindTelemetryIntegration'.
Breaking
  • bindTelemetryIntegration imported from ai
Patch, only when you name a model providerYour typecheck and tests
Removed registerTelemetryIntegration
ai-npm-7.0.0-register-telemetry-integration-removed
error TS2305: Module '"ai"' has no exported member 'registerTelemetryIntegration'.
Breaking
  • registerTelemetryIntegration imported from ai
Patch, only when you name a model providerYour typecheck and tests
Deprecated Experimental_SpeechResult
ai-npm-7.0.0-experimental-speech-result-deprecated
Deprecation
  • Experimental_SpeechResult imported from ai
Patch, only when you name a model providerYour typecheck and tests
Deprecated Experimental_TranscriptionResult
ai-npm-7.0.0-experimental-transcription-result-deprecated
Deprecation
  • Experimental_TranscriptionResult imported from ai
Patch, only when you name a model providerYour typecheck and tests
Deprecated GenerateTextOnFinishCallback
ai-npm-7.0.0-generate-text-on-finish-callback-deprecated
Deprecation
  • GenerateTextOnFinishCallback imported from ai
Patch, only when you name a model providerYour typecheck and tests
Deprecated GenerateTextOnStepFinishCallback
ai-npm-7.0.0-generate-text-on-step-finish-callback-deprecated
Deprecation
  • GenerateTextOnStepFinishCallback imported from ai
Patch, only when you name a model providerYour typecheck and tests
Deprecated OnFinishEvent
ai-npm-7.0.0-on-finish-event-deprecated
Deprecation
  • OnFinishEvent imported from ai
Patch, only when you name a model providerYour typecheck and tests
Deprecated OnStartEvent
ai-npm-7.0.0-on-start-event-deprecated
Deprecation
  • OnStartEvent imported from ai
Patch, only when you name a model providerYour typecheck and tests
Deprecated OnStepFinishEvent
ai-npm-7.0.0-on-step-finish-event-deprecated
Deprecation
  • OnStepFinishEvent imported from ai
Patch, only when you name a model providerYour typecheck and tests
Deprecated OnStepStartEvent
ai-npm-7.0.0-on-step-start-event-deprecated
Deprecation
  • OnStepStartEvent imported from ai
Patch, only when you name a model providerYour typecheck and tests
Deprecated OnToolCallFinishEvent
ai-npm-7.0.0-on-tool-call-finish-event-deprecated
Deprecation
  • OnToolCallFinishEvent imported from ai
Patch, only when you name a model providerYour typecheck and tests
Deprecated OnToolCallStartEvent
ai-npm-7.0.0-on-tool-call-start-event-deprecated
Deprecation
  • OnToolCallStartEvent imported from ai
Patch, only when you name a model providerYour typecheck and tests
Deprecated UIMessageStreamOnFinishCallback
ai-npm-7.0.0-uimessage-stream-on-finish-callback-deprecated
Deprecation
  • UIMessageStreamOnFinishCallback imported from ai
Patch, only when you name a model providerYour typecheck and tests
Deprecated UIMessageStreamOnStepFinishCallback
ai-npm-7.0.0-uimessage-stream-on-step-finish-callback-deprecated
Deprecation
  • UIMessageStreamOnStepFinishCallback imported from ai
Patch, only when you name a model providerYour typecheck and tests
Removed prepareToolsAndToolChoice
ai-npm-7.0.0-internal-prepare-tools-and-tool-choice-removed
error TS2724: '"ai/internal"' has no exported member named 'prepareToolsAndToolChoice'. Did you mean 'prepareToolChoice'?
Breaking
  • prepareToolsAndToolChoice imported from ai/internal
Patch, only when you name a model providerYour typecheck and tests
Removed StreamTextEndEvent
ai-npm-7.0.0-stream-text-end-event-removed
error TS2305: Module '"ai"' has no exported member 'StreamTextEndEvent'.
Breaking
  • StreamTextEndEvent imported from ai
Patch, only when you name a model providerYour typecheck and tests
Removed StreamTextOnEndCallback
ai-npm-7.0.0-stream-text-on-end-callback-removed
error TS2724: '"ai"' has no exported member named 'StreamTextOnEndCallback'. Did you mean 'StreamTextOnChunkCallback'?
Breaking
  • StreamTextOnEndCallback imported from ai
Patch, only when you name a model providerYour typecheck and tests
Removed ToolChoiceViolationError
ai-npm-7.0.0-tool-choice-violation-error-removed
error TS2305: Module '"ai"' has no exported member 'ToolChoiceViolationError'.
Breaking
  • ToolChoiceViolationError imported from ai
Patch, only when you name a model providerYour typecheck and tests
Removed UIMessageStreamOutcome
ai-npm-7.0.0-uimessage-stream-outcome-removed
error TS2724: '"ai"' has no exported member named 'UIMessageStreamOutcome'. Did you mean 'UIMessageStreamOptions'?
Breaking
  • UIMessageStreamOutcome imported from ai
Patch, only when you name a model providerYour typecheck and tests
Removed UIMessageStreamWriterWithOutcome
ai-npm-7.0.0-uimessage-stream-writer-with-outcome-removed
error TS2305: Module '"ai"' has no exported member 'UIMessageStreamWriterWithOutcome'.
Breaking
  • UIMessageStreamWriterWithOutcome imported from ai
Patch, only when you name a model providerYour typecheck and tests
Removed abortSignal from the first argument of consumeStream()
ai-npm-7.0.0-consume-stream-argument-1-abort-signal-removed
error TS2353: Object literal may only specify known properties, and 'abortSignal' does not exist in type '{ stream: ReadableStream<any>; onError?: ((error: unknown) => void) | undefined; }'.
Breaking
  • the abortSignal key in the object passed to consumeStream imported from ai
Patch, only when you name a model providerYour typecheck and tests
Removed frameImages from the first argument of experimental_generateVideo()
ai-npm-7.0.0-experimental-generate-video-argument-1-frame-images-removed
error TS2353: Object literal may only specify known properties, and 'frameImages' does not exist in type '{ model: VideoModel; prompt: GenerateVideoPrompt; n?: number | undefined; maxVideosPerCall?: number | undefined; aspectRatio?: `${number}:${number}` | undefined; ... 9 more ...; download?: ((options: { ...; }) => Promise<...>) | undefined; }'.
Breaking
  • the frameImages key in the object passed to experimental_generateVideo imported from ai
Patch, only when you name a model providerYour typecheck and tests
Removed inputReferences from the first argument of experimental_generateVideo()
ai-npm-7.0.0-experimental-generate-video-argument-1-input-references-removed
error TS2353: Object literal may only specify known properties, and 'inputReferences' does not exist in type '{ model: VideoModel; prompt: GenerateVideoPrompt; n?: number | undefined; maxVideosPerCall?: number | undefined; aspectRatio?: `${number}:${number}` | undefined; ... 9 more ...; download?: ((options: { ...; }) => Promise<...>) | undefined; }'.
Breaking
  • the inputReferences key in the object passed to experimental_generateVideo imported from ai
Patch, only when you name a model providerYour typecheck and tests
Removed timeout from the first argument of prepareCallSettings()
ai-npm-7.0.0-internal-prepare-call-settings-argument-1-timeout-removed
error TS2353: Object literal may only specify known properties, and 'timeout' does not exist in type 'LanguageModelCallOptions'.
Breaking
  • the timeout key in the object passed to prepareCallSettings imported from ai/internal
Patch, only when you name a model providerYour typecheck and tests
Removed additionalRetryableError from the first argument of prepareRetries()
ai-npm-7.0.0-internal-prepare-retries-argument-1-additional-retryable-error-removed
error TS2353: Object literal may only specify known properties, and 'additionalRetryableError' does not exist in type '{ maxRetries: number | undefined; abortSignal: AbortSignal | undefined; }'.
Breaking
  • the additionalRetryableError key in the object passed to prepareRetries imported from ai/internal
Patch, only when you name a model providerYour typecheck and tests
metadata is gone from the telemetry options
ai-npm-7.0.0-telemetry-metadata-removed
error TS2353: Object literal may only specify known properties, and 'metadata' does not exist in type 'TelemetryOptions<Context, NoInfer<ToolSet>>'.
error TS2353: Object literal may only specify known properties, and 'metadata' does not exist in type 'TelemetryOptions<Context, ToolSet>'.
Breaking
  • the metadata key under experimental_telemetry in the object passed to generateText imported from ai
  • the metadata key under experimental_telemetry in the object passed to streamText imported from ai
  • the metadata key under experimental_telemetry in the object passed to generateObject imported from ai
  • the metadata key under experimental_telemetry in the object passed to streamObject imported from ai
  • the metadata key under experimental_telemetry in the object passed to embed imported from ai
  • the metadata key under experimental_telemetry in the object passed to embedMany imported from ai
  • the metadata key under experimental_telemetry in the object passed to rerank imported from ai
Report onlyNot applicable
tracer is gone from the telemetry options
ai-npm-7.0.0-telemetry-tracer-removed
Breaking
  • the tracer key under experimental_telemetry in the object passed to generateText imported from ai
  • the tracer key under experimental_telemetry in the object passed to streamText imported from ai
  • the tracer key under experimental_telemetry in the object passed to generateObject imported from ai
  • the tracer key under experimental_telemetry in the object passed to streamObject imported from ai
  • the tracer key under experimental_telemetry in the object passed to embed imported from ai
  • the tracer key under experimental_telemetry in the object passed to embedMany imported from ai
  • the tracer key under experimental_telemetry in the object passed to rerank imported from ai
Report onlyNot applicable
streamText's result names its parts stream instead of fullStream
ai-npm-7.0.0-stream-text-result-fullstream-deprecated
Deprecation
  • .fullStream read on what streamText imported from ai returns
Patch, written by the rename-property transformYour typecheck and tests
A tool's execute takes a context in its options
ai-npm-7.0.0-tool-execution-options-context-required
error TS2345: Argument of type '{ toolCallId: string; messages: never[]; }' is not assignable to parameter of type 'ToolExecutionOptions<NoInfer<Context>>'.
  Property 'context' is missing in type '{ toolCallId: string; messages: never[]; }' but required in type 'ToolExecutionOptions<NoInfer<Context>>'.
error TS2345: Argument of type '{ toolCallId: string; messages: never[]; abortSignal: undefined; }' is not assignable to parameter of type 'ToolExecutionOptions<NoInfer<Context>>'.
  Property 'context' is missing in type '{ toolCallId: string; messages: never[]; abortSignal: undefined; }' but required in type 'ToolExecutionOptions<NoInfer<Context>>'.
Breaking
  • a context key absent from argument 1 of .execute() on what tool imported from ai returns
  • a context key absent from argument 1 of .execute() on what dynamicTool imported from ai returns
Patch, only when you name a model providerYour typecheck and tests
LanguageModelMiddleware is declared against the v4 provider types
ai-npm-7.0.0-language-model-middleware-members-changed
Breaking
medium confidence
  • a value declared, returned or implemented as LanguageModelMiddleware imported from ai
Report onlyNot applicable
generateText's result no longer declares experimental_output
ai-npm-7.0.0-generate-text-result-experimental-output-removed
error TS2339: Property 'experimental_output' does not exist on type 'GenerateTextResult<ToolSet, Context, Output<string, string, any>>'.
Breaking
  • .experimental_output read on what generateText imported from ai returns
Patch, written by the rename-property transformYour typecheck and tests
LanguageModelUsage moved reasoningTokens under outputTokenDetails
ai-npm-7.0.0-language-model-usage-reasoning-tokens-removed
error TS2339: Property 'reasoningTokens' does not exist on type 'LanguageModelUsage'.
Breaking
  • .reasoningTokens read on .usage of what generateText imported from ai returns
  • .reasoningTokens read on .totalUsage of what generateText imported from ai returns
  • .reasoningTokens read on .usage of what streamText imported from ai returns
  • .reasoningTokens read on .totalUsage of what streamText imported from ai returns
Patch, written by the rename-property transformYour typecheck and tests
LanguageModelUsage replaced cachedInputTokens with inputTokenDetails.cacheReadTokens
ai-npm-7.0.0-language-model-usage-cached-input-tokens-removed
error TS2339: Property 'cachedInputTokens' does not exist on type 'LanguageModelUsage'.
Breaking
  • .cachedInputTokens read on .usage of what generateText imported from ai returns
  • .cachedInputTokens read on .totalUsage of what generateText imported from ai returns
  • .cachedInputTokens read on .usage of what streamText imported from ai returns
  • .cachedInputTokens read on .totalUsage of what streamText imported from ai returns
Patch, written by the rename-property transformYour typecheck and tests
generateText no longer accepts experimental_activeTools
ai-npm-7.0.0-generate-text-argument-1-experimental-active-tools-removed
error TS2353: Object literal may only specify known properties, and 'experimental_activeTools' does not exist in type 'LanguageModelCallOptions & RequestOptions<ToolSet> & { instructions?: Instructions | undefined; system?: Instructions | undefined; allowSystemInMessages?: boolean | undefined; } & { ...; } & { ...; } & { ...; } & { ...; }'.
Breaking
  • the experimental_activeTools key in the object passed to generateText imported from ai
Patch, written by the rename-property transformYour typecheck and tests
streamText no longer accepts experimental_activeTools
ai-npm-7.0.0-stream-text-argument-1-experimental-active-tools-removed
error TS2353: Object literal may only specify known properties, and 'experimental_activeTools' does not exist in type 'LanguageModelCallOptions & RequestOptions<ToolSet> & { instructions?: Instructions | undefined; system?: Instructions | undefined; allowSystemInMessages?: boolean | undefined; } & { ...; } & { ...; } & { ...; } & { ...; }'.
Breaking
  • the experimental_activeTools key in the object passed to streamText imported from ai
Patch, written by the rename-property transformYour typecheck and tests
generateText no longer accepts experimental_output
ai-npm-7.0.0-generate-text-argument-1-experimental-output-removed
Breaking
  • the experimental_output key in the object passed to generateText imported from ai
Patch, written by the rename-property transformYour typecheck and tests
streamText no longer accepts experimental_output
ai-npm-7.0.0-stream-text-argument-1-experimental-output-removed
Breaking
  • the experimental_output key in the object passed to streamText imported from ai
Patch, written by the rename-property transformYour typecheck and tests
generateText no longer accepts experimental_prepareStep
ai-npm-7.0.0-generate-text-argument-1-experimental-prepare-step-removed
Breaking
  • the experimental_prepareStep key in the object passed to generateText imported from ai
Patch, written by the rename-property transformYour typecheck and tests
generateText renamed experimental_context to runtimeContext
ai-npm-7.0.0-generate-text-argument-1-experimental-context-removed
Breaking
  • the experimental_context key in the object passed to generateText imported from ai
Patch, written by the rename-property transformYour typecheck and tests
streamText renamed experimental_context to runtimeContext
ai-npm-7.0.0-stream-text-argument-1-experimental-context-removed
Breaking
  • the experimental_context key in the object passed to streamText imported from ai
Patch, written by the rename-property transformYour typecheck and tests
generateObject no longer accepts timeout
ai-npm-7.0.0-generate-object-argument-1-timeout-removed
Breaking
  • the timeout key in the object passed to generateObject imported from ai
Report onlyNot applicable
streamObject no longer accepts timeout
ai-npm-7.0.0-stream-object-argument-1-timeout-removed
Breaking
  • the timeout key in the object passed to streamObject imported from ai
Report onlyNot applicable
createTextStreamResponse renamed textStream to stream
ai-npm-7.0.0-create-text-stream-response-argument-1-text-stream-renamed
error TS2353: Object literal may only specify known properties, and 'textStream' does not exist in type 'ResponseInit & { stream: ReadableStream<string>; }'.
Breaking
  • the textStream key in the object passed to createTextStreamResponse imported from ai
Patch, written by the rename-property transformYour typecheck and tests
pipeTextStreamToResponse renamed textStream to stream
ai-npm-7.0.0-pipe-text-stream-to-response-argument-1-text-stream-renamed
error TS2353: Object literal may only specify known properties, and 'textStream' does not exist in type '{ response: ServerResponse<IncomingMessage>; stream: ReadableStream<string>; } & ResponseInit'.
Breaking
  • the textStream key in the object passed to pipeTextStreamToResponse imported from ai
Patch, written by the rename-property transformYour typecheck and tests
StepResult no longer carries functionId
ai-npm-7.0.0-step-result-function-id-removed
error TS2339: Property 'functionId' does not exist on type 'StepResult<ToolSet, Context>'.
Breaking
  • .functionId read on each element iterated through .steps from what generateText imported from ai returns
  • .functionId read on each element iterated through .steps from what streamText imported from ai returns
Report onlyNot applicable
StepResult no longer carries metadata
ai-npm-7.0.0-step-result-metadata-removed
error TS2339: Property 'metadata' does not exist on type 'StepResult<ToolSet, Context>'.
Breaking
  • .metadata read on each element iterated through .steps from what generateText imported from ai returns
  • .metadata read on each element iterated through .steps from what streamText imported from ai returns
Report onlyNot applicable
StepResult renamed experimental_context to runtimeContext
ai-npm-7.0.0-step-result-experimental-context-removed
error TS2339: Property 'experimental_context' does not exist on type 'StepResult<ToolSet, Context>'.
Breaking
  • .experimental_context read on each element iterated through .steps from what generateText imported from ai returns
  • .experimental_context read on each element iterated through .steps from what streamText imported from ai returns
Patch, written by the rename-property transformYour typecheck and tests
Removed abortSignal from the first argument of convertToLanguageModelPrompt()
ai-npm-7.0.0-internal-convert-to-language-model-prompt-argument-1-abort-signal-removed
error TS2353: Object literal may only specify known properties, and 'abortSignal' does not exist in type '{ prompt: StandardizedPrompt; supportedUrls: Record<string, RegExp[]>; download: DownloadFunction | undefined; provider?: string | undefined; }'.
Breaking
  • the abortSignal key in the object passed to convertToLanguageModelPrompt imported from ai/internal
Patch, only when you name a model providerYour typecheck and tests
Changed the members of ChatTransport
ai-npm-7.0.0-chat-transport-members-changed
Breaking
medium confidence
  • ChatTransport imported from ai, named in any type position
Patch, only when you name a model providerYour typecheck and tests
Changed the members of DefaultChatTransport
ai-npm-7.0.0-default-chat-transport-members-changed
Breaking
medium confidence
  • DefaultChatTransport imported from ai, named in any type position
Patch, only when you name a model providerYour typecheck and tests
Changed the members of DirectChatTransportOptions
ai-npm-7.0.0-direct-chat-transport-options-members-changed
Breaking
medium confidence
  • DirectChatTransportOptions imported from ai, named in any type position
Patch, only when you name a model providerYour typecheck and tests
Changed the members of EmbeddingModelMiddleware
ai-npm-7.0.0-embedding-model-middleware-members-changed
Breaking
medium confidence
  • EmbeddingModelMiddleware imported from ai, named in any type position
Patch, only when you name a model providerYour typecheck and tests
Changed the members of ImageModelMiddleware
ai-npm-7.0.0-image-model-middleware-members-changed
Breaking
medium confidence
  • ImageModelMiddleware imported from ai, named in any type position
Patch, only when you name a model providerYour typecheck and tests
Changed the members of Provider
ai-npm-7.0.0-provider-members-changed
Breaking
medium confidence
  • Provider imported from ai, named in any type position
Patch, only when you name a model providerYour typecheck and tests
Changed the members of TextStreamChatTransport
ai-npm-7.0.0-text-stream-chat-transport-members-changed
Breaking
medium confidence
  • TextStreamChatTransport imported from ai, named in any type position
Patch, only when you name a model providerYour typecheck and tests
Changed the members of UIMessageStreamOptions
ai-npm-7.0.0-uimessage-stream-options-members-changed
Breaking
medium confidence
  • UIMessageStreamOptions imported from ai, named in any type position
Patch, only when you name a model providerYour typecheck and tests
Changed the members of SerialJobExecutor
ai-npm-7.0.0-serial-job-executor-members-changed
Breaking
medium confidence
  • SerialJobExecutor imported from ai, named in any type position
Patch, only when you name a model providerYour 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 6.0.309 was compiled against 7.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.3.0 or later. Run emendant feed update to get the latest coverage.

Coverage details
Snapshot
2026-10-11.1, sequence 42, signed 11 October 2026
Feed entry
feed/npm/ai/7.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 scan

Then npx emendant fix writes the patches the table says exist. The getting started guide covers the flags and the patch grades.

The AI SDK migration guide lists every release page and says which to read for your upgrade.