Patch Changes
-
0a5d0e7: Fix
toolChoice: 'none'by forwarding it to the Hugging Face Responses API and rejecting tool calls before local execution ingenerateText,streamText, andWorkflowAgent. Streamed tool parts are withheld so client-side tools cannot act on them, andrepairToolCallandexperimental_refineToolInputare not invoked for rejected tool calls. -
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/openai-compatible@3.0.76
- @ai-sdk/provider-utils@5.0.66