[KongchangAI]
Concept中断状态 / interrupted finish reason

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)

Oct 22

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.

Unverified50%
Oct 22

AI SDK 2.0.81 introduces a new completion reason, interrupted, for provider streams, used for streams that end without receiving a completion signal.

Unverified50%
Oct 22

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.

Unverified50%
Oct 22

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.

Unverified50%
Oct 22

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.

Unverified50%
Oct 22

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.

Unverified50%
Oct 22

For applications that need to detect incomplete responses, it is recommended to additionally check finishReason === 'interrupted' beyond existing error handling.

Unverified50%
Oct 22

The `interrupted` state retains the partial output already produced and does not throw an error due to the interruption itself.

Unverified50%
Oct 22

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.

Unverified50%
Oct 22

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.

Unverified50%

3 more timeline events

All Facts (13)

Unverified

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%
Unverified

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.

50%
Unverified

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.

50%
Unverified

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.

50%
Unverified

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.

50%
Unverified

For applications that need to detect incomplete responses, it is recommended to additionally check finishReason === 'interrupted' beyond existing error handling.

50%
Unverified

AI 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%
Unverified

The `interrupted` state retains the partial output already produced and does not throw an error due to the interruption itself.

50%
Unverified

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.

50%
Unverified

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.

50%
Unverified

Google 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%
Unverified

Pure transport-layer interruptions are better suited to retries than continuation, because the context may be incomplete or duplicated at that point.

50%
Unverified

AI SDK 2.0.81 introduces a new completion reason, interrupted, for provider streams, used for streams that end without receiving a completion signal.

50%

Source Articles