AI SDK 7.0.149

7.0.149
Added 1
  • Add the interrupted finish reason for provider streams that end without a completion signal
Changed 4
  • Streamed tool parts are withheld for rejected tool calls so client-side tools cannot act on them
  • repairToolCall and experimental_refineToolInput are no longer invoked for rejected tool calls
  • Partial output is preserved for interrupted streams without introducing an error solely for interruption
  • Tool execution, agent continuation, and automatic UI follow-ups are stopped for interrupted responses, including late tool results and approvals
Fixed 2
  • Process only the first approval response per tool call, so repeated or conflicting responses in the final tool message no longer execute a tool twice or both execute and deny it
  • Fix toolChoice 'none' by forwarding it to the Hugging Face Responses API and rejecting tool calls before local execution in generateText, streamText, and WorkflowAgent

1 change to check, marked in the notes below

From AI SDK

Patch Changes
  • 1727442: fix(ai): process only the first approval response per tool call, so repeated or conflicting responses in the final tool message no longer execute a tool twice or both execute and deny it

  • 0a5d0e7: Fix toolChoice: 'none' by forwarding it to the Hugging Face Responses API and rejecting tool calls before local execution in generateText, streamText, and WorkflowAgent. Streamed tool parts are withheld so client-side tools cannot act on them, and repairToolCall and experimental_refineToolInput are not invoked for rejected tool calls.

  • 10026d1: Add the interrupted finish reason for provider streams that end without a completion signal. Preserve partial output without introducing an error solely for interruption, and stop tool execution, agent continuation, and automatic UI follow-ups for interrupted responses, including late tool results and approvals. Provider detection and emission will be added separately.

    Compatibility notice: Adding interrupted to the public finish-reason types can break type checking after upgrading, even though this is a patch release. Exhaustive switches (for example, using an assertNever fallback) and mappings such as Record<FinishReason, string> must handle the new value. Update any custom validation or application logic that assumes the existing set of finish reasons is exhaustive. signature changed · inferred

    When providers begin emitting interrupted, a stream ending without a completion signal will preserve partial output and report this finish reason without emitting an error solely for the interruption. Applications that need to detect incomplete responses should check finishReason === 'interrupted' as well as their existing error handling.

  • Updated dependencies [101ce42]

  • Updated dependencies [e104368]

  • Updated dependencies [eb1f056]

  • Updated dependencies [10026d1]

  • Updated dependencies [5893e99]

    • @ai-sdk/gateway@4.0.122
    • @ai-sdk/provider@4.0.32
    • @ai-sdk/provider-utils@5.0.66
View original

Upgraded? How did it go?

Discussion