From 305fe73d83cdb8d30ea49a9f579936d066bf857b Mon Sep 17 00:00:00 2001 From: Ahmed Ibrahim Date: Wed, 12 Nov 2025 21:56:30 -0800 Subject: [PATCH] copy for model migration nudge (#6585) --- codex-rs/tui/src/app.rs | 2 +- codex-rs/tui/src/chatwidget.rs | 2 +- ...twidget__tests__model_selection_popup.snap | 2 +- codex-rs/tui/src/model_migration.rs | 27 +++++++------------ ...ration__tests__model_migration_prompt.snap | 2 +- ...ts__model_migration_prompt_gpt5_codex.snap | 2 +- ...odel_migration_prompt_gpt5_codex_mini.snap | 2 +- 7 files changed, 15 insertions(+), 24 deletions(-) diff --git a/codex-rs/tui/src/app.rs b/codex-rs/tui/src/app.rs index 720976561..42967a7c5 100644 --- a/codex-rs/tui/src/app.rs +++ b/codex-rs/tui/src/app.rs @@ -84,7 +84,7 @@ async fn handle_model_migration_prompt_if_needed( return None; } - match run_model_migration_prompt(tui, &target_model).await { + match run_model_migration_prompt(tui).await { ModelMigrationOutcome::Accepted => { app_event_tx.send(AppEvent::PersistModelMigrationPromptAcknowledged { migration_config: "hide_gpt5_1_migration_prompt".to_string(), diff --git a/codex-rs/tui/src/chatwidget.rs b/codex-rs/tui/src/chatwidget.rs index a92b28db6..ac0995caa 100644 --- a/codex-rs/tui/src/chatwidget.rs +++ b/codex-rs/tui/src/chatwidget.rs @@ -1856,7 +1856,7 @@ impl ChatWidget { self.bottom_pane.show_selection_view(SelectionViewParams { title: Some("Select Model and Effort".to_string()), subtitle: Some( - "Access legacy models by running codex -m or in your config" + "Access legacy models by running codex -m or in your config.toml" .to_string(), ), footer_hint: Some("Press enter to select reasoning effort, or esc to dismiss.".into()), diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__model_selection_popup.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__model_selection_popup.snap index de9016c61..6cfce48b8 100644 --- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__model_selection_popup.snap +++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__model_selection_popup.snap @@ -3,7 +3,7 @@ source: tui/src/chatwidget/tests.rs expression: popup --- Select Model and Effort - Access legacy models by running codex -m or in your config + Access legacy models by running codex -m or in your config.toml › 1. gpt-5.1-codex Optimized for codex. 2. gpt-5.1-codex-mini Optimized for codex. Cheaper, faster, but less diff --git a/codex-rs/tui/src/model_migration.rs b/codex-rs/tui/src/model_migration.rs index 8a1482e12..ee253c4e0 100644 --- a/codex-rs/tui/src/model_migration.rs +++ b/codex-rs/tui/src/model_migration.rs @@ -24,10 +24,7 @@ pub(crate) enum ModelMigrationOutcome { Exit, } -pub(crate) async fn run_model_migration_prompt( - tui: &mut Tui, - target_model: &str, -) -> ModelMigrationOutcome { +pub(crate) async fn run_model_migration_prompt(tui: &mut Tui) -> ModelMigrationOutcome { // Render the prompt on the terminal's alternate screen so exiting or cancelling // does not leave a large blank region in the normal scrollback. This does not // change the prompt's appearance – only where it is drawn. @@ -48,7 +45,7 @@ pub(crate) async fn run_model_migration_prompt( let alt = AltScreenGuard::enter(tui); - let mut screen = ModelMigrationScreen::new(alt.tui.frame_requester(), target_model); + let mut screen = ModelMigrationScreen::new(alt.tui.frame_requester()); let _ = alt.tui.draw(u16::MAX, |frame| { frame.render_widget_ref(&screen, frame.area()); @@ -79,16 +76,14 @@ pub(crate) async fn run_model_migration_prompt( struct ModelMigrationScreen { request_frame: FrameRequester, - target_model: String, done: bool, should_exit: bool, } impl ModelMigrationScreen { - fn new(request_frame: FrameRequester, target_model: &str) -> Self { + fn new(request_frame: FrameRequester) -> Self { Self { request_frame, - target_model: target_model.to_string(), done: false, should_exit: false, } @@ -140,10 +135,7 @@ impl WidgetRef for &ModelMigrationScreen { column.push(""); column.push(Line::from(vec![ "> ".into(), - "Introducing ".bold(), - "our ".bold(), - self.target_model.clone().bold(), - " models".bold(), + "Introducing our gpt-5.1 models".bold(), ])); column.push(Line::from("")); @@ -199,7 +191,7 @@ mod tests { let mut terminal = Terminal::with_options(backend).expect("terminal"); terminal.set_viewport_area(Rect::new(0, 0, width, height)); - let screen = ModelMigrationScreen::new(FrameRequester::test_dummy(), "gpt-5.1-codex"); + let screen = ModelMigrationScreen::new(FrameRequester::test_dummy()); { let mut frame = terminal.get_frame(); @@ -216,7 +208,7 @@ mod tests { let mut terminal = Terminal::with_options(backend).expect("terminal"); terminal.set_viewport_area(Rect::new(0, 0, 65, 12)); - let screen = ModelMigrationScreen::new(FrameRequester::test_dummy(), "gpt-5.1"); + let screen = ModelMigrationScreen::new(FrameRequester::test_dummy()); { let mut frame = terminal.get_frame(); frame.render_widget_ref(&screen, frame.area()); @@ -231,7 +223,7 @@ mod tests { let mut terminal = Terminal::with_options(backend).expect("terminal"); terminal.set_viewport_area(Rect::new(0, 0, 60, 12)); - let screen = ModelMigrationScreen::new(FrameRequester::test_dummy(), "gpt-5.1-codex"); + let screen = ModelMigrationScreen::new(FrameRequester::test_dummy()); { let mut frame = terminal.get_frame(); frame.render_widget_ref(&screen, frame.area()); @@ -246,7 +238,7 @@ mod tests { let mut terminal = Terminal::with_options(backend).expect("terminal"); terminal.set_viewport_area(Rect::new(0, 0, 60, 12)); - let screen = ModelMigrationScreen::new(FrameRequester::test_dummy(), "gpt-5.1-codex-mini"); + let screen = ModelMigrationScreen::new(FrameRequester::test_dummy()); { let mut frame = terminal.get_frame(); frame.render_widget_ref(&screen, frame.area()); @@ -257,8 +249,7 @@ mod tests { #[test] fn escape_key_accepts_prompt() { - let screen_target = "gpt-5.1-codex"; - let mut screen = ModelMigrationScreen::new(FrameRequester::test_dummy(), screen_target); + let mut screen = ModelMigrationScreen::new(FrameRequester::test_dummy()); // Simulate pressing Escape screen.handle_key(KeyEvent::new( diff --git a/codex-rs/tui/src/snapshots/codex_tui__model_migration__tests__model_migration_prompt.snap b/codex-rs/tui/src/snapshots/codex_tui__model_migration__tests__model_migration_prompt.snap index aeef4875d..5a0ccd9b5 100644 --- a/codex-rs/tui/src/snapshots/codex_tui__model_migration__tests__model_migration_prompt.snap +++ b/codex-rs/tui/src/snapshots/codex_tui__model_migration__tests__model_migration_prompt.snap @@ -2,7 +2,7 @@ source: tui/src/model_migration.rs expression: terminal.backend() --- -> Introducing our gpt-5.1-codex models +> Introducing our gpt-5.1 models We've upgraded our family of models supported in Codex to gpt-5.1, gpt-5.1-codex and gpt-5.1-codex-mini. diff --git a/codex-rs/tui/src/snapshots/codex_tui__model_migration__tests__model_migration_prompt_gpt5_codex.snap b/codex-rs/tui/src/snapshots/codex_tui__model_migration__tests__model_migration_prompt_gpt5_codex.snap index aeef4875d..5a0ccd9b5 100644 --- a/codex-rs/tui/src/snapshots/codex_tui__model_migration__tests__model_migration_prompt_gpt5_codex.snap +++ b/codex-rs/tui/src/snapshots/codex_tui__model_migration__tests__model_migration_prompt_gpt5_codex.snap @@ -2,7 +2,7 @@ source: tui/src/model_migration.rs expression: terminal.backend() --- -> Introducing our gpt-5.1-codex models +> Introducing our gpt-5.1 models We've upgraded our family of models supported in Codex to gpt-5.1, gpt-5.1-codex and gpt-5.1-codex-mini. diff --git a/codex-rs/tui/src/snapshots/codex_tui__model_migration__tests__model_migration_prompt_gpt5_codex_mini.snap b/codex-rs/tui/src/snapshots/codex_tui__model_migration__tests__model_migration_prompt_gpt5_codex_mini.snap index 9ca1eb450..5a0ccd9b5 100644 --- a/codex-rs/tui/src/snapshots/codex_tui__model_migration__tests__model_migration_prompt_gpt5_codex_mini.snap +++ b/codex-rs/tui/src/snapshots/codex_tui__model_migration__tests__model_migration_prompt_gpt5_codex_mini.snap @@ -2,7 +2,7 @@ source: tui/src/model_migration.rs expression: terminal.backend() --- -> Introducing our gpt-5.1-codex-mini models +> Introducing our gpt-5.1 models We've upgraded our family of models supported in Codex to gpt-5.1, gpt-5.1-codex and gpt-5.1-codex-mini.