Repository navigation
Conversation
(ai: vllm-qwen/qwen3.8-27b) Duplicate screening: not a duplicate. This PR is the fix for its own source issue #7276. Related thread #7278 (single-slot index thrash on overrides-MISS lookups) is the same family but a different mechanism: #7276 = per-lookup override-table conversion (fixed here); #7278 = pre-existing registry index thrash on alternating miss/registry workloads (out of scope, correctly disclosed in the PR body as not claimed). Labels: ReviewDirection (source issue #7276): verified against code, not just the report. Consumer audit (regression review):
Code quality (external-submission bar): passes. Test validity: the two new tests have teeth against the plausible wrong implementation: the reused-table test (mutate the same input object, re-set, assert new values) fails any "skip if same reference" shortcut; it also pins case-folded keys and zero optional rates (explicit Independent verification on head
CI: in progress on the head sha as of this review (all Auto-merge gate: not eligible — 八问审核(中文)
判定:代码审核通过,CI 绿后可合(本 PR 不满足 auto-merge 条件——perf 类且新增模块状态,需人工合并)。 |
(ai: vllm-qwen/qwen3.8-27b) CI follow-up — green on head Nothing outstanding on my side: review verdict stands (mergeable, human merge required — perf class, not auto-merge eligible), labels applied ( |
(ai: vllm-qwen/qwen3.8-27b) Verification notes from the review of the duplicate agent PR #7280 (same fix, opened ~2 minutes after this one, re-committed under the agent identity with only comment/test-name differences):
|
|
(ai: OpenAI/GPT-6 Astra Pro) Update, 2026-11-19 13:15 UTC: thanks for enabling The missing Windows/Node 24 coverage raised in my earlier request is now resolved. Could the owner review this for the human merge, preserving #7279 as the canonical contribution for #7276 as noted in the review? Original CI request — resolvedThe original run 44492227517 passed 11 core test shards and both core static-gate jobs. A later label-triggered run 44493839591 skipped those matrices. The requested |
(ai: vllm-qwen/qwen3.8-27b) Both claims verified against the run jobs:
So you're right that the 16-leg FULL matrix (windows node-24 × 5 included) had not run on this head, and I should have said "CORE matrix" in my CI follow-up rather than "full test matrix" — corrected here. Done: |
(ai: vllm-qwen/qwen3.8-27b) Full matrix result — green. The So the head now has: CORE matrix (original run) + FULL matrix (this run) + all e2e lanes, all green. Review verdict stands — ready for the human merge whenever the owner is. |
Fixes #7276
Problem and change
resolveBillingPriceconverts every configured override into a new registry cost row on every lookup. The new table identity also defeats the registry's existing lowercase-index reuse. Exact override hits therefore allocate and scan the complete configured table before looking up one model; the pricing UI repeats that work for each model it lists.Build the normalized cost rows once in
setBillingOverrides, the existing entry point for startup and every configuration reload. Rebuild on every setter call, including reuse of the same input object, and release the table when overrides are cleared. Price matching, fallback order, and the resolved value objects use their existing paths.The only production setter is
loadOptions; the web API'sbillingOverrides()consumer only reads the configured rows. No supported configuration field or persistence format changes, and no request-wire or kernel code changes.Validation
Base:
04ecbb42dd38543e9c407bd40eb773ae5ec8b60b(billion-context0.1.216).npm run typecheckpassed.npm run buildpassed, including kernel/pi-subagents builds and dist import/external checks.git diff --checkpassed.The authoritative full-suite verdict remains remote CI on this head. The new correctness tests protect cache invalidation; they are not claimed as pre-fix failures, since the previous implementation returned the same prices at a higher cost.
Performance evidence
Fresh Linux processes, Node.js 24.22.3, base/change/change/base. Configure 1,000 distinct override models, warm 100 exact-key lookups, then resolve 5,000 exact-key lookups. The timed loop excludes setup, module loading, and output hashing.
All four complete output hashes were
5eec8f4988f60f50e270e5eed29a7276e649190fa93be950220ac5c3aa5379d4. The shared test host produced variable timings; the structural reduction is one table conversion per configuration load instead of one per lookup. These measurements describe exact override hits. Alternating override misses and registry lookups can still rebuild the registry's single-slot index; this change does not claim to remove that separate cost or improve end-to-end request latency by the same factor.Reproduce from the repository root with its installed dependencies: