mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
[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:
1 parent
4a70e0ac1b
commit
8ac304c299
97 files changed
+685
-581
No files matched your search
@@ -562,7 +562,7 @@ impl ChatWidget {
|
||||
match item {
|
||||
StatusLineItem::ModelName => Some(self.model_display_name().to_string()),
|
||||
StatusLineItem::ModelWithReasoning => Some(self.model_with_reasoning_display_name()),
|
||||
StatusLineItem::Reasoning => Some(self.reasoning_display_name().to_string()),
|
||||
StatusLineItem::Reasoning => Some(self.reasoning_display_name()),
|
||||
StatusLineItem::CurrentDir => {
|
||||
Some(format_directory_display(
|
||||
self.status_line_cwd(),
|
||||
@@ -762,15 +762,16 @@ impl ChatWidget {
|
||||
/*max_chars*/ 32,
|
||||
)),
|
||||
TerminalTitleItem::Reasoning => Some(Self::truncate_terminal_title_part(
|
||||
self.reasoning_display_name().to_string(),
|
||||
self.reasoning_display_name(),
|
||||
/*max_chars*/ 32,
|
||||
)),
|
||||
TerminalTitleItem::TaskProgress => self.terminal_title_task_progress(),
|
||||
}
|
||||
}
|
||||
|
||||
fn reasoning_display_name(&self) -> &'static str {
|
||||
Self::status_line_reasoning_effort_label(self.effective_reasoning_effort())
|
||||
fn reasoning_display_name(&self) -> String {
|
||||
let effort = self.effective_reasoning_effort();
|
||||
Self::status_line_reasoning_effort_label(effort.as_ref())
|
||||
}
|
||||
|
||||
fn model_with_reasoning_display_name(&self) -> String {
|
||||
|
||||
Reference in new issue
Block a user