Repository navigation
[PR] fix: isolate Google query-key throttle holds - #7187
Merged
ranxianglei merged 1 commit intoNov 20, 2026
Merged
ranxianglei merged 1 commit into
ranxianglei merged 1 commit into
Conversation
This was referenced Nov 18, 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.
Fixes #7186.
Problem
Google native requests can authenticate with a
keyor$keyquery parameter. The 429 governor fingerprints only credential headers, so independent query-authenticated accounts on the same supplier host share one anonymous hold. A 429 for account A prevents account B from reaching its available provider quota, including the pre-ingest gate for large requests.Change
Extend the shared hold-key helper for native Google model RPC paths. When no effective recognized credential header exists, an unambiguous non-empty query key uses the existing credential fingerprint. The same key in the query or Google header therefore identifies the same account.
Existing header identities and mixed header/query behavior remain unchanged. Conflicting repeated values, unrelated parameters, and non-Google route forms retain their previous handling. No raw query credential is stored in a hold or added to diagnostics. No configuration, kernel, or model-visible text changes.
Validation
startServerrequests against a controlled local HTTP supplier now observe A → upstream 429, B → upstream 200, A retry → local 429. Both small and >1 MiB requests are exercised.npm run typecheck,npm run build,npm run check:test-import-graph, andgit diff HEAD^ --checkpassed. Worktree-local kernel and pi-subagents builds match base3f0c1d21.Real Codex preflight found the CLI and built proxy, but the configured upstream on port 8199 is unreachable. The real-model four-phase run has not run and remains required before merge; a skipped CI job is not evidence that this gate passed. Full-suite verification belongs to remote CI.
Duplicate screening
Checked all 268 pre-existing fork heads, 66 throttle-file and 742 ledger-file upstream history commits, and the actual changes in #2150, #4235, #6154, #5207, #5696, and #5905. None implements query-key hold identity.