diff --git a/codex-rs/tui/src/model_migration.rs b/codex-rs/tui/src/model_migration.rs index 41703c00da..4a07252c4a 100644 --- a/codex-rs/tui/src/model_migration.rs +++ b/codex-rs/tui/src/model_migration.rs @@ -83,6 +83,13 @@ pub(crate) fn maybe_show_pending_model_migration_notice( return None; } + if let Some(current_model) = config.model.as_deref().filter(|model| !model.is_empty()) + && current_model != notice.from_model + { + let _ = std::fs::remove_file(¬ice_path); + return None; + } + Some(notice) } diff --git a/codex-rs/tui2/src/model_migration.rs b/codex-rs/tui2/src/model_migration.rs index 332eaa14cd..3ef02df5e2 100644 --- a/codex-rs/tui2/src/model_migration.rs +++ b/codex-rs/tui2/src/model_migration.rs @@ -83,6 +83,13 @@ pub(crate) fn maybe_show_pending_model_migration_notice( return None; } + if let Some(current_model) = config.model.as_deref().filter(|model| !model.is_empty()) + && current_model != notice.from_model + { + let _ = std::fs::remove_file(¬ice_path); + return None; + } + Some(notice) }