li
901a77cfb1
fix(apicompat): Anthropic→Chat 桥回传工具调用的 thinking,修复 DeepSeek 多轮 400
/v1/messages 打到只支持 Chat Completions 的 OpenAI 兼容上游时,
anthropicAssistantToChatMessages 把历史 assistant 消息里的 thinking 块整块丢弃。
DeepSeek 的 thinking mode 要求产生工具调用的 reasoning_content 随该 assistant
消息回传,缺失即 400 —— 表现为「单轮正常,一进多轮工具对话必现失败」。
这些 thinking 块本来就是同一个文件的出站方向
(chatMessageToAnthropicBlocks) 用上游 reasoning_content 生成的,客户端只是
原样回传:桥自己造出来的东西,回来时被自己丢掉。
兄弟路径 Responses→Chat (buildChatMessagesFromItems 的 pendingReasoning) 早已
处理同一约束。本次把同一策略补到漏掉的这条桥上,作用域严格对齐:reasoning 只挂
到带 tool_calls 的 assistant 消息,纯文本轮次维持现状。
Fixes #5528
2026-08-14 10:33:47 +08:00
..
2026-07-01 11:32:22 +08:00
2026-08-07 16:14:37 +08:00
2026-08-14 10:33:47 +08:00
2026-07-26 19:20:11 +08:00
2026-08-07 20:49:39 +08:00
2026-02-28 15:01:20 +08:00
2026-05-20 09:28:46 +08:00
2026-05-20 09:28:46 +08:00
2026-02-05 20:17:53 +08:00
2026-07-14 01:29:30 +08:00
2026-07-09 11:15:52 +08:00
2026-08-06 20:34:37 +08:00
2026-07-18 00:11:18 +08:00
2026-08-01 15:03:59 +08:00
2026-08-07 09:56:03 +08:00
2026-05-14 11:46:24 +08:00
2026-07-13 11:35:46 +08:00
2026-03-02 16:04:20 +08:00
2026-08-03 19:59:58 +08:00
2026-08-07 16:29:48 +08:00
2026-03-16 20:22:10 +08:00
2026-07-15 00:23:27 +08:00
2026-01-04 19:28:20 +08:00
2026-07-02 16:11:07 +08:00
2026-07-16 09:51:41 +08:00
2026-08-07 09:40:11 -04:00
2026-04-14 12:19:44 +08:00
2026-08-13 08:55:56 +08:00