Repository navigation
Conversation
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.
Related: #155582
What Problem This Solves
Custom OpenAI-compatible Responses models cannot enable Fast mode even when their endpoint accepts priority service tiers.
User Impact
Operators can opt a model into Fast mode with
compat.supportsServiceTier: true. Custom routes remain opted out by default; an explicitfalsealso disables service-tier use on native OpenAI routes. This declares protocol support, not upstream entitlement, latency, or pricing.This remains a draft proposal pending the shared-config versus provider-plugin design decision in the linked issue.
Why This Change Was Made
The catalog and request path share the capability decision for HTTP(S) Responses endpoints. Fast on maps to
priority, off adds no Fast-derived tier, and auto keeps the existing per-request cutoff. Transport-provided tiers and explicitserviceTier/service_tierparameters retain precedence; an explicit tier disables an ineffective Fast control.Provider-owned Fast policies retain authority, including xAI and MiniMax. An unrelated stream wrapper does not suppress the generic fallback. Service-tier opt-in does not enable storage, prompt caching, compaction, or native Codex behavior.
Public model rows compute capabilities from the selected route's paired private runtime entry. This preserves explicit opt-out after logical catalog projection while keeping raw
compatandparamsout of the public response.Evidence
models.listregression failed before the repair (supportsFastMode: truedespite explicit opt-out) and passed afterward. It uses opposite capability flags on sibling routes and verifies that private fields are not published.pnpm buildpassed for the migrated implementation (11m42s), before the final projection repair. The affected source was subsequently compiled by the focused test runner; the full build was not repeated for that repair.f5c33d7aa0a9cf1b5faf37596bbe561ec873e1f9and the history-preserving merge commit1aa70ab0c25899e5940da7f529c6e9ac78088ec1have identical trees.Current validation uses synthetic credentials and isolated state. No paid upstream, native Codex execution, or live Gateway/browser run was performed for this refresh. The full unscoped test suite and full
pnpm checkwere not run. Hosted CI results are separate from these local results.Measured test costs for this refresh
All commands used the repository
pnpm testwrapper with--maxWorkers=1.src/gateway/server-methods/models-list-result.service-tiers.test.ts, before repairThe service-tier file spends most of its wall time preparing compiled dependencies; its six test bodies take about 2.5 seconds. Public catalog composition is required to catch the lost private capability that direct policy tests missed. Hosted CI timing is not available yet.
Historical UI evidence from the original implementation (6444363)
These inspected captures and the original isolated Gateway/browser run predate this refresh; they are retained as historical evidence, not current-head UI validation.
Before: undeclared capability keeps Fast disabled
After: opted-in custom model exposes Fast
Fast on: actual request uses priority
Fast off: actual request omits service tier
Explicit flex tier: Fast stays disabled