diff --git a/codex-rs/app-server/tests/suite/v2/model_list.rs b/codex-rs/app-server/tests/suite/v2/model_list.rs index c55a87c19..c807a6591 100644 --- a/codex-rs/app-server/tests/suite/v2/model_list.rs +++ b/codex-rs/app-server/tests/suite/v2/model_list.rs @@ -68,6 +68,25 @@ async fn list_models_returns_all_models_with_large_limit() -> Result<()> { default_reasoning_effort: ReasoningEffort::Medium, is_default: true, }, + Model { + id: "gpt-5.1-codex-mini".to_string(), + model: "gpt-5.1-codex-mini".to_string(), + display_name: "gpt-5.1-codex-mini".to_string(), + description: "Optimized for codex. Cheaper, faster, but less capable.".to_string(), + supported_reasoning_efforts: vec![ + ReasoningEffortOption { + reasoning_effort: ReasoningEffort::Medium, + description: "Dynamically adjusts reasoning based on the task".to_string(), + }, + ReasoningEffortOption { + reasoning_effort: ReasoningEffort::High, + description: "Maximizes reasoning depth for complex or ambiguous problems" + .to_string(), + }, + ], + default_reasoning_effort: ReasoningEffort::Medium, + is_default: false, + }, Model { id: "gpt-5.1".to_string(), model: "gpt-5.1".to_string(), @@ -154,8 +173,30 @@ async fn list_models_pagination_works() -> Result<()> { } = to_response::(second_response)?; assert_eq!(second_items.len(), 1); - assert_eq!(second_items[0].id, "gpt-5.1"); - assert!(second_cursor.is_none()); + assert_eq!(second_items[0].id, "gpt-5.1-codex-mini"); + let third_cursor = second_cursor.ok_or_else(|| anyhow!("cursor for third page"))?; + + let third_request = mcp + .send_list_models_request(ModelListParams { + limit: Some(1), + cursor: Some(third_cursor.clone()), + }) + .await?; + + let third_response: JSONRPCResponse = timeout( + DEFAULT_TIMEOUT, + mcp.read_stream_until_response_message(RequestId::Integer(third_request)), + ) + .await??; + + let ModelListResponse { + data: third_items, + next_cursor: third_cursor, + } = to_response::(third_response)?; + + assert_eq!(third_items.len(), 1); + assert_eq!(third_items[0].id, "gpt-5.1"); + assert!(third_cursor.is_none()); Ok(()) } diff --git a/codex-rs/common/src/model_presets.rs b/codex-rs/common/src/model_presets.rs index 510ce746b..b642486f1 100644 --- a/codex-rs/common/src/model_presets.rs +++ b/codex-rs/common/src/model_presets.rs @@ -173,14 +173,11 @@ const PRESETS: &[ModelPreset] = &[ }, ]; -pub fn builtin_model_presets(auth_mode: Option) -> Vec { - let allow_codex_mini = matches!(auth_mode, Some(AuthMode::ChatGPT)); +pub fn builtin_model_presets(_auth_mode: Option) -> Vec { + // leave auth mode for later use PRESETS .iter() - .filter(|preset| { - (allow_codex_mini || preset.id != "gpt-5.1-codex-mini") - && preset.recommended_upgrade_model.is_none() - }) + .filter(|preset| preset.recommended_upgrade_model.is_none()) .copied() .collect() } diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__model_selection_popup.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__model_selection_popup.snap index ff0f9ac8c..de9016c61 100644 --- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__model_selection_popup.snap +++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__model_selection_popup.snap @@ -5,7 +5,9 @@ expression: popup Select Model and Effort Access legacy models by running codex -m or in your config -› 1. gpt-5.1-codex Optimized for codex. - 2. gpt-5.1 Broad world knowledge with strong general reasoning. +› 1. gpt-5.1-codex Optimized for codex. + 2. gpt-5.1-codex-mini Optimized for codex. Cheaper, faster, but less + capable. + 3. gpt-5.1 Broad world knowledge with strong general reasoning. Press enter to select reasoning effort, or esc to dismiss.