mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
feat: show gpt mini (#6583)
This commit is contained in:
committed by
GitHub
Unverified
parent
b1979b70a8
commit
e3aaee00c8
@@ -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::<ModelListResponse>(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::<ModelListResponse>(third_response)?;
|
||||
|
||||
assert_eq!(third_items.len(), 1);
|
||||
assert_eq!(third_items[0].id, "gpt-5.1");
|
||||
assert!(third_cursor.is_none());
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@@ -173,14 +173,11 @@ const PRESETS: &[ModelPreset] = &[
|
||||
},
|
||||
];
|
||||
|
||||
pub fn builtin_model_presets(auth_mode: Option<AuthMode>) -> Vec<ModelPreset> {
|
||||
let allow_codex_mini = matches!(auth_mode, Some(AuthMode::ChatGPT));
|
||||
pub fn builtin_model_presets(_auth_mode: Option<AuthMode>) -> Vec<ModelPreset> {
|
||||
// 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()
|
||||
}
|
||||
|
||||
+4
-2
@@ -5,7 +5,9 @@ expression: popup
|
||||
Select Model and Effort
|
||||
Access legacy models by running codex -m <model_name> 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.
|
||||
|
||||
Reference in New Issue
Block a user