5.0.281
Added 1
- Reject tool calls before local execution in generateText and streamText when toolChoice is 'none', throwing a new ToolChoiceViolationError.
Fixed 3
- Forward toolChoice 'none' to the Hugging Face Responses API.
- Withhold streamed tool parts so client-side tools cannot act on them when toolChoice is 'none'.
- Do not invoke experimental_repairToolCall for tool calls rejected under toolChoice 'none'.
From AI SDK
Patch Changes
- 9ec221d: Fix
toolChoice: 'none'by forwarding it to the Hugging Face Responses API and rejecting tool calls before local execution ingenerateTextandstreamTextwith a newToolChoiceViolationError. Streamed tool parts are withheld so client-side tools cannot act on them, andexperimental_repairToolCallis not invoked for rejected tool calls. - Updated dependencies [0a444c6]
- Updated dependencies [6120af2]
- @ai-sdk/gateway@2.0.172