finish reason
AI SDK 在每次生成结束后返回的枚举字段,用于告知调用方生成为何终止,常见取值包括 stop、length、content-filter、tool-calls、error、other,并新增 interrupted 表示流已结束但未收到 provider 完成信号。
时间轴 (近 90 天)
finish reason 是 AI SDK 跨提供方统一抽象出的终止原因枚举,取值包括 stop、length、tool-calls、content-filter、other 等。
适配层的职责是在提供方特有的 reason 和 SDK 统一枚举之间建立多对一映射,映射表遗漏某一项时,代码会落入 other 兜底分支。
在修复前,xAI 提供方在 Responses 路径下返回的 finish reason 是 other,导致调用方无法据此触发提高上限重试、分段续写等自动化逻辑。
修复后,监控面板上 other 的计数会明显下降,length 的计数相应上升。
AI SDK 2.0.81 为 provider 流引入了新的完成原因 interrupted,用于没有收到完成信号就结束的流。
finish reason 是 SDK 对一次模型响应如何结束的分类,典型取值有 stop、length 和 tool-calls。
finish reason 是 AI SDK 在每次生成结束后返回的枚举字段,常见取值包括 stop、length、content-filter、tool-calls、error 和 other。
全部知识事实 (7)
finish reason 是 AI SDK 跨提供方统一抽象出的终止原因枚举,取值包括 stop、length、tool-calls、content-filter、other 等。
50%待验证适配层的职责是在提供方特有的 reason 和 SDK 统一枚举之间建立多对一映射,映射表遗漏某一项时,代码会落入 other 兜底分支。
50%待验证在修复前,xAI 提供方在 Responses 路径下返回的 finish reason 是 other,导致调用方无法据此触发提高上限重试、分段续写等自动化逻辑。
50%待验证finish reason 是 SDK 对一次模型响应如何结束的分类,典型取值有 stop、length 和 tool-calls。
50%待验证finish reason 是 AI SDK 在每次生成结束后返回的枚举字段,常见取值包括 stop、length、content-filter、tool-calls、error 和 other。
50%待验证修复后,监控面板上 other 的计数会明显下降,length 的计数相应上升。
50%待验证AI SDK 2.0.81 为 provider 流引入了新的完成原因 interrupted,用于没有收到完成信号就结束的流。
50%