li
8f5451587e
fix(apicompat): Anthropic→Responses 流式转换在 thinking 块前关闭 message item 并推进 content_index
thinking 块开始时不关闭已打开的 message item,直接覆盖 CurrentItemType/
CurrentItemID,累积的助手文本既不进 state.Outputs 也拿不到 output_item.done,
response.completed 只带 reasoning——客户端收到「成功但无输出」。同 switch 的
tool_use 分支本来就先调 closeCurrentResponsesItem,只有 thinking 漏了。
content_index 只在 item 打开时置 0,从不推进。同一 message item 里第二个 text
块会再发一次 content_part.added(content_index=0),与第一个 part 撞在同一下标,
SDK 累积式 helper 按 content[content_index] 写入时后者覆盖前者。反方向
responses_to_anthropic.go 有三处 ContentBlockIndex++,正方向一处都没有。
新增用例覆盖两条坏顺序,外加一条生命周期不变式用例(output_item.added 与
output_item.done 必须配平、terminal 事件按announce 顺序逐项携带)。
2026-08-31 16:15:08 +08:00
..
2026-07-01 11:32:22 +08:00
2026-08-28 17:36:43 +08:00
2026-08-31 16:15:08 +08:00
2026-08-22 14:43:40 +09: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-08-21 02:33:00 +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-18 13:08:28 +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-08-24 12:21:06 +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-28 23:32:11 +08:00
2026-04-14 12:19:44 +08:00
2026-08-25 21:28:57 +09:00