Skip to content

fix(sub): map Codex -fast to service_tier priority - #217

Merged
fkiene merged 1 commit into
mainfrom
feat/sub-codex-fast-service-tier
Jul 26, 2026
Merged

fix(sub): map Codex -fast to service_tier priority#217
fkiene merged 1 commit into
mainfrom
feat/sub-codex-fast-service-tier

Conversation

@fkiene

@fkiene fkiene commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

Claude Code model ids ending in -fast were already stripped to the base model id on the sub path, but the Codex Responses body never set service_tier. That made -fast a silent no-op under sub / /sub.

This wires the existing normalize_incoming fast flag into the Codex request as service_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() from normalize_incoming
  • Codex build_request_body_with_priority inserts service_tier when requested
  • Unit tests for fast / non-fast / Grok literal suffix

Test plan

  • cargo test -p llmtrim --lib reroute (local)
  • CI green
  • Spot-check: map a Codex model with -fast and confirm body has service_tier: "priority" and no -fast in model

Notes

Reactive fix only — no new config/env. Parity with claude-code-proxy's -fast → Priority mapping.

@fkiene
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
fkiene force-pushed the feat/sub-codex-fast-service-tier branch from 89208ae to 4ca4655 Compare July 26, 2026 09:19
@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.79518% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/llmtrim-cli/src/reroute/mod.rs 98.33% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@fkiene
fkiene merged commit 8c9781a into main Jul 26, 2026
30 checks passed
@fkiene
fkiene deleted the feat/sub-codex-fast-service-tier branch July 26, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant