Remove retired model entries while preserving migration prompts (#44250)

## Why

Saved model selections can outlive their bundled catalog entries and still need migration guidance.

## What changed

- Remove `gpt-5.2` and `gpt-5.4-mini` from the bundled model catalog.
- Preserve migration from saved `gpt-5.4-mini` selections to `gpt-5.6-luna` when the old model is absent, while respecting catalog-provided migration metadata.
- Update tests and snapshots to use current models or explicit test fixtures, and remove the obsolete prompt fixture.

## Testing

Extend migration tests to cover catalog metadata precedence, saved selections, replacement model and reasoning-effort persistence, acknowledged prompts, and missing or hidden migration targets.

GitOrigin-RevId: 82beea504cc4a15699677c28a61ec0939af3069c
This commit is contained in:
rhan-oai authored and copyberry committed 2026-09-09 17:56:33 +00:00
1 parent 6eecd04fc1
commit eb7bd64ef9
58 files changed
+670 -1192

No files matched your search

+10 -10
View File
@@ -8796,8 +8796,8 @@ async fn selecting_cyber_model_defaults_active_thread_to_auto_review() {
.try_list_models()
.expect("model catalog")
.into_iter()
.find(|model| model.model == "gpt-5.4")
.expect("gpt-5.4 model");
.find(|model| model.model == "gpt-5.5")
.expect("gpt-5.5 model");
model.model_specialty = Some(MODEL_SPECIALTY_CYBER.to_string());
app.model_catalog = Arc::new(ModelCatalog::new(vec![model]));
@@ -8834,7 +8834,7 @@ async fn selecting_cyber_model_defaults_active_thread_to_auto_review() {
&mut tui,
&mut app_server,
AppEvent::ApplyAdvancedReasoning {
model: "gpt-5.4".to_string(),
model: "gpt-5.5".to_string(),
effort: ReasoningEffortConfig::High,
},
)
@@ -8845,7 +8845,7 @@ async fn selecting_cyber_model_defaults_active_thread_to_auto_review() {
app.handle_event(
&mut tui,
&mut app_server,
AppEvent::UpdateModel("gpt-5.4".to_string()),
AppEvent::UpdateModel("gpt-5.5".to_string()),
)
.await
.expect("model selection should succeed");
@@ -8993,8 +8993,8 @@ async fn selecting_cyber_model_falls_back_to_user_when_auto_review_is_unavailabl
.try_list_models()
.expect("model catalog")
.into_iter()
.find(|model| model.model == "gpt-5.4")
.expect("gpt-5.4 model");
.find(|model| model.model == "gpt-5.5")
.expect("gpt-5.5 model");
model.model_specialty = Some(MODEL_SPECIALTY_CYBER.to_string());
app.model_catalog = Arc::new(ModelCatalog::new(vec![model]));
let _ = app.config.features.disable(Feature::GuardianApproval);
@@ -9003,7 +9003,7 @@ async fn selecting_cyber_model_falls_back_to_user_when_auto_review_is_unavailabl
app.active_thread_id = Some(ThreadId::new());
let params = app
.active_thread_model_setting_update_params("gpt-5.4".to_string())
.active_thread_model_setting_update_params("gpt-5.5".to_string())
.expect("active thread should produce update params");
assert_eq!(
@@ -9048,8 +9048,8 @@ async fn selecting_cyber_model_respects_auto_review_requirements() {
.try_list_models()
.expect("model catalog")
.into_iter()
.find(|model| model.model == "gpt-5.4")
.expect("gpt-5.4 model");
.find(|model| model.model == "gpt-5.5")
.expect("gpt-5.5 model");
model.model_specialty = Some(MODEL_SPECIALTY_CYBER.to_string());
app.model_catalog = Arc::new(ModelCatalog::new(vec![model]));
@@ -9074,7 +9074,7 @@ async fn selecting_cyber_model_respects_auto_review_requirements() {
app.handle_event(
&mut tui,
&mut app_server,
AppEvent::UpdateModel("gpt-5.4".to_string()),
AppEvent::UpdateModel("gpt-5.5".to_string()),
)
.await
.expect("model selection should succeed");