Repository navigation
[PR] fix: resolve providers.* config for path-style lane requests (#4501) - #4510
ranxianglei wants to merge 3 commits into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.5480-pr.4510.7e0426aThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr4510.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。 本 [PR](#4510,分支 标签: bug / dsh / scope/wiring / p2 —— 路径式 lane 配置静默失效属功能性缺陷;有绕行(隧道形态正常),未达 p1「不能用/体验毁灭」级,故 p2。 开始独立 review:按 PR Review 规范逐项核对——原 issue 方向、diff 既有行为清单(plugin/proxy 双模式)、代码与测试有效性、CI 状态,完成后按结构化八问给结论。当前已知:单 commit |
…use providerDestUrl for the #3211 pairing Review follow-up on #4501/#4510 — two small cleanups on top of the new single config-matching basis; no behavior change beyond the log text: - the #661 route-passthrough log line still masked route?.rewrittenUrl, which is undefined for path-style matches. Now that #4501 makes those matches possible, the line would have logged an empty URL; it names providerDestUrl instead. - the #3211 calibration pairing recomputed the full destination URL inline; it now reuses providerDestUrl (identical value) so the single matching basis stays single.
(ai: vllm-qwen/qwen3.8-27b) Review 结论(独立审核,非复读 issue/原 PR 描述):方向正确、机制打到了根因、回归面已逐项清点——可合(等 pushed head 结构化八问1. 是什么问题:路径式 lane 请求(直接 2. 什么原因导致的: 3. 影响范围与严重程度:所有「声明了 4. 怎么修复的: 5. 是否有回归问题:无。逐项清点触碰路径的既有行为:
6. 是否破坏缓存:不涉及。不碰前缀缓存接缝、ref/账本、增量游标、去重键;快照渲染车道无感。 7. 是否改了设计方向:不涉及。收敛到既有约定(destUrl 重建同款),无新数据流/边界变化。 8. 是否引入新配置:不涉及。让既有的 验证证据
合并判定:§7.4 下属 human-only(出站 wire 值 + fallback 语义变更),请 owner 审后自行合并:#4510 。若认可,我这边无遗留动作;#4501 待此 PR 合并后由你验收关闭。 |
(ai: vllm-qwen/qwen3.8-27b) 收工确认(前两条评论已含查重结论与结构化八问完整审核,此处仅收口):
我这边无遗留动作。 |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复——按失败签名(docs-sync 红 + 再生成丢 docs-sync 已修,commit
判定:修复完成且本地已复现绿,等新 head 的 CI 全绿即可;无需 owner 决策项。 |
Path-style lane requests (POST /v1/messages straight at the proxy's default upstream — no /bili/ tunnel, no absolute form, non-MITM) get no route back from resolveUpstream(), so every providers.* lookup keyed on route?.rewrittenUrl silently missed: models.<model>.output/.context never applied, the #3438 mid-band collapse rescue stayed unarmed, and its "NO known output ceiling" warn could not be silenced by declaring the model's max output. Reconstruct the full destination URL (opts.upstream + path) once in handle() as providerDestUrl and use it as the single config-matching basis for the output ceiling, context limit, operator window tuning, registry host, passthrough routing, and per-provider compress settings. Also stop firing the #3438 mid-band warn when a ceiling IS known (value >= ceiling is a healthy state, not a missing-ceiling gap). Tests: unit coverage of the warn gate in side-request-isolation.test.ts plus end-to-end proof in the new issue4501-pathstyle-config.test.ts that a path-style dsh-lane request now resolves the declared output ceiling and restores a collapsed mid-band budget up to it.
…use providerDestUrl for the #3211 pairing Review follow-up on #4501/#4510 — two small cleanups on top of the new single config-matching basis; no behavior change beyond the log text: - the #661 route-passthrough log line still masked route?.rewrittenUrl, which is undefined for path-style matches. Now that #4501 makes those matches possible, the line would have logged an empty URL; it names providerDestUrl instead. - the #3211 calibration pairing recomputed the full destination URL inline; it now reuses providerDestUrl (identical value) so the single matching basis stays single.
…rates it - tools/gen-config-docs.mjs: drop the stale backtick ban on desc_en/desc_zh (these fields render only into markdown tables, where backticks are valid inline code); add optional default_zh for zh-localized default cells. - website/config-reference/rollout.yaml: add the rollout.features.pluginLaneServerHistory entry reproducing #4491's committed row byte-exactly (EN+ZH). - Regenerate CONFIGURATION.md / CONFIGURATION.zh-CN.md (param-ref row + env-map row).
c0b2271 to
6a5b94b
Compare
(ai: vllm-qwen/qwen3.8-27b) 冲突已解决:rebase 到当前 master(含 #4524)后强推,新 head 结构化八问1. 是什么问题:PR 分支与 master 文本冲突——双方各自独立修了同一个 docs-sync 红:本 PR 第三个 commit 把 2. 什么原因导致的:#4491 把该行手改进了生成区块而没在 YAML 种子登记 → 每个 merge-ref 再生成都丢行、docs-sync 全红;#4524 与本 PR 是对同一根因的两个并行修复,落地时间错开就在同一行上产生冲突。纯文本层冲突——本 PR 的代码 commit(主修复 + 小修)apply 到 master 零冲突。 3. 影响范围与严重程度:仅影响本 PR 可合并性;纯文档/工具链面,零运行时行为影响,不涉及任何用户。 4. 怎么修复的:union-of-intent 取舍——保留本 PR 的种子版本:它与 #4491 已提交行逐字节一致,比 #4524 的降级版更忠实,且与已进 master 的生成器扩展(解除反引号禁令 + 5. 是否有回归问题:无。rebase 不改变 PR 原本披露的行为表(output ceiling/.context/passthrough/compress 设置/mid-band warn 六项)在新 base 下依然成立,定向测试验证;高危模式逐项过完:无语义漂移、无吞错、无阈值/时序/输出格式变化;此前披露的两处顺手小修(route-passthrough 日志空 URL、#3211 pairing 复用单一基准)作为独立 commit 原样保留。 6. 是否破坏缓存:不涉及。 7. 是否改了设计方向:不涉及——仍是「种子是唯一事实源」,只是两个并行修复收敛为忠实版本。 8. 是否引入新配置:无( 验证证据(新 head
|
…use providerDestUrl for the ranxianglei#3211 pairing Review follow-up on ranxianglei#4501/ranxianglei#4510 — two small cleanups on top of the new single config-matching basis; no behavior change beyond the log text: - the ranxianglei#661 route-passthrough log line still masked route?.rewrittenUrl, which is undefined for path-style matches. Now that ranxianglei#4501 makes those matches possible, the line would have logged an empty URL; it names providerDestUrl instead. - the ranxianglei#3211 calibration pairing recomputed the full destination URL inline; it now reuses providerDestUrl (identical value) so the single matching basis stays single. (cherry picked from commit 1f5d023)
What & why
Path-style lane requests —
POST /v1/messagesstraight at the proxy's default upstream, no/bili/tunnel, no absolute form, non-MITM — get no route back fromresolveUpstream(). Everyproviders.*lookup inhandle()was keyed onroute?.rewrittenUrl, so for those requests it wasundefinedand silently missed:providers.<url>.models.<model>.outputnever applied → the [bug] DSH lane: client-side max_tokens collapse lands in the 200–25K band and slips past the ≤200 restore trigger — 3 finish=length empty turns, reasoning ate the whole budget (0.1.197) | DSH 车道:max_tokens 落在 200–25K 中间带、漏过 ≤200 救援阈值,3 轮 finish=length 空轮… #3438 mid-band collapse rescue stayed unarmed and itsNO known output ceilingwarn could not be silenced by declaring the model's max output (the reported bug: bili 0.1.204 / dsh desktop).models.<model>.context, operator window tuning, registry host, route-scopedpassthrough:true, and per-provider compress settings had the same silent miss.Fix
Reconstruct the full destination URL once in
handle()(providerDestUrl = route?.rewrittenUrl ?? <absolute urlPath> ?? opts.upstream + urlPath) and use it as the single config-matching basis for all of the above. Matching is a longest-URL-prefix against the provider keys, so a host-level key (https://api.deepseek.com) matches any deeper path on that host — exactly what the tunnel form already did.Also stopped firing the #3438 mid-band warn when a ceiling is known: in the healthy branch a known ceiling implies
value >= ceiling(collapse requiresvalue < ceiling), which is a healthy state, not a missing-ceiling gap — the old code lied there.Behavior changes (old → new, path-style lanes only)
All are corrections of intended-but-broken behavior; tunnel/absolute/MITM forms already had routes and are unchanged:
models.<m>.outputceilingmodels.<m>.context/ operator window tuningundefinedpassthrough:truevalue >= ceilingis healthy, not a gapNo threshold/timing/output-format drift beyond the above; no wire-shape change other than the restored
max_tokensvalue on path-style dsh-lane requests where a ceiling is now readable.Config surface
Unchanged. No new / renamed / re-semantics'd fields — this makes the existing
providers.<url>.models.<model>.output/.contextkeys actually reach path-style requests, as always intended. Nothing to migrate.Tests
tests/side-request-isolation.test.ts: unit pin that a known ceiling withvalue >= ceilingno longer fires the mid-band warn (and still fires exactly once with no ceiling).tests/issue4501-pathstyle-config.test.ts(new): end-to-end — a path-style dsh-lane request resolves the declared output ceiling and restores a collapsed mid-band budget up to it; the control case proves the same request without a declared ceiling forwards verbatim and poisons the high-water (the reported impact).Local: typecheck clean; targeted suites green (side-request-isolation, issue4501, issue3833-cross-model-output-ceiling, headroom-output-fallback, configured-window-outranks-registry, compress-settings, agent-providers, named-provider-bind, runtime-info, launcher, routing, upstream-proxy-routing — 478 pass / 0 fail / 1 pre-existing skip). Full suite delegated to CI.
Closes #4501