Migrate GPT-5.4 uses to GPT-5.6 variants (#33173)

## What changed

- Hide `gpt-5.4` and `gpt-5.4-mini` from model selection and direct existing users to `gpt-5.6-terra` and `gpt-5.6-luna`, respectively.
- Use Terra for memory consolidation and Luna for memory extraction and rate-limit switch prompts.
- Keep Amazon Bedrock GPT-5 catalog entries visible when their bundled model metadata is hidden.

## Testing

- Add coverage that all Amazon Bedrock GPT-5 models remain visible and update TUI expectations for the new model choices.

GitOrigin-RevId: fd69c8d5fb6b510c77204df6b7ac3f07e67cded2
This commit is contained in:
Sergio Mattei
2026-07-14 21:50:19 +00:00
committed by copyberry
parent 518085387b
commit c38c30ef51
8 changed files with 31 additions and 17 deletions
@@ -5,6 +5,7 @@ use codex_model_provider_info::AMAZON_BEDROCK_GPT_5_6_SOL_MODEL_ID;
use codex_model_provider_info::AMAZON_BEDROCK_GPT_5_6_TERRA_MODEL_ID;
use codex_models_manager::bundled_models_response;
use codex_protocol::openai_models::ModelInfo;
use codex_protocol::openai_models::ModelVisibility;
use codex_protocol::openai_models::ModelsResponse;
use codex_protocol::openai_models::ReasoningEffort;
use codex_protocol::openai_models::ReasoningEffortPreset;
@@ -75,6 +76,7 @@ fn gpt_5_bedrock_model(
model.priority = priority;
model.context_window = Some(GPT_5_BEDROCK_CONTEXT_WINDOW);
model.max_context_window = Some(GPT_5_BEDROCK_CONTEXT_WINDOW);
model.visibility = ModelVisibility::List;
model.availability_nux = None;
model.upgrade = None;
model
@@ -164,6 +166,15 @@ mod tests {
}
}
#[test]
fn gpt_5_bedrock_models_are_visible() {
let catalog = static_model_catalog();
for model in catalog.models {
assert_eq!(model.visibility, ModelVisibility::List);
}
}
#[test]
fn gpt_5_6_bedrock_models_use_variant_metadata_and_max_reasoning_effort() {
let catalog = static_model_catalog();
+2 -2
View File
@@ -87,11 +87,11 @@ pub const DEFAULT_APPROVAL_REVIEW_PREFERRED_MODEL: &str = "codex-auto-review";
/// Default model used for memory extraction when a provider does not require a
/// backend-specific model ID.
pub const DEFAULT_MEMORY_EXTRACTION_PREFERRED_MODEL: &str = "gpt-5.4-mini";
pub const DEFAULT_MEMORY_EXTRACTION_PREFERRED_MODEL: &str = "gpt-5.6-luna";
/// Default model used for memory consolidation when a provider does not require
/// a backend-specific model ID.
pub const DEFAULT_MEMORY_CONSOLIDATION_PREFERRED_MODEL: &str = "gpt-5.4";
pub const DEFAULT_MEMORY_CONSOLIDATION_PREFERRED_MODEL: &str = "gpt-5.6-terra";
/// Runtime provider abstraction used by model execution.
///
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -3,7 +3,7 @@
use super::*;
use codex_app_server_protocol::CodexErrorInfo as AppServerCodexErrorInfo;
pub(super) const NUDGE_MODEL_SLUG: &str = "gpt-5.4-mini";
pub(super) const NUDGE_MODEL_SLUG: &str = "gpt-5.6-luna";
pub(super) const RATE_LIMIT_SWITCH_PROMPT_THRESHOLD: f64 = 90.0;
pub(super) const RATE_LIMIT_SWITCH_PROMPT_VIEW_ID: &str = "rate-limit-switch-prompt";
@@ -10,10 +10,7 @@ expression: popup
3. gpt-5.6-luna Fast and affordable agentic coding model.
4. gpt-5.5 Frontier model for complex coding, research, and
real-world work.
5. gpt-5.4 Strong model for everyday coding.
6. gpt-5.4-mini Small, fast, and cost-efficient model for simpler
coding tasks.
› 7. gpt-5.2 (current) Optimized for professional work and long-running
› 5. gpt-5.2 (current) Optimized for professional work and long-running
agents.
Press enter to confirm or esc to go back
@@ -3,10 +3,10 @@ source: tui/src/chatwidget/tests/status_and_layout.rs
expression: popup
---
Approaching rate limits
Switch to gpt-5.4-mini for lower credit usage?
Switch to gpt-5.6-luna for lower credit usage?
› 1. Switch to gpt-5.4-mini Small, fast, and cost-efficient
model for simpler coding tasks.
› 1. Switch to gpt-5.6-luna Fast and affordable agentic coding
model.
2. Keep current model
3. Keep current model (never show again) Hide future rate limit reminders
about switching models.
@@ -3675,7 +3675,7 @@ async fn advanced_only_reasoning_option_requires_explicit_selection() {
#[tokio::test]
async fn auto_model_advertising_advanced_effort_opens_reasoning_picker() {
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.6-terra");
preset.id = "codex-auto-test".to_string();
preset.model = "codex-auto-test".to_string();
preset.display_name = "codex-auto-test".to_string();
@@ -401,7 +401,7 @@ async fn queued_slash_menu_cancel_drains_next_input() {
async fn queued_settings_selection_applies_before_next_input() {
let (mut chat, mut rx, mut op_rx) = make_chatwidget_manual(Some("gpt-5.2")).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.6-terra");
preset.supported_reasoning_efforts.truncate(1);
let selected_effort = preset.supported_reasoning_efforts[0].effort.clone();
chat.model_catalog = std::sync::Arc::new(ModelCatalog::new(vec![preset]));
@@ -439,7 +439,7 @@ async fn queued_settings_selection_applies_before_next_input() {
match next_submit_op(&mut op_rx) {
Op::UserTurn { model, effort, .. } => assert_eq!(
(model, effort),
("gpt-5.4".to_string(), Some(selected_effort))
("gpt-5.6-terra".to_string(), Some(selected_effort))
),
other => panic!("expected queued message with updated model, got {other:?}"),
}