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-08-05 18:25:58 +08:00
2026-07-20 11:39:37 +08:00
2026-08-31 16:15:08 +08:00
2026-08-31 16:15:08 +08:00
2026-07-19 15:00:09 +08:00
2026-08-27 13:40:29 +08:00
2026-08-14 10:33:47 +08:00
2026-08-14 10:33:47 +08:00
2026-08-23 08:11:20 +08:00
2026-08-24 11:23:37 +08:00
2026-08-23 08:45:04 +08:00
2026-08-27 13:40:07 +08:00
2026-08-17 18:51:17 +08:00
2026-08-19 20:49:31 +08:00
2026-08-23 08:11:20 +08:00
2026-07-31 19:36:47 +08:00
2026-08-28 17:36:43 +08:00
2026-08-20 00:29:33 +08:00
2026-07-05 13:58:08 +08:00
2026-07-19 13:05:24 +08:00
2026-08-22 14:03:25 +07:00
2026-08-22 14:03:25 +07:00
2026-08-26 15:04:17 +08:00
2026-08-26 15:04:17 +08:00
2026-08-27 13:40:07 +08:00
2026-07-14 14:48:22 +08:00
2026-07-13 14:38:05 +08:00
2026-07-12 04:53:34 +08:00
2026-07-10 17:38:17 +08:00
2026-07-09 15:34:10 +08:00
2026-08-07 23:09:03 +08:00
2026-07-15 00:59:28 +08:00
2026-07-15 14:31:26 +08:00
2026-08-07 23:09:03 +08:00
2026-07-27 08:19:19 +08:00
2026-07-27 08:19:19 +08:00
2026-07-20 11:39:37 +08:00
2026-08-14 06:32:38 +00:00
2026-08-24 11:52:48 +08:00
2026-08-20 12:37:39 +08:00
2026-08-24 11:58:01 +08:00
2026-07-15 14:31:26 +08:00
2026-08-28 17:36:43 +08:00