Repository navigation
fix(catalog): exclude generic 128k default from combo context min() (#10734) - #10793
Conversation
|
Verified this fix end-to-end -- the production change is correct and does what the title says. Confirmation: I built a real (not fabricated) combo One suggestion (non-blocking): 3 of the 7 shipped tests -- including the flagship "GET /v1/models does not advertise 128k" integration test -- use For a regression guard that actually exercises |
…iegosouzapw#10734) (diegosouzapw#10793) Merged via merge-train (release/v3.8.50, batch1 2026-08-20) — static gates (typecheck/file-size/complexity/cognitive/changelog) green on the combined tree; test:unit reds observed in the boarded run were verified pre-existing on the pure release tip (unrelated flake), not caused by this PR. Thanks for the contribution!
Summary
context_lengthin/v1/modelsis the min of sourced member windows only (canonical window or a provider/model-specific token limit).getTokenLimit()'s generic 128000 catch-all (specific: false) is no longer treated as a known window, so a 500k combo is not advertised as 128k because an unsourced or generic-default member enteredmin().context_lengthoverrides still win. Nested combo-refs inherit the same sourced-min rule.Closes #10734
Test plan
node --import tsx/esm --test tests/unit/combo-context-generic-default-10734.test.tsnode --import tsx/esm --test tests/unit/combo-context-prefix-resolution.test.tsnode --import tsx/esm --test tests/unit/models-catalog-combo-metadata.test.tsnode --import tsx/esm --test tests/unit/resolveComboContextLimit.test.tsGET /v1/modelsfor a combo whose catalogued members are 500k (plus an unsourced member) advertises 500000, not 128000