AI SDK 5.0.281

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 in generateText and streamText with a new ToolChoiceViolationError. Streamed tool parts are withheld so client-side tools cannot act on them, and experimental_repairToolCall is not invoked for rejected tool calls.
  • Updated dependencies [0a444c6]
  • Updated dependencies [6120af2]
    • @ai-sdk/gateway@2.0.172
View original

Upgraded? How did it go?

Discussion