interrupted
A finish reason enum value introduced by the AI SDK indicating that the stream has ended but no completion signal was received from the provider. It is a distinct state representing normal termination with a possibly incomplete result rather than an error, and requires explicit handling by the caller.
Timeline (last 90 days)
Before upgrading to 2.0.81, search globally for exhaustive finish reason handling logic and confirm the newly added interrupted value is covered, to avoid CI type-check failures.
AI SDK 2.0.81 introduces a new completion reason, interrupted, for provider streams, used for streams that end without receiving a completion signal.
When a stream ends with interrupted, the SDK retains the partial output already produced and does not throw an error merely because of the interruption.
When a stream ends with interrupted, tool execution, agent continuation, and automatic UI follow-up actions all stop, and late tool results and approval requests are ignored.
The provider-side detection and emission logic for the interrupted completion reason has not yet been implemented; the current version is only SDK-level preparation.
Because interrupted is added to the public finish-reason type, upgrading to 2.0.81 may cause type-checking errors in TypeScript projects that use exhaustive switches or Record<FinishReason, string> mappings.
For applications that need to detect incomplete responses, it is recommended to additionally check finishReason === 'interrupted' beyond existing error handling.
The `interrupted` state retains the partial output already produced and does not throw an error due to the interruption itself.
The official patch notes include a Compatibility notice requiring applications that branch on finishReason to add an `interrupted` branch in switches, mapping tables, and custom validation.
The interruption itself does not trigger the error handling path; try/catch cannot catch such cases, and it can only be determined via the finish reason.
3 more timeline events
All Facts (13)
Before upgrading to 2.0.81, search globally for exhaustive finish reason handling logic and confirm the newly added interrupted value is covered, to avoid CI type-check failures.
50%UnverifiedWhen a stream ends with interrupted, the SDK retains the partial output already produced and does not throw an error merely because of the interruption.
50%UnverifiedWhen a stream ends with interrupted, tool execution, agent continuation, and automatic UI follow-up actions all stop, and late tool results and approval requests are ignored.
50%UnverifiedThe provider-side detection and emission logic for the interrupted completion reason has not yet been implemented; the current version is only SDK-level preparation.
50%UnverifiedBecause interrupted is added to the public finish-reason type, upgrading to 2.0.81 may cause type-checking errors in TypeScript projects that use exhaustive switches or Record<FinishReason, string> mappings.
50%UnverifiedFor applications that need to detect incomplete responses, it is recommended to additionally check finishReason === 'interrupted' beyond existing error handling.
50%UnverifiedAI SDK 5.0.28 formally models the state where an upstream model stream ends without sending a provider completion signal as the `interrupted` finish reason.
50%UnverifiedThe `interrupted` state retains the partial output already produced and does not throw an error due to the interruption itself.
50%UnverifiedThe official patch notes include a Compatibility notice requiring applications that branch on finishReason to add an `interrupted` branch in switches, mapping tables, and custom validation.
50%UnverifiedThe interruption itself does not trigger the error handling path; try/catch cannot catch such cases, and it can only be determined via the finish reason.
50%UnverifiedGoogle Generate Content's automatic continuation triggered by hitting the output length limit and truncation in subsequent Anthropic messages are continuable scenarios, where subsequent content can be appended based on the retained partial output.
50%UnverifiedPure transport-layer interruptions are better suited to retries than continuation, because the context may be incomplete or duplicated at that point.
50%UnverifiedAI SDK 2.0.81 introduces a new completion reason, interrupted, for provider streams, used for streams that end without receiving a completion signal.
50%