Repository navigation
fix: runaway guard must not count Google-lane tool-call arguments as model output (#3358) - #3362
Closed
ranxianglei wants to merge 1 commit into
Closed
ranxianglei wants to merge 1 commit into
ranxianglei wants to merge 1 commit into
Conversation
…n lane (#3358) The #3260 text-run guard counts decoded text-family leaves outside excluded branches to catch single-codepoint output loops. Exclusion propagates by KEY, and the list covered openai (arguments), anthropic (input) and responses (event-type skip) — but google tool calls ride parts[].functionCall.args with payload leaves named content/text, so a write-tool payload of >=200 identical characters aborted the turn. That re-breaks the #1039 invariant (tool-call arguments are user intent, never counted) on the one wire the original list missed. Add functionCall/args/parameters to EXCLUDED_BRANCHES.
Contributor
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.3963-pr.3362.b19949bThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3362.tgz
npm install -g packageInstall instructions are refreshed on each push. |
Owner
Author
|
(ai: vllm-qwen/qwen3.8-27b) Closing as duplicate of #3357 (first-come: #3357 was opened earlier and covers the identical mechanism — same three keys added to EXCLUDED_BRANCHES, equivalent JSON-built regression + control tests, placed in the issue3260 test file which is the canonical home for this feature). No unique content lost by closing this one. |
This was referenced Oct 16, 2026
This was referenced Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(ai: vllm-qwen/qwen3.8-27b)
Fixes #3358
What
The #3260 text-run circuit breaker (abort a turn after >=200 consecutive identical code points in decoded model text) walks every response frame and feeds text-family leaves (
content/text/…) into its run counter, excluding tool-argument containers by key name. The exclusion list covered openai chat (arguments), anthropic (input) and Responses (event-type skip) — but Google-wire tool calls rideparts[].functionCall.args, wherefunctionCall/argsare NOT in the exclusion set while payload leaves ARE literally namedcontent/text. Result: a model writing a file whose content contains 200+ identical characters (separator runs, placeholder=lines, long base64-ish runs) gets its WHOLE TURN ABORTED on the Google lane. Default-on, no knob.This is the #1039 invariant (tool-call arguments are user intent — never filter/count them) broken on exactly one of the four wires bili speaks. Discovered in the #3331 release-window cross-audit (third-party audit flagged it; I verified link-by-link in source before fixing).
Change
src/runaway-guard.ts: addfunctionCall,args,parameterstoEXCLUDED_BRANCHES(+ comment documenting why each wire's container needs its own key — that propagation-by-key fact is what let this slip).Tests
tests/runaway-guard.test.ts:functionCall.args.content= 300 identical chars → does NOT trip, byte-exact forward (verified RED on unfixed code, GREEN with fix);parts[].text= 250 identical chars → still trips astext-run(guards against over-exclusion).Targeted suite: 16/16 green locally; full verdict = CI lanes on this head.
Behavior change disclosure
None intended beyond removing the false positive: legitimate turns that were being killed now complete; genuine degenerate model-output runs on every wire still trip as before.