[codex] Use model-advertised reasoning effort order (#26446)

## Summary
- preserve the model catalog order for app-server
`supportedReasoningEfforts` and document that client contract
- render TUI reasoning choices in the advertised order
- step reasoning shortcuts by adjacent list position instead of deriving
order from known effort names
- anchor unsupported configured values to the advertised default, or the
first option when needed
- remove canonical effort ordering helpers and the unused upgrade effort
mapping

## Validation
- `just fmt`
- Local tests and compilation were not run per request; relying on CI.

Stacked on #26444.
This commit is contained in:
Ahmed Ibrahim authored and GitHub committed 2026-06-04 14:01:14 -07:00
1 parent 8ac304c299
commit f6e529656f
10 files changed
+73 -166

No files matched your search

+3 -8
View File
@@ -375,15 +375,10 @@ impl ChatWidget {
|| preset.model.starts_with("gpt-5.1-codex-max")
|| preset.model.starts_with("gpt-5.2");
let mut choices: Vec<ReasoningEffortConfig> = ReasoningEffortConfig::known_values()
.filter(|effort| supported.iter().any(|option| option.effort == *effort))
let mut choices: Vec<ReasoningEffortConfig> = supported
.iter()
.map(|option| option.effort.clone())
.collect();
choices.extend(
supported
.iter()
.filter(|option| option.effort.known_rank().is_none())
.map(|option| option.effort.clone()),
);
if choices.is_empty() {
choices.push(default_effort.clone());
}