You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
它能到达上游,是因为这个 id 会往返:pi-ai 系客户端把 message item 的 id 编进响应文本块的 textSignature({"v":1,"id":"marker-…"}),并在之后每个请求里把它作为 input item 的 id 回放。
bili 知道这个往返并已做防御——sanitizeResponsesInputIds 会删掉 bili 自己命名空间下的
assistant-message id("Client-visible proxy ids are not upstream item identities; replay the full
message instead",5dc12ade、#1474)——但那份白名单只覆盖 msg-proxy-,于是 marker- id 原样
穿到上游,整请求 400。
Activity
Lin515 commentedon Oct 7, 2026
已在 #2375 修复:#2375
实现方式与本 issue 的「建议修法」一致:
emitText/emitMarker统一经proxyMessageItemId()铸造在msg-proxy-命名空间下,使任何 emit 路径都不可能再漂出上游的前缀规则;
sanitizeResponsesInputIds的 assistant-message 治愈分支放宽到历史的marker-前缀—— 只放宽删除分支,>64 字符的改写分支仍只认
msg-proxy-,Preserve provider-issued reasoning IDs in Responses input sanitization #1474 对 provider id 的保护不变;生产验证
修复已在真实上游(ChatGPT Codex backend)上验证过治愈效果。一个被 0.1.187 毒化的会话
(
session-5f30b295…):marker-1791393957942-2PI_AI_ERROR结束(上游 400)request: 99 msgs→forward POST → …/codex/responses,无 400)三条佐证排除了「碰巧好了」:
marker-1791393957942-2出现 4 次,其中两次正是回放载体
"textSignature":"{\"v\":1,\"id\":\"marker-1791393957942-2\"}");nudge idle ... reason="max compressible 43822 < threshold 50000"),毒项确实仍在被原样回放的数组中;
即:毒 id 由已发布的旧版本写到用户磁盘,新版本在不改动客户端任何数据的前提下把它治好。
refactor(ranxianglei#2374): route the round>1 message-id remap throug…
ranxianglei commentedon Oct 7, 2026
PR #2375 审核完毕——结论:可合并(message-id 逻辑属 §7.4 gate 8,人工合并;CI 正在跑新 head)。
结构化七问
type:"message"item 上,而 bili 给这种 item 铸的 id 是marker-前缀——严格上游(Codex backend)要求 message item id 以msg开头;客户端把该 id 持久化进 textSignature 并逐轮回放后,会话每个请求必 400,永久毒化。emitText对同样的 item 形状一直铸msg-proxy-,emitMarker却按 marker 的内容而非wire 类型命名 id;入口治愈白名单在 Preserve provider-issued reasoning IDs in Responses input sanitization #1474 收窄到只认msg-proxy-(为保护 provider id),把 bili 自己铸造的另一命名空间(marker-)漏在了外面——产出侧出了界,治愈侧接不住。msg-proxy-下,任何 emit 路径不可能再漂出上游前缀规则;入口治愈放宽到删除历史marker-assistant-message id,让已发布版本写坏的 rollout 自愈(不动客户端任何数据);约束登记为永久台账条目 WC-015。msg-proxy-\d+-\d+,既有正则断言钉住);marker-…→msg-proxy-…= 本修复的有意变更(客户端可见流字节随之改变,PR 正文已披露);msg-proxy-,Preserve provider-issued reasoning IDs in Responses input sanitization #1474 的 provider-id 保护原样保留(其不变量测试照过);验证(本地定向范围执行)
review_rollout_user)与 #20783(裸 UUID)均真实存在且错误形态与生产现场一致——前缀规则确属 Codex backend 自身硬校验,不是 bili 推断;msg_…/rs_…)字节原样;台账自检保证 WC-015 不可能存在而无执法子句。小修(已直接推上 PR 分支)
8e3acacd5refactor(Responses wire:visibility marker 的 message item 用了非 "msg" 前缀的 id,且中毒会话无法自愈 #2374):round>1 上游 message remap——第三个 client-visible 铸造点——仍在手写msg-proxy-字面量,改走PROXY_MESSAGE_ID_PREFIX。字符串字节相同、零行为变化,补齐命名空间 single-source,使「任何铸造点都不可能再漂出」从声明变成结构保证。推后 typecheck + 受影响三个套件复跑全绿。判定:方向对(修根因)、无回归、diff 干净(7 文件 +87/−16,每行都在题内)、生产实证可信(同一 rollout 换构建即刻恢复,三条佐证排除了巧合)。等人工合并:#2375
fix(#2374): visibility marker 的 message item id 改用 msg 命名空间,并治愈 marke…
Merge pull request #2375 from Lin515/2026-10-08_fix-marker-item-id