[codex] Generalize service tier slash commands#21745
Merged
Merged
Conversation
aibrahim-oai
added a commit
that referenced
this pull request
May 8, 2026
Co-authored-by: Codex <noreply@openai.com>
3a80749 to
b170e31
Compare
aibrahim-oai
added a commit
that referenced
this pull request
May 8, 2026
Co-authored-by: Codex <noreply@openai.com>
7544f36 to
b4e5705
Compare
fcoury-oai
approved these changes
May 8, 2026
Contributor
fcoury-oai
left a comment
There was a problem hiding this comment.
Tested the behavior with gpt-5.5 and gpt-5.4 that advertises service_tiers for fast and it worked as expected.
Code looks good, left one optional nit to address.
Approved! 👍
| .unwrap_or(false) | ||
| } | ||
|
|
||
| fn current_model_fast_service_tier(&self) -> Option<ServiceTierCommand> { |
Contributor
There was a problem hiding this comment.
nit: we are trying to avoid adding new methods to chatwidget given it's huge size. Do you think we could take this opportunity and extract a new module for service tiers?
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
5018f71 to
0f21d01
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Why
/fastwas wired as a one-off slash command even though model metadata now exposes service tiers as catalog data. That meant adding another tier, such as a slower/cheaper tier, would require more hardcoded TUI plumbing instead of letting the model catalog drive the available commands.This change makes service-tier commands data-driven: each advertised
service_tiersentry becomes a/namecommand using the catalog description, while the request path sends the tieridonly when the selected model supports it.What Changed
/fastslash-command variant and introduced dynamic service-tier command items in the composer and command popup./nameselects that tier, and invoking it again clears the selection.fast, while still sending the tier request value such aspriority.service_tierswithid: "priority"andname: "fast"./responsesrequests.Validation