
wucm667andClaude Opus 4.8
4d4ba64bf7
fix(codex): 剥离续链 message item 的非法 item_* id
OpenAI OAuth 转发续链请求时,type=message 的 item 的 id 被客户端以
item_* 形式回放,但上游要求以 msg 开头,返回 400
"Expected an ID that begins with 'msg'",sub2api 随后向客户端返回 502。
客户端自动重试会不断重放同一份坏上下文,导致连续失败。
filterCodexInputWithOptions 在 PreserveReferences=true 路径下为
type=message 增加与 #3785 (fd64d07e6) 平行的 id 前缀检查:非 msg 开头
即删除。合法的 msg* id 原样保留,不改写 item_* 为 msg_*,因为改写出的
id 未必对应真实上游对象。
原 TestFilterCodexInput_NonToolCallItemKeepsID 以 message + item_msg_001
断言"保留 id",该行为已被上游拒绝,改用 web_search_call 覆盖同一意图。
Fixes #3981
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 23:32:34 +08:00
..
2026-07-10 13:24:13 +00:00
2026-07-09 15:38:59 +08:00
2026-07-10 23:32:34 +08:00
2026-07-10 15:13:11 +08:00
2026-07-10 15:13:11 +08:00
2026-07-01 14:25:46 +08:00
2026-07-09 14:06:57 +08:00
2026-07-09 14:06:57 +08:00
2026-07-08 08:37:29 +08:00
2026-07-01 14:25:46 +08:00