返回全部动态

Vercel AI SDK 7.0.149 修复工具调用并新增 interrupted 结束原因

原标题:ai@7.0.149

Vercel AI SDK Releases一手来源API 更新质量 67

AI 摘要

Vercel AI SDK 发布 ai@7.0.149 补丁版本,修复了工具调用审批响应重复执行的问题,并修正 toolChoice: 'none' 在 Hugging Face Responses API 下的行为,在本地执行前拒绝工具调用。同时新增 interrupted 结束原因,用于处理未收到完成信号的流式响应,保留部分输出并停止后续工具执行与代理续跑。该变更可能影响升级后的类型检查,需处理新增的 finish reason 值。

以上摘要由 AI 生成,可能存在误差。事实请以原文为准。

正文节选

### 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`


发布时间:2026-10-23 02:54
抓取时间:2026-10-23 03:49
来源机构:Vercel
阅读原文github.com