Vibeleaderboard
← All Intel
Intel / repo

ai ai@7.0.149

Source
github.com
Author
github-actions[bot]Top Viber
Date

Context

This patch release of Vercel's AI SDK makes three changes to how tool calls and responses are handled, and one of them can break type checking on upgrade even though the version number only moves a patch step. The headline addition is a new interrupted finish reason, meant for provider streams that end without sending a completion signal. Per the release notes, the SDK keeps whatever partial output arrived, does not raise an error solely because of the interruption, and stops tool execution, continuation and automatic UI follow-ups for that response, including tool results and approvals that arrive late.

The practical catch is in the types. Because interrupted is now part of the public finish-reason types, code that handles every finish reason exhaustively, such as a switch with an assertNever fallback or a Record mapping keyed by FinishReason, must handle the new value, and the notes say to update any custom validation or logic that assumes the existing set is complete. The notes also say providers do not detect or emit interrupted yet; that will be added separately. Once they do, the notes advise applications that need to spot incomplete responses to check finishReason === 'interrupted' alongside their existing error handling.

The other two fixes tighten tool handling. When the final tool message contains repeated or conflicting approval responses for the same tool call, the SDK now processes only the first, so a tool is no longer executed twice or both executed and denied. The same fix appears, in identical wording, in the v6-line release ai@6.0.313. Separately, toolChoice: 'none' is fixed: it is now forwarded to the Hugging Face Responses API, and generateText, streamText and WorkflowAgent reject tool calls before local execution, withholding streamed tool parts so client-side tools cannot act on them.

Key takeaways · AI-distilled
  • When a final tool message carries repeated or conflicting approval responses for one tool call, the AI SDK now processes only the first, so a tool can no longer run twice or be both executed and denied.
  • toolChoice: 'none' is now enforced locally: generateText, streamText and WorkflowAgent reject tool calls before execution, withhold streamed tool parts from client-side tools, and skip repairToolCall and experimental_refineToolInput for them.
  • A new interrupted finish reason covers provider streams that end without a completion signal: partial output is kept without an error, and tool execution, agent continuation and automatic UI follow-ups stop. Provider detection and emission will be added separately.
Terms in this piece · Glossary
  • AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
More from github-actions[bot]
Recommended reads
Comments

Checking sign-in…

Loading comments…