[codex] Support model-defined reasoning efforts (#26444)

## Summary
- accept non-empty model-defined reasoning effort values while
preserving built-in effort behavior
- propagate the non-Copy effort type through core, app-server, TUI,
telemetry, and persistence call sites
- preserve string wire encoding and expose an open-string schema for
clients
- update model selection and shortcut behavior for model-advertised
effort values

## Root cause
`ReasoningEffort` gained a string-backed custom variant, so it could no
longer implement `Copy` or rely on derived closed-enum serialization.
Existing consumers still moved effort values from shared references and
assumed a fixed built-in value set.

## Validation
- `just fmt`
- Local tests and compilation were not run per request; relying on CI.
This commit is contained in:
Ahmed Ibrahim authored and GitHub committed 2026-06-04 13:36:24 -07:00
1 parent 4a70e0ac1b
commit 8ac304c299
97 files changed
+685 -581

No files matched your search

+2 -2
View File
@@ -79,7 +79,7 @@ impl ChatWidget {
let default_model = session.model.clone();
self.current_collaboration_mode = self.current_collaboration_mode.with_updates(
Some(default_model.clone()),
Some(session.reasoning_effort),
Some(session.reasoning_effort.clone()),
/*developer_instructions*/ None,
);
match session.collaboration_mode.as_deref() {
@@ -93,7 +93,7 @@ impl ChatWidget {
Some(&default_model),
);
if let Some(mask) = self.active_collaboration_mask.as_mut() {
mask.reasoning_effort = Some(session.reasoning_effort);
mask.reasoning_effort = Some(session.reasoning_effort.clone());
}
self.update_collaboration_mode_indicator();
self.refresh_plan_mode_nudge();