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

@@ -557,8 +557,8 @@ fn mock_config(codex_home: &Path, server_uri: &str) -> Result<MockResponsesConfi
let model = bundled_models_response()?
.models
.into_iter()
.find(|model| model.slug == "gpt-5.4")
.context("bundled catalog should include gpt-5.4")?;
.find(|model| model.slug == "gpt-5.5")
.context("bundled catalog should include gpt-5.5")?;
let models = [MODEL_A, MODEL_B]
.into_iter()
.map(|slug| {
@@ -4063,7 +4063,7 @@ async fn turn_start_emits_spawn_agent_item_with_model_metadata_v2() -> Result<()
const PARENT_PROMPT: &str = "spawn a child and continue";
const SPAWN_CALL_ID: &str = "spawn-call-1";
const CHILD_PLAN_CALL_ID: &str = "child-plan-call";
const REQUESTED_MODEL: &str = "gpt-5.2";
const REQUESTED_MODEL: &str = "gpt-5.5";
const REQUESTED_REASONING_EFFORT: ReasoningEffort = ReasoningEffort::Low;
let server = responses::start_mock_server().await;
@@ -4719,7 +4719,7 @@ async fn turn_start_emits_spawn_agent_item_with_effective_role_model_metadata_v2
const CHILD_PROMPT: &str = "child: do work";
const PARENT_PROMPT: &str = "spawn a child and continue";
const SPAWN_CALL_ID: &str = "spawn-call-1";
const REQUESTED_MODEL: &str = "gpt-5.2";
const REQUESTED_MODEL: &str = "gpt-5.5";
const REQUESTED_REASONING_EFFORT: ReasoningEffort = ReasoningEffort::Low;
const ROLE_MODEL: &str = "gpt-5.4";
const ROLE_REASONING_EFFORT: ReasoningEffort = ReasoningEffort::High;