fix(sub): map Codex -fast to service_tier priority - #217
Merged
Conversation
fkiene
enabled auto-merge
July 26, 2026 09:19
Incoming model ids ending in -fast already normalized to the base id, but the Codex Responses body never set service_tier. Wire priority when the client requested -fast; leave Grok literal -fast model ids alone. Signed-off-by: François Kiene <46886660+fkiene@users.noreply.github.com>
fkiene
force-pushed
the
feat/sub-codex-fast-service-tier
branch
from
July 26, 2026 09:19
89208ae to
4ca4655
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Summary
Claude Code model ids ending in
-fastwere already stripped to the base model id on the sub path, but the Codex Responses body never setservice_tier. That made-fasta silent no-op undersub//sub.This wires the existing
normalize_incomingfast flag into the Codex request asservice_tier: "priority". Grok model ids that literally end in-fast(e.g.grok-composer-2.5-fast) are left alone — only the Codex path applies the tier.Changes
incoming_wants_priority_tier()fromnormalize_incomingbuild_request_body_with_priorityinsertsservice_tierwhen requestedTest plan
cargo test -p llmtrim --lib reroute(local)-fastand confirm body hasservice_tier: "priority"and no-fastinmodelNotes
Reactive fix only — no new config/env. Parity with claude-code-proxy's
-fast→ Priority mapping.