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

@@ -2,7 +2,7 @@
source: tui/src/chatwidget/tests/popups_and_settings.rs
expression: popup
---
Select Reasoning Level for gpt-5.4
Select Reasoning Level for gpt-5.5
› 1. More reasoning… Ultra consumes usage limits faster
@@ -5,9 +5,8 @@ expression: "render_bottom_popup(&chat, 80)"
Select Model and Effort
Access legacy models by running codex -m <model_name> or in your config.toml
› 1. gpt-5.5 Frontier model for complex coding, research, and real-
› 1. gpt-5.6-terra Balanced agentic coding model for everyday work.
2. gpt-5.5 (current) Frontier model for complex coding, research, and real-
world work.
2. gpt-5.2 (current) Optimized for professional work and long-running
agents.
Press enter to confirm or esc to go back
@@ -7,6 +7,6 @@ expression: "render_bottom_popup(&chat, 80)"
1. codex-auto-test Auto model
› 2. All models (current) Choose a specific model and reasoning level
(current: gpt-5.2)
(current: gpt-5.5)
Press enter to confirm or esc to go back
@@ -2,7 +2,7 @@
source: tui/src/chatwidget/tests/popups_and_settings.rs
expression: popup
---
Select Reasoning Level for gpt-5.4
Select Reasoning Level for gpt-5.5
1. Low Fast responses with lighter reasoning
2. Medium (default) Balances speed and reasoning depth for everyday tasks
@@ -1,17 +0,0 @@
---
source: tui/src/chatwidget/tests/popups_and_settings.rs
expression: popup
---
Select Reasoning Level for gpt-5.2
1. Low Balances speed with some reasoning; useful for
straightforward queries and short explanations
2. Medium (default) Provides a solid balance of reasoning depth and
latency for general-purpose tasks
3. High Maximizes reasoning depth for complex or ambiguous
problems
› 4. Extra high (current) Extra high reasoning for complex problems
⚠ Extra high reasoning effort can quickly consume
Plus plan rate limits.
Press enter to confirm or esc to go back
@@ -1,6 +1,6 @@
---
source: tui/src/chatwidget/tests/popups_and_settings.rs
expression: popup
expression: "render_bottom_popup(&chat, 80)"
---
Select Model and Effort
Access legacy models by running codex -m <model_name> or in your config.toml
@@ -10,9 +10,7 @@ expression: popup
2. gpt-5.6-sol Latest frontier agentic coding model.
3. gpt-5.6-terra Balanced agentic coding model for everyday work.
4. gpt-5.6-luna Fast and affordable agentic coding model.
5. gpt-5.5 Frontier model for complex coding, research, and
› 5. gpt-5.5 (current) Frontier model for complex coding, research, and
real-world work.
› 6. gpt-5.2 (current) Optimized for professional work and long-running
agents.
Press enter to confirm or esc to go back
@@ -6,7 +6,7 @@ expression: "render_bottom_popup(&chat,\n100).replace(&directory,\n\"[[workspace
Copy to clipboard
› 1. Whole status >_ OpenAI Codex (vVERSION)
2. Model gpt-5.4
2. Model gpt-5.5
3. Directory [[workspace]]
4. Thread name Clipboard example
5. Session ID 00000000-0000-0000-0000-000000000123
@@ -7,7 +7,7 @@ expression: "whole_status.replace(&directory,\n\"[[workspace]]\").replace(crate:
Visit https://chatgpt.com/codex/settings/usage for up-to-date
information on rate limits and credits
Model: gpt-5.4 (reasoning medium, summaries auto)
Model: gpt-5.5 (reasoning medium, summaries auto)
Model provider: openai
Directory: [[workspace]]
Permissions: Read Only (Ask for approval)
@@ -187,7 +187,7 @@ fn open_safety_buffering_retry_confirmation(
#[tokio::test]
async fn safety_buffering_offers_one_retry_with_app_wording() {
let (mut chat, mut rx, mut op_rx) = make_chatwidget_manual(/*model_override*/ None).await;
let mut preset = get_available_model(&chat, "gpt-5.4");
let mut preset = get_available_model(&chat, "gpt-5.5");
preset.model = "faster-model".to_string();
preset.display_name = "Faster Model".to_string();
chat.model_catalog = Arc::new(ModelCatalog::new(vec![preset]));
+12 -2
View File
@@ -298,13 +298,23 @@ fn test_model_info(slug: &str, priority: i32, supports_fast_mode: bool) -> Model
}
pub(crate) fn set_fast_mode_test_catalog(chat: &mut ChatWidget) {
set_fast_mode_test_catalog_for_models(chat, "gpt-5.4", "gpt-5.2");
}
pub(crate) fn set_fast_mode_test_catalog_for_models(
chat: &mut ChatWidget,
fast_model: &str,
standard_model: &str,
) {
let models: Vec<ModelPreset> = ModelsResponse {
models: vec![
test_model_info(
"gpt-5.4", /*priority*/ 0, /*supports_fast_mode*/ true,
fast_model, /*priority*/ 0, /*supports_fast_mode*/ true,
),
test_model_info(
"gpt-5.2", /*priority*/ 1, /*supports_fast_mode*/ false,
standard_model,
/*priority*/ 1,
/*supports_fast_mode*/ false,
),
],
}
+45 -45
View File
@@ -259,7 +259,7 @@ async fn submit_user_message_with_mode_sets_coding_collaboration_mode() {
#[tokio::test]
async fn reasoning_selection_in_plan_mode_opens_scope_prompt_event() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.thread_id = Some(ThreadId::new());
chat.set_feature_enabled(Feature::CollaborationModes, /*enabled*/ true);
let plan_mask = collaboration_modes::plan_mask(chat.model_catalog.as_ref())
@@ -269,7 +269,7 @@ async fn reasoning_selection_in_plan_mode_opens_scope_prompt_event() {
set_chatgpt_auth(&mut chat);
chat.set_reasoning_effort(Some(ReasoningEffortConfig::High));
let preset = get_available_model(&chat, "gpt-5.4");
let preset = get_available_model(&chat, "gpt-5.5");
chat.open_reasoning_popup(preset);
chat.handle_key_event(KeyEvent::from(KeyCode::Down));
chat.handle_key_event(KeyEvent::from(KeyCode::Enter));
@@ -280,13 +280,13 @@ async fn reasoning_selection_in_plan_mode_opens_scope_prompt_event() {
AppEvent::OpenPlanReasoningScopePrompt {
model,
effort: Some(_)
} if model == "gpt-5.4"
} if model == "gpt-5.5"
);
}
#[tokio::test]
async fn reasoning_selection_in_plan_mode_without_effort_change_does_not_open_scope_prompt_event() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.thread_id = Some(ThreadId::new());
chat.set_feature_enabled(Feature::CollaborationModes, /*enabled*/ true);
let plan_mask = collaboration_modes::plan_mask(chat.model_catalog.as_ref())
@@ -297,7 +297,7 @@ async fn reasoning_selection_in_plan_mode_without_effort_change_does_not_open_sc
chat.set_reasoning_effort(Some(ReasoningEffortConfig::Medium));
let preset = get_available_model(&chat, "gpt-5.4");
let preset = get_available_model(&chat, "gpt-5.5");
chat.open_reasoning_popup(preset);
chat.handle_key_event(KeyEvent::from(KeyCode::Enter));
@@ -305,7 +305,7 @@ async fn reasoning_selection_in_plan_mode_without_effort_change_does_not_open_sc
assert!(
events.iter().any(|event| matches!(
event,
AppEvent::UpdateModel(model) if model == "gpt-5.4"
AppEvent::UpdateModel(model) if model == "gpt-5.5"
)),
"expected model update event; events: {events:?}"
);
@@ -320,7 +320,7 @@ async fn reasoning_selection_in_plan_mode_without_effort_change_does_not_open_sc
#[tokio::test]
async fn reasoning_selection_in_plan_mode_matching_plan_effort_but_different_global_opens_scope_prompt()
{
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.thread_id = Some(ThreadId::new());
chat.set_feature_enabled(Feature::CollaborationModes, /*enabled*/ true);
let plan_mask = collaboration_modes::plan_mask(chat.model_catalog.as_ref())
@@ -334,7 +334,7 @@ async fn reasoning_selection_in_plan_mode_matching_plan_effort_but_different_glo
// should open the scope prompt rather than silently rewriting the global default.
chat.set_reasoning_effort(Some(ReasoningEffortConfig::High));
let preset = get_available_model(&chat, "gpt-5.4");
let preset = get_available_model(&chat, "gpt-5.5");
chat.open_reasoning_popup(preset);
chat.handle_key_event(KeyEvent::from(KeyCode::Enter));
@@ -344,13 +344,13 @@ async fn reasoning_selection_in_plan_mode_matching_plan_effort_but_different_glo
AppEvent::OpenPlanReasoningScopePrompt {
model,
effort: Some(ReasoningEffortConfig::Medium)
} if model == "gpt-5.4"
} if model == "gpt-5.5"
);
}
#[tokio::test]
async fn reasoning_shortcut_in_plan_mode_updates_plan_override_without_prompt_or_persist() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.thread_id = Some(ThreadId::new());
chat.set_feature_enabled(Feature::CollaborationModes, /*enabled*/ true);
let plan_mask = collaboration_modes::plan_mask(chat.model_catalog.as_ref())
@@ -398,7 +398,7 @@ async fn reasoning_shortcut_in_plan_mode_updates_plan_override_without_prompt_or
#[tokio::test]
async fn advanced_reasoning_selection_in_plan_mode_uses_expected_scope() {
for effort in [ReasoningEffortConfig::Ultra, ReasoningEffortConfig::Max] {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.thread_id = Some(ThreadId::new());
chat.set_feature_enabled(Feature::CollaborationModes, /*enabled*/ true);
let plan_mask = collaboration_modes::plan_mask(chat.model_catalog.as_ref())
@@ -406,7 +406,7 @@ async fn advanced_reasoning_selection_in_plan_mode_uses_expected_scope() {
chat.set_collaboration_mask(plan_mask);
let _ = drain_insert_history(&mut rx);
let mut preset = get_available_model(&chat, "gpt-5.4");
let mut preset = get_available_model(&chat, "gpt-5.5");
preset.supported_reasoning_efforts = vec![ReasoningEffortPreset {
effort: effort.clone(),
description: "Advanced reasoning".to_string(),
@@ -421,7 +421,7 @@ async fn advanced_reasoning_selection_in_plan_mode_uses_expected_scope() {
AppEvent::ApplyAdvancedReasoning {
model,
effort: ReasoningEffortConfig::Ultra,
} if model == "gpt-5.4"
} if model == "gpt-5.5"
)));
assert!(events.iter().all(|event| !matches!(
event,
@@ -435,7 +435,7 @@ async fn advanced_reasoning_selection_in_plan_mode_uses_expected_scope() {
AppEvent::OpenPlanReasoningScopePrompt {
model,
effort: Some(ReasoningEffortConfig::Max),
} if model == "gpt-5.4"
} if model == "gpt-5.5"
)));
}
}
@@ -443,7 +443,7 @@ async fn advanced_reasoning_selection_in_plan_mode_uses_expected_scope() {
#[tokio::test]
async fn plan_mode_reasoning_override_is_marked_current_in_reasoning_popup() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.set_feature_enabled(Feature::CollaborationModes, /*enabled*/ true);
set_chatgpt_auth(&mut chat);
chat.set_reasoning_effort(Some(ReasoningEffortConfig::High));
@@ -453,7 +453,7 @@ async fn plan_mode_reasoning_override_is_marked_current_in_reasoning_popup() {
.expect("expected plan collaboration mode");
chat.set_collaboration_mask(plan_mask);
let preset = get_available_model(&chat, "gpt-5.4");
let preset = get_available_model(&chat, "gpt-5.5");
chat.open_reasoning_popup(preset);
let popup = render_bottom_popup(&chat, /*width*/ 100);
@@ -466,7 +466,7 @@ async fn plan_mode_reasoning_override_is_marked_current_in_reasoning_popup() {
#[tokio::test]
async fn reasoning_selection_in_plan_mode_model_switch_does_not_open_scope_prompt_event() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.thread_id = Some(ThreadId::new());
chat.set_feature_enabled(Feature::CollaborationModes, /*enabled*/ true);
let plan_mask = collaboration_modes::plan_mask(chat.model_catalog.as_ref())
@@ -475,7 +475,7 @@ async fn reasoning_selection_in_plan_mode_model_switch_does_not_open_scope_promp
let _ = drain_insert_history(&mut rx);
set_chatgpt_auth(&mut chat);
let preset = get_available_model(&chat, "gpt-5.2");
let preset = get_available_model(&chat, "gpt-5.6-terra");
chat.open_reasoning_popup(preset);
chat.handle_key_event(KeyEvent::from(KeyCode::Enter));
@@ -483,7 +483,7 @@ async fn reasoning_selection_in_plan_mode_model_switch_does_not_open_scope_promp
assert!(
events.iter().any(|event| matches!(
event,
AppEvent::UpdateModel(model) if model == "gpt-5.2"
AppEvent::UpdateModel(model) if model == "gpt-5.6-terra"
)),
"expected model update event; events: {events:?}"
);
@@ -497,8 +497,8 @@ async fn reasoning_selection_in_plan_mode_model_switch_does_not_open_scope_promp
#[tokio::test]
async fn plan_reasoning_scope_popup_all_modes_persists_global_and_plan_override() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
chat.open_plan_reasoning_scope_prompt("gpt-5.4".to_string(), Some(ReasoningEffortConfig::High));
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.open_plan_reasoning_scope_prompt("gpt-5.5".to_string(), Some(ReasoningEffortConfig::High));
chat.handle_key_event(KeyEvent::from(KeyCode::Down));
chat.handle_key_event(KeyEvent::from(KeyCode::Enter));
@@ -522,7 +522,7 @@ async fn plan_reasoning_scope_popup_all_modes_persists_global_and_plan_override(
events.iter().any(|event| matches!(
event,
AppEvent::PersistModelSelection { model, effort: Some(ReasoningEffortConfig::High) }
if model == "gpt-5.4"
if model == "gpt-5.5"
)),
"expected global model reasoning selection persistence; events: {events:?}"
);
@@ -548,7 +548,7 @@ fn plan_mode_prompt_notification_uses_dedicated_type_name() {
#[tokio::test]
async fn open_plan_implementation_prompt_sets_pending_notification() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.local_settings.tui.notification_settings.notifications =
Notifications::Custom(vec!["plan-mode-prompt".to_string()]);
@@ -562,11 +562,11 @@ async fn open_plan_implementation_prompt_sets_pending_notification() {
#[tokio::test]
async fn open_plan_reasoning_scope_prompt_sets_pending_notification() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.local_settings.tui.notification_settings.notifications =
Notifications::Custom(vec!["plan-mode-prompt".to_string()]);
chat.open_plan_reasoning_scope_prompt("gpt-5.4".to_string(), Some(ReasoningEffortConfig::High));
chat.open_plan_reasoning_scope_prompt("gpt-5.5".to_string(), Some(ReasoningEffortConfig::High));
assert_matches!(
chat.pending_notification,
@@ -576,7 +576,7 @@ async fn open_plan_reasoning_scope_prompt_sets_pending_notification() {
#[tokio::test]
async fn agent_turn_complete_does_not_override_pending_plan_mode_prompt_notification() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.open_plan_implementation_prompt();
chat.notify(Notification::AgentTurnComplete {
@@ -591,7 +591,7 @@ async fn agent_turn_complete_does_not_override_pending_plan_mode_prompt_notifica
#[tokio::test]
async fn request_user_input_notification_overrides_pending_agent_turn_complete_notification() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.notify(Notification::AgentTurnComplete {
response: "done".to_string(),
@@ -623,7 +623,7 @@ async fn request_user_input_notification_overrides_pending_agent_turn_complete_n
#[tokio::test]
async fn handle_request_user_input_sets_pending_notification() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.local_settings.tui.notification_settings.notifications =
Notifications::Custom(vec!["plan-mode-prompt".to_string()]);
@@ -654,10 +654,10 @@ async fn handle_request_user_input_sets_pending_notification() {
#[tokio::test]
async fn plan_reasoning_scope_popup_mentions_selected_reasoning() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.set_plan_mode_reasoning_effort(Some(ReasoningEffortConfig::Low));
chat.open_plan_reasoning_scope_prompt(
"gpt-5.4".to_string(),
"gpt-5.5".to_string(),
Some(ReasoningEffortConfig::Medium),
);
@@ -671,9 +671,9 @@ async fn plan_reasoning_scope_popup_mentions_selected_reasoning() {
#[tokio::test]
async fn plan_reasoning_scope_popup_mentions_built_in_plan_default_when_no_override() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.open_plan_reasoning_scope_prompt(
"gpt-5.4".to_string(),
"gpt-5.5".to_string(),
Some(ReasoningEffortConfig::Medium),
);
@@ -683,8 +683,8 @@ async fn plan_reasoning_scope_popup_mentions_built_in_plan_default_when_no_overr
#[tokio::test]
async fn plan_reasoning_scope_popup_plan_only_does_not_update_all_modes_reasoning() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
chat.open_plan_reasoning_scope_prompt("gpt-5.4".to_string(), Some(ReasoningEffortConfig::High));
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.open_plan_reasoning_scope_prompt("gpt-5.5".to_string(), Some(ReasoningEffortConfig::High));
chat.handle_key_event(KeyEvent::from(KeyCode::Enter));
@@ -1365,7 +1365,7 @@ async fn mode_switch_surfaces_model_change_notification_when_effective_model_cha
let mut plan_mask =
collaboration_modes::mask_for_kind(chat.model_catalog.as_ref(), ModeKind::Plan)
.expect("expected plan collaboration mode");
plan_mask.model = Some("gpt-5.4-mini".to_string());
plan_mask.model = Some("gpt-5.6-luna".to_string());
chat.set_collaboration_mask(plan_mask);
let plan_messages = drain_insert_history(&mut rx)
@@ -1374,7 +1374,7 @@ async fn mode_switch_surfaces_model_change_notification_when_effective_model_cha
.collect::<Vec<_>>()
.join("\n");
assert!(
plan_messages.contains("Model changed to gpt-5.4-mini medium for Plan mode."),
plan_messages.contains("Model changed to gpt-5.6-luna medium for Plan mode."),
"expected Plan-mode model switch notice, got: {plan_messages:?}"
);
@@ -1397,7 +1397,7 @@ async fn mode_switch_surfaces_model_change_notification_when_effective_model_cha
#[tokio::test]
async fn mode_switch_surfaces_reasoning_change_notification_when_model_stays_same() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.2")).await;
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.6-terra")).await;
chat.set_feature_enabled(Feature::CollaborationModes, /*enabled*/ true);
chat.set_reasoning_effort(Some(ReasoningEffortConfig::High));
@@ -1411,7 +1411,7 @@ async fn mode_switch_surfaces_reasoning_change_notification_when_model_stays_sam
.collect::<Vec<_>>()
.join("\n");
assert!(
plan_messages.contains("Model changed to gpt-5.2 medium for Plan mode."),
plan_messages.contains("Model changed to gpt-5.6-terra medium for Plan mode."),
"expected reasoning-change notice in Plan mode, got: {plan_messages:?}"
);
}
@@ -1657,21 +1657,21 @@ async fn make_startup_chat_with_cli_overrides(
#[tokio::test]
async fn set_model_updates_active_collaboration_mask() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.2")).await;
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.6-terra")).await;
chat.set_feature_enabled(Feature::CollaborationModes, /*enabled*/ true);
let plan_mask = collaboration_modes::mask_for_kind(chat.model_catalog.as_ref(), ModeKind::Plan)
.expect("expected plan collaboration mask");
chat.set_collaboration_mask(plan_mask);
chat.set_model("gpt-5.4-mini");
chat.set_model("gpt-5.6-luna");
assert_eq!(chat.current_model(), "gpt-5.4-mini");
assert_eq!(chat.current_model(), "gpt-5.6-luna");
assert_eq!(chat.active_collaboration_mode_kind(), ModeKind::Plan);
}
#[tokio::test]
async fn set_reasoning_effort_updates_active_collaboration_mask() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.2")).await;
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.6-terra")).await;
chat.set_feature_enabled(Feature::CollaborationModes, /*enabled*/ true);
let plan_mask = collaboration_modes::mask_for_kind(chat.model_catalog.as_ref(), ModeKind::Plan)
.expect("expected plan collaboration mask");
@@ -1688,7 +1688,7 @@ async fn set_reasoning_effort_updates_active_collaboration_mask() {
#[tokio::test]
async fn set_reasoning_effort_does_not_override_active_plan_override() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.2")).await;
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.6-terra")).await;
chat.set_feature_enabled(Feature::CollaborationModes, /*enabled*/ true);
chat.set_plan_mode_reasoning_effort(Some(ReasoningEffortConfig::High));
let plan_mask = collaboration_modes::mask_for_kind(chat.model_catalog.as_ref(), ModeKind::Plan)
@@ -1758,10 +1758,10 @@ async fn collab_mode_applies_default_preset() {
#[tokio::test]
async fn user_turn_includes_personality_from_config() {
let (mut chat, _rx, mut op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, _rx, mut op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.set_feature_enabled(Feature::Personality, /*enabled*/ true);
chat.thread_id = Some(ThreadId::new());
chat.set_model("gpt-5.4");
chat.set_model("gpt-5.5");
chat.set_personality(Personality::Friendly);
chat.bottom_pane
@@ -3302,7 +3302,7 @@ async fn memories_reset_confirmation_sends_event_on_confirm() {
#[tokio::test]
async fn model_selection_popup_snapshot() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.2")).await;
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.thread_id = Some(ThreadId::new());
chat.open_model_popup();
@@ -3317,7 +3317,7 @@ fn apply_model_list_response(chat: &mut ChatWidget, presets: Vec<ModelPreset>) {
#[tokio::test]
async fn model_picker_refresh_rejects_obsolete_and_unusable_replies() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.2")).await;
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.thread_id = Some(ThreadId::new());
let initial = chat.model_catalog.try_list_models().unwrap();
let mut refreshed = initial.clone();
@@ -3362,9 +3362,9 @@ async fn model_picker_refresh_rejects_obsolete_and_unusable_replies() {
#[tokio::test]
async fn model_picker_refreshes_startup_catalog() {
for (explicit_all_models, hidden_startup) in [(false, false), (true, false), (false, true)] {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.2")).await;
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.thread_id = Some(ThreadId::new());
let mut startup = vec![get_available_model(&chat, "gpt-5.2")];
let mut startup = vec![get_available_model(&chat, "gpt-5.5")];
let mut refreshed = chat.model_catalog.try_list_models().unwrap();
let mut auto = startup[0].clone();
auto.model = "codex-auto-test".to_string();
@@ -3405,10 +3405,10 @@ async fn model_picker_refreshes_startup_catalog() {
#[tokio::test]
async fn model_picker_queued_all_models_uses_refreshed_catalog() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.2")).await;
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.thread_id = Some(ThreadId::new());
let refreshed = chat.model_catalog.try_list_models().unwrap();
let preset = get_available_model(&chat, "gpt-5.2");
let preset = get_available_model(&chat, "gpt-5.5");
let mut auto = preset.clone();
auto.model = "codex-auto-test".to_string();
auto.id = auto.model.clone();
@@ -3430,16 +3430,16 @@ async fn model_picker_queued_all_models_uses_refreshed_catalog() {
#[tokio::test]
async fn model_picker_refresh_preserves_highlight() {
for (remove_selected, reasoning_submenu, expected) in [
(false, false, "gpt-5.5"),
(true, false, "gpt-5.2"),
(false, true, "gpt-5.5"),
(true, true, "gpt-5.2"),
(false, false, "gpt-5.6-terra"),
(true, false, "gpt-5.5"),
(false, true, "gpt-5.6-terra"),
(true, true, "gpt-5.5"),
] {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.2")).await;
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.thread_id = Some(ThreadId::new());
let mut presets = vec![
get_available_model(&chat, "gpt-5.2"),
get_available_model(&chat, "gpt-5.5"),
get_available_model(&chat, "gpt-5.6-terra"),
];
chat.model_catalog = Arc::new(ModelCatalog::new(presets.clone()));
chat.open_model_popup();
@@ -3506,9 +3506,9 @@ async fn model_picker_refresh_preserves_dismissal_and_reasoning_submenu() {
(false, false, true),
(false, true, true),
] {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.2")).await;
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.thread_id = Some(ThreadId::new());
let preset = get_available_model(&chat, "gpt-5.2");
let preset = get_available_model(&chat, "gpt-5.5");
let refreshed = chat.model_catalog.try_list_models().unwrap();
chat.model_catalog = Arc::new(ModelCatalog::new(vec![preset.clone()]));
chat.open_model_popup();
@@ -3556,9 +3556,9 @@ async fn model_picker_refresh_dismisses_empty_choices() {
for (explicit_all_models, reasoning_submenu) in
[(false, false), (true, false), (false, true), (true, true)]
{
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.2")).await;
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.thread_id = Some(ThreadId::new());
let mut preset = get_available_model(&chat, "gpt-5.2");
let mut preset = get_available_model(&chat, "gpt-5.5");
chat.open_model_popup();
if explicit_all_models {
chat.handle_key_event(KeyEvent::from(KeyCode::Esc));
@@ -3592,7 +3592,7 @@ async fn model_picker_refresh_dismisses_empty_choices() {
#[tokio::test]
async fn personality_selection_popup_snapshot() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.thread_id = Some(ThreadId::new());
chat.open_personality_popup();
@@ -3687,12 +3687,12 @@ async fn server_overloaded_error_does_not_switch_models() {
#[tokio::test]
async fn model_reasoning_selection_popup_snapshot() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
set_chatgpt_auth(&mut chat);
chat.set_reasoning_effort(Some(ReasoningEffortConfig::High));
let mut preset = get_available_model(&chat, "gpt-5.4");
let mut preset = get_available_model(&chat, "gpt-5.5");
preset.supported_reasoning_efforts.insert(
2,
ReasoningEffortPreset {
@@ -3720,10 +3720,10 @@ async fn model_reasoning_selection_popup_snapshot() {
#[tokio::test]
async fn model_advanced_reasoning_selection_popup_snapshot() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.set_reasoning_effort(Some(ReasoningEffortConfig::Ultra));
let mut preset = get_available_model(&chat, "gpt-5.4");
let mut preset = get_available_model(&chat, "gpt-5.5");
preset.supported_reasoning_efforts.extend([
ReasoningEffortPreset {
effort: ReasoningEffortConfig::Ultra,
@@ -3742,11 +3742,11 @@ async fn model_advanced_reasoning_selection_popup_snapshot() {
#[tokio::test]
async fn model_reasoning_selection_popup_applies_custom_effort() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
let custom_effort = ReasoningEffortConfig::Custom("future".to_string());
chat.set_reasoning_effort(Some(ReasoningEffortConfig::XHigh));
let mut preset = get_available_model(&chat, "gpt-5.4");
let mut preset = get_available_model(&chat, "gpt-5.5");
preset
.supported_reasoning_efforts
.push(ReasoningEffortPreset {
@@ -3770,19 +3770,19 @@ async fn model_reasoning_selection_popup_applies_custom_effort() {
selected_effort_events,
vec![
(None, Some(custom_effort.clone())),
(Some("gpt-5.4".to_string()), Some(custom_effort)),
(Some("gpt-5.5".to_string()), Some(custom_effort)),
]
);
}
async fn select_ultra_with_multi_agent_thread_limit(max_threads: usize) -> (bool, Vec<String>) {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.config
.multi_agent_v2
.max_concurrent_threads_per_session = max_threads;
chat.set_reasoning_effort(Some(ReasoningEffortConfig::High));
let mut preset = get_available_model(&chat, "gpt-5.4");
let mut preset = get_available_model(&chat, "gpt-5.5");
preset.default_reasoning_effort = ReasoningEffortConfig::High;
preset.supported_reasoning_efforts = vec![
ReasoningEffortPreset {
@@ -3849,10 +3849,10 @@ async fn ultra_reasoning_selection_skips_warning_below_threshold() {
#[tokio::test]
async fn max_reasoning_selection_persists_model_selection() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.set_reasoning_effort(Some(ReasoningEffortConfig::High));
let mut preset = get_available_model(&chat, "gpt-5.4");
let mut preset = get_available_model(&chat, "gpt-5.5");
preset.supported_reasoning_efforts = vec![ReasoningEffortPreset {
effort: ReasoningEffortConfig::Max,
description: "Maximum reasoning".to_string(),
@@ -3870,7 +3870,7 @@ async fn max_reasoning_selection_persists_model_selection() {
AppEvent::PersistModelSelection {
model,
effort: Some(ReasoningEffortConfig::Max),
} if model == "gpt-5.4"
} if model == "gpt-5.5"
)));
assert!(
events
@@ -3879,26 +3879,12 @@ async fn max_reasoning_selection_persists_model_selection() {
);
}
#[tokio::test]
async fn model_reasoning_selection_popup_extra_high_warning_snapshot() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.2")).await;
set_chatgpt_auth(&mut chat);
chat.set_reasoning_effort(Some(ReasoningEffortConfig::XHigh));
let preset = get_available_model(&chat, "gpt-5.2");
chat.open_reasoning_popup(preset);
let popup = render_bottom_popup(&chat, /*width*/ 80);
assert_chatwidget_snapshot!("model_reasoning_selection_popup_extra_high_warning", popup);
}
async fn assert_reasoning_shortcuts_update_effort(
key_events: [KeyEvent; 2],
expected_effort: ReasoningEffortConfig,
) {
for key_event in key_events {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.thread_id = Some(ThreadId::new());
chat.set_reasoning_effort(Some(ReasoningEffortConfig::Medium));
@@ -3953,7 +3939,7 @@ async fn reasoning_down_shortcuts_lower_reasoning_effort() {
#[tokio::test]
async fn reasoning_shortcut_clears_armed_quit_shortcut() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.thread_id = Some(ThreadId::new());
chat.set_reasoning_effort(Some(ReasoningEffortConfig::Medium));
chat.arm_quit_shortcut(key_hint::ctrl(KeyCode::Char('c')));
@@ -3974,7 +3960,7 @@ async fn reasoning_shortcut_clears_armed_quit_shortcut() {
#[tokio::test]
async fn reasoning_shortcut_is_ignored_with_model_popup_open() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.thread_id = Some(ThreadId::new());
chat.set_reasoning_effort(Some(ReasoningEffortConfig::Medium));
chat.open_model_popup();
@@ -3999,12 +3985,12 @@ async fn reasoning_shortcut_is_ignored_with_model_popup_open() {
#[tokio::test]
async fn reasoning_up_shortcut_does_not_silently_enter_advanced_effort() {
for (model, model_path) in [
("gpt-5.4", "All models → gpt-5.4"),
("gpt-5.5", "All models → gpt-5.5"),
("codex-auto-test", "codex-auto-test"),
] {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.thread_id = Some(ThreadId::new());
let mut preset = get_available_model(&chat, "gpt-5.4");
let mut preset = get_available_model(&chat, "gpt-5.5");
preset.id = model.to_string();
preset.model = model.to_string();
preset.display_name = model.to_string();
@@ -4051,9 +4037,9 @@ async fn reasoning_up_shortcut_does_not_silently_enter_advanced_effort() {
#[tokio::test]
async fn reasoning_down_shortcut_can_leave_advanced_effort() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.thread_id = Some(ThreadId::new());
let mut preset = get_available_model(&chat, "gpt-5.4");
let mut preset = get_available_model(&chat, "gpt-5.5");
preset.supported_reasoning_efforts.extend([
ReasoningEffortPreset {
effort: ReasoningEffortConfig::Ultra,
@@ -4088,11 +4074,11 @@ async fn reasoning_down_shortcut_can_leave_advanced_effort() {
#[tokio::test]
async fn reasoning_popup_shows_extra_high_with_space() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
set_chatgpt_auth(&mut chat);
let preset = get_available_model(&chat, "gpt-5.4");
let preset = get_available_model(&chat, "gpt-5.5");
chat.open_reasoning_popup(preset);
let popup = render_bottom_popup(&chat, /*width*/ 120);
@@ -4158,7 +4144,7 @@ async fn single_reasoning_option_skips_selection() {
#[tokio::test]
async fn advanced_only_reasoning_option_requires_explicit_selection() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(/*model_override*/ None).await;
let mut preset = get_available_model(&chat, "gpt-5.4");
let mut preset = get_available_model(&chat, "gpt-5.5");
preset.default_reasoning_effort = ReasoningEffortConfig::Ultra;
preset.supported_reasoning_efforts = vec![ReasoningEffortPreset {
effort: ReasoningEffortConfig::Ultra,
@@ -4264,11 +4250,11 @@ async fn feedback_good_result_consent_popup_includes_connectivity_diagnostics_fi
#[tokio::test]
async fn reasoning_popup_escape_returns_to_model_popup() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.thread_id = Some(ThreadId::new());
chat.open_model_popup();
let preset = get_available_model(&chat, "gpt-5.4");
let preset = get_available_model(&chat, "gpt-5.5");
chat.open_reasoning_popup(preset);
let before_escape = render_bottom_popup(&chat, /*width*/ 80);
@@ -122,8 +122,8 @@ fn next_copy_selection(
#[tokio::test]
async fn service_tier_commands_lowercase_catalog_names() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let mut preset = get_available_model(&chat, "gpt-5.4");
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
let mut preset = get_available_model(&chat, "gpt-5.5");
let expected_description = preset
.service_tiers
.iter()
@@ -2068,7 +2068,7 @@ async fn slash_copy_picker_previews_whole_response_code_blocks_and_blockquotes()
#[tokio::test]
async fn slash_copy_picker_copies_status_fields_and_preserves_source_after_copying() {
let (mut chat, mut rx, mut op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, mut rx, mut op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
let session_id = "00000000-0000-0000-0000-000000000123";
chat.thread_id = Some(ThreadId::from_string(session_id).expect("valid thread ID"));
chat.thread_name = Some("Clipboard example".to_string());
@@ -2098,7 +2098,7 @@ async fn slash_copy_picker_copies_status_fields_and_preserves_source_after_copyi
);
let expected = [
("Whole status", whole_status.as_str()),
("Model", "gpt-5.4"),
("Model", "gpt-5.5"),
("Directory", directory.as_str()),
("Thread name", "Clipboard example"),
("Session ID", session_id),
@@ -90,7 +90,7 @@ async fn status_command_renders_immediately_without_rate_limit_refresh() {
#[tokio::test]
async fn status_command_uses_catalog_default_reasoning_when_config_empty() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await;
chat.config.model_reasoning_effort = None;
chat.dispatch_command(SlashCommand::Status);
@@ -102,7 +102,7 @@ async fn status_command_uses_catalog_default_reasoning_when_config_empty() {
other => panic!("expected status output, got {other:?}"),
};
assert!(
rendered.contains("gpt-5.4 (reasoning medium, summaries auto)"),
rendered.contains("gpt-5.5 (reasoning medium, summaries auto)"),
"expected /status to render the catalog default reasoning effort, got: {rendered}"
);
}