mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-08-17 03:27:02 +08:00
DeepSeek 类 thinking 模型在 adaptive thinking 下部分 tool-call 轮次不输出 thinking 块,重放时适配器不生成 thinking 块,上游 Anthropic 兼容 API 在 thinking 模式下要求每个 assistant 轮次回传 thinking 块,导致 "The content[].thinking in the thinking mode must be passed back to the API." 400 且毒化会话历史,后续所有请求持续失败。 引入 thinking carrier:缺 reasoning 的轮次复用请求内最近一个有 reasoning+signature 的 assistant 轮次兜底,无 carrier 时输出空 thinking 块; thinking 关闭时行为不变。与 openai.go 已有空 reasoning_content 兜底对称。 Closes #268