Patch Changes
-
43ad966: Report
interruptedwhen a stream ends cleanly without its provider completion signal, preserving partial output without emitting an error solely for the interruption.This applies to OpenAI (Chat, Responses, and Completions), Anthropic, Google (Generate Content and Interactions), Alibaba, Amazon Bedrock Converse, Cohere, DeepSeek, Groq, Hugging Face Responses, Mistral Chat, Moonshot AI, Open Responses, Perplexity, and xAI Responses. It also covers cutoffs in later Anthropic messages and Google automatic continuations.
Compatibility notice: These streams previously fell back to
otheror omitted the finish part. Applications must now handleinterruptedin finish-reason switches, mappings, and custom validation. CheckfinishReason === 'interrupted'to detect incomplete responses; interruption alone does not trigger error handling.Explicit unknown completion reasons still map to
other. Actual provider, parsing, and transport errors retain their error paths; affected error paths that previously left the finish reason asothernow reporterror. OpenAI-compatible remains unchanged. -
Updated dependencies [10026d1]
- @ai-sdk/provider@4.0.32
- @ai-sdk/provider-utils@5.0.66