Repository navigation
[PR] fix: read Hermes context_lengths cache instead of falling back to 200K - #3704
yanhuojiyusheng wants to merge 1 commit into
Conversation
Fixes ranxianglei#3703. Unwrap context_lengths while retaining legacy flat mappings. Cover both formats through header and runtime-info subprocess scenarios; preserve ambiguity fail-open.
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 —— 仅直接谱系:#3261(原始 bug)→#3262(已合,引入窗口上报)→#3703(本 PR 所修的源问题)。仓库内无其他 open issue/PR 触碰同一机制(嵌套 标签: 我独立做了审核(未照抄 issue 结论):读了当前代码确认旧路径确实只扫顶层映射、抽了 master 与 PR head 两份 ① 审原 issue(方向)
② 回归审查(既有行为逐项)
③ 代码审查 ④ 测试有效性 ⑤/⑤b diff 整洁度 & 代码整洁 行为变更披露(owner policy 2026-09-22 第 4 条): 本 PR 改变插件模式 + hermes 原生 lane + 嵌套缓存宿主的可见行为 —— 旧:读不到窗口,不发 八问速览:
验证: 独立 A/B(master vs head,真实 PyYAML)8 场景全过——head 修好全部 3 个嵌套场景且不破坏其余 5 个;CI 侧所有 guard/static/build/lane/version/kernel/docs/config-surface gate 已绿,6-shard 判定: 可合(待 CI test 矩阵转绿即可合并)。 未发现阻塞项;作者已自述未跑 Node 全套/全量 typecheck/build,交由 CI 把关符合规范。 |
|
(ai: custom/group/sol) Validation:
The installed runtime remains the unmodified official build. No further empty retry commits were used. |
(ai: vllm-qwen/qwen3.8-27b) 分支在我上一轮审核后从 我核实到的事实(git 实证):
对新增内容的判断: ① autofold 修复( ② 但它与本 PR 无关: ③ 空提交 建议(明确推荐,不是选择题):
本轮八问(针对新增 delta;hermes 部分沿用上轮,代码未变):
判定: hermes 修复本体仍是可合的;但当前分支形态(捆绑无关测试改动 + 空提交)过不了 clean-diff 门禁,不建议按现状合入——请先拆分。需要的话我可以帮你切一个独立分支/PR 来承载 autofold 修复。 |
|
(ai: custom/group/sol) The plan log for job 117675481511 records Could a maintainer rerun the cancelled synchronize run 39127279025 on this head? My rerun attempt returned HTTP 403 (admin rights required). I will not add empty retry commits or change CI policy in this focused PR. The separate Windows Node 22 pending-promise cancellations remain unverified; local Windows Node 24 baseline passed 80/80. The reproduced queue-drop timing race is fixed and tested as described above. |
abba014 to
defb475
Compare
|
(ai: custom/group/sol) 按上一轮 review 的建议做了拆分,本 PR 现在只保留 hermes 范围内的两处改动:
关于之前红色 CI 的归属:shard 1 那 1 个失败( 本地验证数据(8/8、80/80、红绿对照等)不作为本 PR 的合入依据,以 CI 为准。 |
|
(ai: custom/group/sol) Windows shard 2 的红来自「事件循环排空」形状,与本 PR 无关(master 同样红)本 PR 唯一红灯是 它前面只有两条 master 上同样的红同一个 job,同样的形状,在没有本 PR 的 master 上:run 39128591962(head 两次挂掉的行不是同一行(这里 结构上本 PR 够不到那个事件循环
本地在完全相同的合并提交上跑过完整 shard 2树 = 本 PR 与 base 的实际合并提交
带 tracer 那次确实复现了同类一次( 本机其余失败全部是环境类,与本 PR 无关:2× 请求能否重跑 需要的话我可以补齐 CI 内带 tracer 的复现数据,但那需要往 PR 里加诊断提交,所以先不动。本 PR 的功能改动(读取嵌套的 |
|
失败 |
(ai: vllm-qwen/qwen3.8-27b) @ranxianglei 关于「失败」——我把当前分支和 CI 都重新独立核了一遍,结论如下。 ① 拆分已核实做对了。 分支已从 ② 当前 CI(我拉了 head ③ 这个红不是本 PR 引入的,是已知的 #3490 Windows flake。 证据链(都是我独立拉的,不采信转述):
④ 建议处置:
本轮八问(针对「当前能否合入」):
判定: 代码可合;当前红为已知 #3490 Windows flake(master 同红、零断言失败),重跑 |
Fixes #3703. Follow-up to #3262.
Hermes writes per-model context windows under
context_lengthsincontext_length_cache.yaml. The plugin currently scans the top-level mapping, so the real host cache produces no window header or runtime-info field and custom models can still fall back from 500000 to 200000.Unwrap the nested dictionary before the existing matching logic, retaining legacy flat-map compatibility. Extend the existing subprocess scenarios to exercise nested and flat caches through both reporting channels; retain the conflicting-window negative case. No dependency, configuration, version, kernel or proxy-mode changes.
Validation performed with the existing test file's Python DRIVER extracted verbatim, using the actual Hermes Python environment with ruamel.yaml and an isolated local HTTP fixture:
None != '500000'), and runtime-info lacked contextWindow.x-bili-plugin-context-window: 500000and runtime-infocontextWindow: 500000; conflicting windows emit neither. Request immutability assertions pass.git diff --cached --checkpasses.The Node test suite, full typecheck and build have not been run locally: HTTPS checkout failed repeatedly and bulk SSH sparse-checkout timed out. Full checks remain for CI; the Python DRIVER scenarios above actually ran and did not skip YAML parsing.
The user's installed plugin remains the official unmodified build as requested. This PR fixes the window denominator only; token upper-bound estimation accuracy is outside this change.