Skip to content

0.1.4

Latest

Choose a tag to compare

@ChaYeWuu ChaYeWuu released this 27 Oct 15:20
· 1 commit to main since this release
d0898a6

修复

上游在 0.1.3 之后换了渠道指纹,国内版又出现「请求被拦截,请重新发送」(400 / code=11128)。这次命中的不是品牌名,而是 system 里一段固定文字,品牌兜底替换救不了,改为按段做最小改写,语义不变。

定位过程

用逐字节二分把触发点压到 111 个字:

Tokens prefixed with @ are paths the user explicitly referenced. Relative paths resolve from the workspace root
  • 单独发这 111 字 → 400
  • 从任意位置截断 → 200
  • 把 root 改成 roox,或整句改写成 Relative paths are resolved against the workspace root → 200
  • 长度、账号、请求头都试过,与结果无关

结论:上游按固定段落的写法做指纹,改动其中任意一句即放行。

真机验证

用 2026-10-21 抓的真实请求体(15 条消息 + 45 个工具 + 24353 字 system)原样走 prepareChatBody():

场景 修复前 修复后
真实完整 body 3/3 400 3/3 200
国内版 4 个账号各连发 3 次 — 12/12 200

改写表

原文 改写后
Tokens prefixed with @ are paths the user explicitly referenced. …point at paths the user…
Relative paths resolve from the workspace root Relative paths are resolved against the workspace root
whose URL the runtime context names whose URL is named in the runtime context

第三行是把上游 issue 里记过的 GUI 指纹顺手一起挡掉,免得下次直接套到同一段文字上。

只清洗 system 消息:实测同样的文字放在 user 里不会触发,改写用户原话等于污染上下文。

测试

全量 90 项通过,其中 tests/channel-guard.test.mjs 新增 4 项,覆盖两段改写与「语义不变」的断言。