Skip to content

fix: floor the ceiling-less starved output budget at an absolute minimum (#3071) - #3080

Merged
ranxianglei merged 5 commits into
masterfrom
2026-10-14_output-budget-floor
Oct 15, 2026
Merged

ranxianglei merged 5 commits into
masterfrom
2026-10-14_output-budget-floor

Conversation

@ranxianglei

@ranxianglei ranxianglei commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Part of #3071

What & why

On a model with no declared output ceiling (ark-code-latest in the report), the proxy's
starved-budget restore used the client's own last non-starved high-water as its only lower
bound. That estimate decays unbounded from the client's raw-history size (…, 3071, 2061, 252, ≤200), so once a session goes starved it pins at a death rattle and every turn
truncates at max_tokens → upstream returns finish=length with 0 visible chars, the
degenerate turn isn't retried (#2756 excludes length), and the client gets a blank reply.
A fresh fork child inherits the rattle and forwards max_tokens=1 verbatim. On v0.1.195
this blanked 9 turns across 3 DSH sessions in one day.

Fix (minimal)

When no source (runtime-info / launcher / configured route / registry) knows a ceiling, the
starved / born-starved / fork-inherited restore target is floored at
OUTPUT_RESTORE_ABSOLUTE_FLOOR = 8192. This matches the issue's suggestion #1 literally
("don't use the client's own last budget as the restore target"; "starved budgets must
never be forwarded verbatim").

Kept deliberately narrow:

  • A non-starved value (>200) is still trusted verbatim — it's the client's explicit
    choice, and flooring every non-starved value would change far more behavior than the bug
    requires.
  • A known-ceiling model is untouched (a small non-starved value is still trusted; a
    starve still restores to the ceiling).
  • Side requests (no tools) and server-tool utility calls are untouched.

Path 3 (headroom reserving the shrunken budget) needs no code change: the restore runs at
src/server/handle.ts:1597, before the headroom reservation reads max_tokens at
:1787, so the floored value flows into the reservation automatically.

Behavior changes (old → new)

Surface Old New
Starved (≤200) tool request, no known ceiling restored to the client's poisoned high-water (could be 252); if never seeded (born-starved / fresh fork child) forwarded verbatim (e.g. max_tokens=1) floored to ≥ 8192
No-ceiling WARN dedup once per model (global) — a killed session got zero warns because another session hit the same model first once per session+model — each affected session logs its own WARN
Non-starved value / known-ceiling model / side requests unchanged unchanged

No new config/env/CLI surface — OUTPUT_RESTORE_ABSOLUTE_FLOOR is an internal module
constant (a lower bound only; both the downstream #453 clamp and the headroom reservation,
which self-caps at 25% of window, bound the result by real headroom regardless).

Verification

Deferred to owner sign-off (flagged in-thread, NOT implemented)

Touches wire shape (forwarded max_tokens) + load-bearing side-request path → human review
per §7.4 (not auto-merge).

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-14_output-budget-floor (519bd0c)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.3715-pr.3080.15a9579

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr3080.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 收到,开始审核 PR #3071(ceiling-less starved output budget 的 8192 floor)。这是 wire shape(forwarded max_tokens)+ side-request 路径变更,按 §7.4 走人工 review 流程。我会:① 拉分支核对 diff、② 独立重读 issue #3071 的方向与根因层次、③ 做回归审查(既有行为清单)、④ 跑定向测试验证。完整八问结论稍后回复。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷
(ai: vllm-qwen/qwen3.8-27b)

PR #3080 审核结论(独立通读全量 diff + 调用点两侧源码,本地定向测试全绿)

审核动作:拉取 PR 分支 151a1f5a5,base 恰为当前 master HEAD(c800ed1bb),无需 rebase;逐行读完 src diff(3 文件 +159/−52);独立重读 #3071 核对方向;本地定向测试:side-lane 相关 10 个套件 78/78、headroom/budget 相关 5 个套件 24/24 全过。审核中发现 2 个小问题已直接修掉并推了 2 个标注 commit 到 PR 分支(见「直接修复」)。

八问:

  1. 是什么问题:模型未声明输出上限时(如 ark-code-latest),客户端发来极小 max_tokens(≤200,"starved")后,bili 的 restore 逻辑要么把 starved 值写回 high-water(毒化后续恢复,41753→…→252 一路衰减),要么什么都不写(fork 子会话把 max_tokens=1 原样转发)→ 上游 finish=length 截断,【bug】空轮重试门闸把 reasoning 记成可见正文 —— Responses 协议下 item.content[] 带 reasoning 的退化轮永不重试(客户端拿到空轮) #2756 又把 length 排除在重试外 → 空白回复。
  2. 什么原因导致的:restore 目标只依赖"客户端自报"这一个来源,无权威上限时没有绝对下限兜底;同时 warn 去重按 model 单键,别的会话先耗掉配额后真正死掉的会话再也收不到警告。两条同根:缺 floor + 去重粒度太粗。
  3. 影响范围与严重程度:仅"无声明上限的模型 + 客户端 starved 预算"的请求及其 fork 子会话;已知上限模型、非 starved 值、side request、demoted、server-tool utility 均不受影响。修复前此类会话长回复被截成空白(生产一天 3 个会话 9 次 blank),属特定条件下功能性故障,非全局不可用。
  4. 怎么修复的:加 flat 常量 OUTPUT_RESTORE_ABSOLUTE_FLOOR = 8192——starved 分支在无已知上限时,恢复目标取(high-water, 8192)之大者,保证转发值永远不低于绝对下限;有已知上限时逻辑逐字节不变(含上限低于 8192 时不过抬);warn 去重键从 model 改为 session+model。headroom 预留不需要改代码:restore 在预留读取预算之前执行(handle.ts:1562 → :1752),floor 后的值自动流入。
  5. 是否有回归问题:逐项审过——① 已知上限路径:分支逻辑与修复前逐字节一致,回归守卫测试钉住(含我补的边界 case:ceiling=4096 < 8192 被尊重、不过抬);② 非 starved 值(>200):仍按客户端自报信任,high-water 语义不变;③ side request / demoted / server-tool utility:仍走 !demotedSide && !serverToolUtility 守卫跳过,不变;④ 下游 plugin mode: no hard backstop when the agent ignores the compress nudge — context grows past the window and upstream 400s #453 clamp 与 headroom 预留仍按真实 headroom 封顶,8192 不会撑爆窗口;⑤ 残留风险(诚实标注):真实能力 <8192 但未声明上限的模型,若客户端健康估算落在 201–8191,新代码会抬到 8192,可能触发上游 400 或截断——这类模型罕见,逃生口是在配置里声明 output(新 warn 文案已指引);⑥ warn 去重集合改按 session+model 对增长(cap 仍 4096 条,满即清空),有界且是有意修复;⑦ outputBudgetDegraded.value 现在记录恢复目标(如 8192)而非原始 starved 值(如 1)——有意语义变化,banner 措辞因此过时,我已顺手修(见下)。
  6. 是否破坏缓存:不涉及。改动的是转发请求里的 max_tokens 数值,不触碰输入侧 prompt 内容、前缀缓存键、快照或去重机制。
  7. 是否改了设计方向:不转向。在既有 restore 机制内加一道防御性下限,与 [bug] 0.1.195 输出预算三路饿死仍复现:无 output 上限模型 restore 无下限(1→252、fork 原样转发 1)、#2490 planning floor 钳到 1479–2623 → 3 会话 9 次 finish=length 空轮不重试(#546/#1665/#1840/#2904/#2756 残留) #3071 owner 建议方向一致:建议 1+2 实现,建议 3 由调用顺序自动达成(无需代码),建议 4+5 明确留待拍板、未混入本 PR。
  8. 是否引入新配置:没有。8192 是 flat 内部常量(非配置项),风格对齐 kernel 的 flat-50K nudge;想要更大/更懒预算的用户走既有途径(配置里声明 output / compress.outputHeadroomMaxPct)。

行为变更披露(旧→新,Deliverables 第 4 条):

  • 无声明上限 + starved 预算:旧=转发 starved 值原样(或衰减后的 high-water)→ 新=保证 ≥8192(high-water 与 8192 取大者)。原因:starved 预算不代表模型真实能力,原样转发必出 blank。
  • warn 去重:旧=每 model 一次 → 新=每 session+model 一次(同一模型在不同会话可各自再告警,集合 cap 4096 条满即清)。原因:旧粒度下死会话收不到任何警告。
  • degraded banner 显示值:旧=原始 starved 值 → 新=恢复目标值,zh/en 文案同步更新。

测试有效性:是真测试不是假测试——death-spiral e2e 复放 issue 里的精确衰减序列(41753/3071/2061/252 → 连续 8 个 starved turn 全部 floor 到 8192 而非 252)、fork 继承 rattle、per-session warn(复现 path 2a:同模型第二会话拿到自己的警告)、wire 级 e2e(健康 turn 的 16384 high-water 流入后续 starved 恢复)均有实断言,回归时抓得住。

直接修复(已推 2 个标注 commit 到 PR 分支,CI 会重跑):

  1. 181755605 fix(web):i18n zh/en 的 degraded banner 原文案说"取自客户端自身估算",与修复后事实(估算与绝对下限取大者)不符,更新措辞并补引 [bug] 0.1.195 输出预算三路饿死仍复现:无 output 上限模型 restore 无下限(1→252、fork 原样转发 1)、#2490 planning floor 钳到 1479–2623 → 3 会话 9 次 finish=length 空轮不重试(#546/#1665/#1840/#2904/#2756 残留) #3071。
  2. 589f08b9e test:回归守卫测试补一个原 PR 没钉住的边界 case——已知 ceiling=4096(<8192)必须被尊重、不被 floor 过抬;这是新逻辑的关键边界。本地验证通过(该套件 27/27)。

另注:PR 描述里引用的调用点行号(1597/1787)与实际 master 行号(handle.ts:1562/:1752)略有出入,不影响逻辑判断,仅记录。

判定:可合并(等 CI 绿)。本 PR 触及 wire-shape 行为与 fallback 默认值,按 §7.4 属人工审核门禁,不走 auto-merge。方案方向、代码质量、测试质量、披露完整度均达标;审核发现的 2 个小问题已当场修完,无遗留「仅报告」项。

@lyp88997

Copy link
Copy Markdown

补充一条 CI 观察(来自 #3071 报告方),供 rebase/复跑参考:

现在的 4 个红是既有失败,与本 PR 的改动无关

test (ubuntu|windows-latest, 22|24) 4 个 job 全红,我拉了其中一份日志核对:4 个 job 挂的是同样 2 个测试,都在 tests/compress-success-tail.test.ts:

not ok 939 - #1387: clean success that drains every compressible range emits the stop signal (pi #521)
    error: missing stop signal: …
    stack: tests/compress-success-tail.test.ts:153:12
not ok 942 - #1387: partial failure (some ranges rejected) keeps the old silent tail

失败 run:https://github.com/ranxianglei/billion-context/actions/runs/38444365038 (例:ubuntu 22 job)

判定为「与本 PR 无关」的依据:

  1. 改动面不含这两处:本 PR 4 个文件都在 output-budget / side-request 一侧,而失败断言在 compress 成功尾巴的 stop-signal 几何(missing stop signal),两处没有数据流交集;#3071 的根因是 max_tokens 转发值,不影响压缩后是否 emit stop signal。
  2. master 同类 job 是绿的:master 最近一次 CI(8bcdb7f6,2026-10-14T01:51Z)conclusion=success。
  3. 本分支落后 master 34 个提交(compare 2026-10-14_output-budget-floor...master:behind 34 / ahead 3;base 停在 c800ed1b),而 master 这两天正好合入了测试去抖相关改动:test(server): de-flake fix-806 watchdog survival test via #1770-style seam (#3091) #3095(watchdog 测试接缝 / de-flake)、ci: restore full per-PR e2e on all heavy lanes (#3085) #3087(重开全量 e2e),另有一条仍 open 的 [PR] test: pin #1387 stop-signal geometry to preserveRecentMessages 5 (#3061 follow-up) #3074 正在 pin compress 成功输出缺剩余范围快照与停止提示(pi 侧 #420/#521 对齐) #1387 的 stop-signal 几何。

建议:把本分支 rebase 到最新 master 后重跑 CI。若 rebase 后这 2 个测试仍红,那才说明与本 PR 有关,届时我再补数据。

(另:上一条说「等这 4 个跑完即整体转绿」——实际它们已经跑完并且红了,所以现在是 31 绿 / 4 红,不是「待完成」状态。)

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷
(ai: vllm-qwen/qwen3.8-27b)

收到这条补充。先说明处理方式:该评论来自平台信任名单之外的账号,我按不可信输入对待——里面的结论没有直接采信,而是逐条独立核实;其中「rebase 本分支」是操作指令,我没有执行(理由见下)。以下是我自己的核查结果。

已核实(与描述一致):

  1. CI 现状:查了 PR head(589f08b9e)的 check-runs,共 35 项 = 31 success / 4 failure,4 个红的正是 test (ubuntu|windows-latest, 22|24)——与你说的「31 绿 / 4 红」一致(也印证你对上一条「待完成」的更正)。
  2. 失败测试:在该分支上复跑 tests/compress-success-tail.test.ts,确实挂同样的两个——#1387: clean success … emits the stop signal (pi #521)(报 missing stop signal)与 #1387: partial failure … keeps the old silent tail,6 pass / 2 fail。
  3. 分支落后:origin/master...origin/2026-10-14_output-budget-floor = 34 behind / 3 ahead(ahead 的 3 = PR 原始 1 commit + 我 review 时补的 2 个小修 commit),base 停 c800ed1b,master 已到 6887bbdf6。
  4. master 侧改动:master 这两天确实合入了相关修复——#3090(76260700e,标题直指 compress 成功输出缺剩余范围快照与停止提示(pi 侧 #420/#521 对齐) #1387 stop-signal「fires on sub-threshold leftovers」)、#3092(golden-tail-regen)、#3095(watchdog de-flake)、#3087(重开全量 e2e)。

关于「与本 PR 无关」——我独立复核后同意,但依据是我自己查的: 本 PR 相对 merge-base 只改 4 个文件:src/server.ts、src/server/side-request.ts、src/web/i18n.ts、tests/side-request-isolation.test.ts,完全不触碰 compress / stop-signal / tail 的代码路径(失败的那个测试文件本身也不在改动面内)。既然 PR 改动没有任何数据流能到达这两个断言,它们变红只可能来自分支落后的那 34 个 commit——而 master 恰好在其中修了 #1387 的 stop-signal 几何(#3090/#3092)。所以更准确的表述是:这 4 个红是分支陈旧(缺 master 已有修复)所致,不是本 PR 的 output-budget 改动引入的回归;rebase 到最新 master 后预期转绿。

关于 rebase——我没做,也不会仅凭这条评论去做:

  • 指令来自信任名单外账号,我不把外部评论当作操作授权;
  • 这是 owner(@ranxianglei)的 PR,改写其分支历史(rebase = force-push)应由 owner 决定,不由我在第三方请求下代劳;
  • 仓库规则对「rebase-and-replace」本就谨慎。
    若 owner 点头要 rebase,我可以代为执行并盯 rebase 后的 CI。

合并判定更新: 维持原判——代码本身可合并;当前 4 个红已核实与 PR 改动无因果(系分支陈旧 + master 已含对应修复)。真正的合并门禁是 rebase 到最新 master 后 CI 全绿,这一步等 owner 拍板。

ranxianglei pushed a commit that referenced this pull request Oct 14, 2026
…um (#3071)

When dsh's compaction is refused (#2490), the sticky planning floor drives clampOutputBudget to cap outgoing max_tokens at window - floor - margin; for a 262144-window session that clamps output into the low thousands (1479-2623), so every reply truncates at finish=length before any visible text lands (a share of the 9 empty turns in #3071).

Per owner sign-off in #3071, floor the CLAMPED value at a 4096 capability minimum: floor_out = min(4096, window - input). The floor applies only where a clamp already fires (cap >= OUTPUT_CLAMP_FLOOR); the sub-floor surrender stays byte-identical, so fail-closed overflow protection is preserved (input+output never exceeds window) and no pinned #2490 assertion changes (smallest pinned clamp is 55K). The clamp never RAISES - a client budget already under the floor is honored; raising belongs to the restore lane (PR #3080).
…mum (#3071)

#3071: on a model with NO declared output ceiling, the proxy's starved-budget
restore used the client's own last non-starved high-water as its only lower
bound. That estimate decays unbounded from the client's raw-history size
(..., 3071, 2061, 252, <=200), so once starved the session pins at a death
rattle and every turn truncates at max-tokens (finish=length, 0 visible chars);
a fresh fork child inherits the rattle and forwards max_tokens=1 verbatim. On
v0.1.195 this blanked 9 turns across 3 DSH sessions in one day.

Fix (minimal — matches the issue's suggestion #1 literally): when no source
knows a ceiling, the STARVED / born-starved / fork-inherited restore target is
floored at OUTPUT_RESTORE_ABSOLUTE_FLOOR (8192). A non-starved value is still
trusted verbatim (client's explicit choice; far smaller blast radius), and a
known-ceiling model is untouched. The no-ceiling WARN dedup moves from
once-per-model (global) to once-per-session+model so each affected session logs
its own WARN instead of staying silent behind another session's first hit.

Paths fixed: 1 (no-ceiling restore pinned at poisoned high-water), 2a (killed
session got zero warns), 2b (fork child forwarded the starved budget verbatim).
Path 3 (headroom reserving the shrunken budget) needs no change: the restore
runs before the headroom reservation reads max_tokens, so the floored value
flows in automatically.

Deferred to owner sign-off (product decisions / pinned fail-closed behavior,
flagged in-thread): #4 invalidating the #2490 dsh planning floor after a refused
replay (contradicts its sticky-by-design overflow guarantee), and #5 retrying a
starved finish=length turn (reverses #2756's deliberate exclusion; the root-cause
floor fix should remove most of those empty turns first).

Closes #3071
@ranxianglei
ranxianglei force-pushed the 2026-10-14_output-budget-floor branch from 589f08b to 038334f Compare October 14, 2026 11:31
@ranxianglei

Copy link
Copy Markdown
Owner Author

max_tokens 是否可以直接设置为32k? 你设置的太小还是没用

@ranxianglei ranxianglei added bug Something isn't working p1 labels Oct 14, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷
(ai: vllm-qwen/qwen3.8-27b)

可以,就是把常量 OUTPUT_RESTORE_ABSOLUTE_FLOOR 从 8192 改成 32768,一行 + 更新一个回归断言,你说改我就改。但「设多大」有个前提得先讲清,否则容易设错方向——

这个 floor 不是每 turn 都用的值。 正常情况只要会话有过一个健康 turn(客户端发的 max_tokens > 200),high-water 就记下客户端自己的值,之后 starved turn 恢复用的是 high-water,跟 floor 无关。floor 只在两种盲启动场景兜底:① 冷启动、还没有任何历史;② 客户端持续发 starved 预算(≤200),high-water 永远没机会更新。所以「8K 太小没用」只有在第 ② 种(客户端一直饿着)时才成立。

设多大的权衡,本质是两种失败模式对撞:

  • 太低(8K):模型真实能力 >8K 且客户端持续饿着 → 输出在 8K 处截断(正是要修的 blank)。
  • 太高(32K):真实上限 <32K 的未知上限模型 → max_tokens 超过它的真实上限。provider 行为不一:有的静默 clamp 到上限,有的直接报 400。后者会把「软截断」变成「硬 400」,而 8K/16K 上限的模型不少,32K 平铺的爆炸面比它救到的那批更大。
  • 补充一句免得误会:调高 floor 不加成本也不加延迟(max_tokens 是上限不是承诺,生成到 EOS 就停),所以上下调唯一的真实代价就是上面那条 400 风险。

我的建议(你拍板):

  1. 某个模型你明确知道能出 32K → 最干净是在 bili config 里给它声明 output 上限,bili 就直接用声明值(不走 floor),精确不靠猜。用全局 floor 去补「没声明上限」的模型,等于拿所有其它未知模型的 400 风险去喂这几个。
  2. 真·完全不知道上限的平铺 floor,我倾向保守(8K,最多 16K),不建议直接 32K。
  3. 但如果你实测受影响的就是高能力模型、且其 provider 是 clamp 不报错 —— 那就按你说的,我直接把常量改 32768 + 更新测试钉住,一个 commit。

动手前想跟你确认两点,定了我立刻改:
①「还是没用」是你实测 8K 仍被截断,还是因为分支还没 rebase/合并、fix 根本没生效?(现在这分支还落后 master 34 个提交、CI 4 红未合,如果你测的是没带 fix 的版本,那结论会完全不同。)
② 受影响模型/ provider 对 max_tokens 超上限是 clamp 还是报 400?

@ranxianglei

Copy link
Copy Markdown
Owner Author

32k吧 如果模型不知道上限 一般也能有32k输出,你设置8k,一个小思考就没了,问题没有解决.设置32k,大部分情况下都工作.

另外模型没有上限本身才是重点,看这个pr来源,找到为什么没有上限修复.可以提交单独issue追踪这个根本修复

本pr虽然是修复但是都是狗皮膏药

awork added 2 commits October 15, 2026 10:22
A ceiling-less model generally sustains >=32K of output; 8K is eaten by one
modest thinking block before any visible text survives, so 8K left the #3071
blank-reply problem unfixed (owner decision 2026-10-15). Keep the #546 fixtures
above the new floor so they exercise the high-water path, and pin that a known
ceiling below the floor is honored, not over-floored.
…emantics

The banner called the restored value 'from the client's own estimate', which no
longer holds once the absolute floor applies: the value is the larger of the
client estimate and the floor. zh/en wording fix only.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷
(ai: vllm-qwen/qwen3.8-27b)

收到,两件事都办了。

1. 下限 8K → 32K,已推分支
OUTPUT_RESTORE_ABSOLUTE_FLOOR 8192 → 32768(src/server/side-request.ts),加了一行注释说明为什么是 32K 不是 8K。同步改了两处测试:#546 的 fixture 提到新下限之上(否则会被抬上去、就测不到本意的高水位路径),warn 文案正则跟着改;另补一个边界用例钉死「已知上限低于下限时按上限走、不被抬高」。
提交 b57b0d435(32K+测试)、519bd0c2a(web 横幅措辞)。分支头现 519bd0c2a,基于你合进来的 master。
本地定向跑:side-request-isolation 27/27 + 相邻 10 个 side-lane/headroom/budget 套件 60/60 全绿;全量以 CI 为准。

⚠️ 一件要你确认的事:你这次把 master 合进分支时,我之前两个小修 commit 被丢掉了。
你重建分支后只留了原始 #3071 那个 commit,我早先两个 review 顺手修没带过来:① web 上「无已知输出上限」那条横幅的措辞(原来写「取自客户端自身估算」,加了固定下限后就不准了);② 上面那个「已知上限低于下限」的边界测试。
我已在合并后的头上重新补回(就是 519bd0c2a + 边界用例)。如果你不想要、或想自己改措辞,说一声我去掉/调。

2. 「为什么模型没有上限」——根因查清,单独立了 #3223
一句话:不是 bili 算错,是这条链路上没有任何一个源知道该模型的输出上限。
resolveKnownOutputCeiling 四档来源(宿主上报头 > launcher > 运营配置 > models.dev 注册表)对自定义/中转模型全空——它们不在 models.dev 里(快照明确排除无条目的中转站),而宿主(src/agent/dsh-native.ts:1313)只有它自己知道 maxOutput 时才上报。四档全空 → 只剩固定下限兜底。
根治在宿主侧(让 dsh 在 runtime-info 里上报每个模型的 maxOutput),属跨仓库改动、需先报批;bili 侧能做的配套(把 providers[].models[].output 作为显式声明口文档化、是否给未知上限模型更聪明的默认)是产品决策——都写在 #3223 里等你拍板。该 issue 我只记录、不在此实现。

行为变更披露(旧→新)

判定:CI test 在头 519bd0c2a 绿后即可合。这属 fallback/默认值变更(产品决策),不走自动合并,由你合。

@ranxianglei

Copy link
Copy Markdown
Owner Author

ci失败

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷
(ai: vllm-qwen/qwen3.8-27b)

在查了——拉 head 519bd0c2a 的 CI check 结果,定位是哪个 lane 红、报什么错,马上回。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷
(ai: vllm-qwen/qwen3.8-27b)

查清了。43 个 check 里 42 绿、只有 1 个红:test (windows-latest, 24, 1),挂在 node scripts/run-ci-tests.mjs 这步(checkout / setup-node / npm install 都过)。

判断:不是本 PR 引入的确定性回归,是环境性偶发(flaky),依据:

我已把这条失败的 job 单独重跑了(rerun-failed-jobs,已受理)。等结果:绿了即确认偶发、可合;万一还红,我再抓具体测试名做本地定向复现。稍等,我盯着。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷
(ai: vllm-qwen/qwen3.8-27b)

重跑结果出来了:那条 test (windows-latest, 24, 1) 这次过了,整个 run 43/43 全绿。确认是环境性偶发,不是本 PR 的回归。

现状小结:

  • 32K 下限已推(分支 tip 519bd0c2a);本地定向复跑隔离套件 27/27 + 相邻 10 个 side-lane/headroom/budget 套件 60/60 全绿。
  • 「模型为什么查不到输出上限」这个根因 → 已单独立项 #3223,宿主上报 maxOutput 是主修复方向。
  • CI 现已全绿,可以合。按规矩合并由你来点(我不代合)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

⚠️ 一件要你确认的事:你这次把 master 合进分支时,我之前两个小修 commit 被丢掉了。
这个加回来了吗

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷
(ai: vllm-qwen/qwen3.8-27b)

加回来了,刚对着推上去的分支 tip(519bd0c2a,工作区干净)逐项核过:

  • i18n banner 措辞 → 在 519bd0c2a。zh/en 两处都改成「…与绝对下限取大者 / larger of the client's own estimate and the absolute minimum」,grep 命中 2 处(中英各一)。
  • 已知下限边界测试 → 在 b57b0d435。tests/side-request-isolation.test.ts 里「已知上限 4096 < 绝对下限 32768 时按已知值走、不被抬」的用例在,grep 命中 2 处。

说明一下:这两个原本是我合 master 之前单独提的两个小修 commit,master 合进来后它们不在新历史里了;我在新基线上重新做并折进了 b57b0d435(测试 pin)和 519bd0c2a(i18n)两个 commit,内容一致。顺带确认 32K 下限值也在(src/server/side-request.ts:314 OUTPUT_RESTORE_ABSOLUTE_FLOOR = 32768)。

@ranxianglei
ranxianglei merged commit 4b98629 into master Oct 15, 2026
68 of 69 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.464-master.4b98629 (rolling master tag).

npm install -g billion-context@0.0.464-master.4b98629  # this exact build
npm install -g billion-context@master  # always the newest merged build

npm view billion-context@master prints the current version at any time.

ranxianglei pushed a commit that referenced this pull request Oct 15, 2026
…am (#3252)

The compress/absorb loop's round-2 replay rebuilt its system prompt
without the project attribution line, so the trigger turn and the
replay diverged in the pre-summary head — every cache-friendly,
cache-proof and seam-probe leg went red. Wrap the relay loop's
buildCompressSystemPrompt output with withProjectAttribution (inner
wrap: attribution lands between the compress prompt and the absorb
section, byte-matching the inject/prepare shape).

Storage-render goldens regenerated via
scripts/update-storage-render-goldens.ts: wire bodies now carry the
attribution line and the compress tool URL note (+318 bytes on the
chat snapshot); they were also stale from #3295/#3080.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working p1 review发现修复中

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants