mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
caribou (#8265)
Welcome caribou <img width="1536" height="1024" alt="image" src="https://github.com/user-attachments/assets/2a67b21f-40cf-4518-aee4-691af331ab50" />
This commit is contained in:
@@ -16,6 +16,7 @@ const GPT_5_CODEX_INSTRUCTIONS: &str = include_str!("../../gpt_5_codex_prompt.md
|
||||
const GPT_5_1_INSTRUCTIONS: &str = include_str!("../../gpt_5_1_prompt.md");
|
||||
const GPT_5_2_INSTRUCTIONS: &str = include_str!("../../gpt_5_2_prompt.md");
|
||||
const GPT_5_1_CODEX_MAX_INSTRUCTIONS: &str = include_str!("../../gpt-5.1-codex-max_prompt.md");
|
||||
const GPT_5_2_CODEX_INSTRUCTIONS: &str = include_str!("../../gpt-5.2-codex_prompt.md");
|
||||
pub(crate) const CONTEXT_WINDOW_272K: i64 = 272_000;
|
||||
|
||||
/// A model family is a group of models that share certain characteristics.
|
||||
@@ -270,7 +271,7 @@ pub(super) fn find_family_for_model(slug: &str) -> ModelFamily {
|
||||
slug, slug,
|
||||
supports_reasoning_summaries: true,
|
||||
reasoning_summary_format: ReasoningSummaryFormat::Experimental,
|
||||
base_instructions: GPT_5_1_CODEX_MAX_INSTRUCTIONS.to_string(),
|
||||
base_instructions: GPT_5_2_CODEX_INSTRUCTIONS.to_string(),
|
||||
apply_patch_tool_type: Some(ApplyPatchToolType::Freeform),
|
||||
shell_type: ConfigShellToolType::ShellCommand,
|
||||
supports_parallel_tool_calls: true,
|
||||
@@ -294,13 +295,13 @@ pub(super) fn find_family_for_model(slug: &str) -> ModelFamily {
|
||||
)
|
||||
|
||||
// Production models.
|
||||
} else if slug.starts_with("caribou") {
|
||||
} else if slug.starts_with("gpt-5.2-codex") {
|
||||
// Same as gpt-5.1-codex-max.
|
||||
model_family!(
|
||||
slug, slug,
|
||||
supports_reasoning_summaries: true,
|
||||
reasoning_summary_format: ReasoningSummaryFormat::Experimental,
|
||||
base_instructions: GPT_5_1_CODEX_MAX_INSTRUCTIONS.to_string(),
|
||||
base_instructions: GPT_5_2_CODEX_INSTRUCTIONS.to_string(),
|
||||
apply_patch_tool_type: Some(ApplyPatchToolType::Freeform),
|
||||
shell_type: ConfigShellToolType::ShellCommand,
|
||||
supports_parallel_tool_calls: true,
|
||||
|
||||
@@ -12,10 +12,10 @@ pub const HIDE_GPT_5_1_CODEX_MAX_MIGRATION_PROMPT_CONFIG: &str =
|
||||
static PRESETS: Lazy<Vec<ModelPreset>> = Lazy::new(|| {
|
||||
vec![
|
||||
ModelPreset {
|
||||
id: "caribou".to_string(),
|
||||
model: "caribou".to_string(),
|
||||
display_name: "caribou".to_string(),
|
||||
description: "Latest Codex-optimized flagship for deep and fast reasoning.".to_string(),
|
||||
id: "gpt-5.2-codex".to_string(),
|
||||
model: "gpt-5.2-codex".to_string(),
|
||||
display_name: "gpt-5.2-codex".to_string(),
|
||||
description: "Latest frontier agentic coding model.".to_string(),
|
||||
default_reasoning_effort: ReasoningEffort::Medium,
|
||||
supported_reasoning_efforts: vec![
|
||||
ReasoningEffortPreset {
|
||||
@@ -44,7 +44,7 @@ static PRESETS: Lazy<Vec<ModelPreset>> = Lazy::new(|| {
|
||||
id: "gpt-5.1-codex-max".to_string(),
|
||||
model: "gpt-5.1-codex-max".to_string(),
|
||||
display_name: "gpt-5.1-codex-max".to_string(),
|
||||
description: "Latest Codex-optimized flagship for deep and fast reasoning.".to_string(),
|
||||
description: "Codex-optimized flagship for deep and fast reasoning.".to_string(),
|
||||
default_reasoning_effort: ReasoningEffort::Medium,
|
||||
supported_reasoning_efforts: vec![
|
||||
ReasoningEffortPreset {
|
||||
@@ -66,10 +66,10 @@ static PRESETS: Lazy<Vec<ModelPreset>> = Lazy::new(|| {
|
||||
],
|
||||
is_default: false,
|
||||
upgrade: Some(ModelUpgrade {
|
||||
id: "caribou".to_string(),
|
||||
id: "gpt-5.2-codex".to_string(),
|
||||
reasoning_effort_mapping: None,
|
||||
migration_config_key: "caribou".to_string(),
|
||||
model_link: Some("https://www.codex.com/models/caribou".to_string()),
|
||||
migration_config_key: "gpt-5.2-codex".to_string(),
|
||||
model_link: Some("https://openai.com/index/introducing-gpt-5-2-codex".to_string()),
|
||||
}),
|
||||
show_in_picker: true,
|
||||
supported_in_api: true,
|
||||
@@ -93,10 +93,10 @@ static PRESETS: Lazy<Vec<ModelPreset>> = Lazy::new(|| {
|
||||
],
|
||||
is_default: false,
|
||||
upgrade: Some(ModelUpgrade {
|
||||
id: "caribou".to_string(),
|
||||
id: "gpt-5.2-codex".to_string(),
|
||||
reasoning_effort_mapping: None,
|
||||
migration_config_key: "caribou".to_string(),
|
||||
model_link: Some("https://www.codex.com/models/caribou".to_string()),
|
||||
migration_config_key: "gpt-5.2-codex".to_string(),
|
||||
model_link: Some("https://openai.com/index/introducing-gpt-5-2-codex".to_string()),
|
||||
}),
|
||||
show_in_picker: true,
|
||||
supported_in_api: true,
|
||||
@@ -127,10 +127,10 @@ static PRESETS: Lazy<Vec<ModelPreset>> = Lazy::new(|| {
|
||||
],
|
||||
is_default: false,
|
||||
upgrade: Some(ModelUpgrade {
|
||||
id: "caribou".to_string(),
|
||||
id: "gpt-5.2-codex".to_string(),
|
||||
reasoning_effort_mapping: None,
|
||||
migration_config_key: "caribou".to_string(),
|
||||
model_link: Some("https://www.codex.com/models/caribou".to_string()),
|
||||
migration_config_key: "gpt-5.2-codex".to_string(),
|
||||
model_link: Some("https://openai.com/index/introducing-gpt-5-2-codex".to_string()),
|
||||
}),
|
||||
show_in_picker: true,
|
||||
supported_in_api: true,
|
||||
@@ -158,10 +158,10 @@ static PRESETS: Lazy<Vec<ModelPreset>> = Lazy::new(|| {
|
||||
],
|
||||
is_default: false,
|
||||
upgrade: Some(ModelUpgrade {
|
||||
id: "caribou".to_string(),
|
||||
id: "gpt-5.2-codex".to_string(),
|
||||
reasoning_effort_mapping: None,
|
||||
migration_config_key: "caribou".to_string(),
|
||||
model_link: Some("https://www.codex.com/models/caribou".to_string()),
|
||||
migration_config_key: "gpt-5.2-codex".to_string(),
|
||||
model_link: Some("https://openai.com/index/introducing-gpt-5-2-codex".to_string()),
|
||||
}),
|
||||
show_in_picker: false,
|
||||
supported_in_api: true,
|
||||
@@ -217,8 +217,8 @@ static PRESETS: Lazy<Vec<ModelPreset>> = Lazy::new(|| {
|
||||
upgrade: Some(ModelUpgrade {
|
||||
id: "caribou".to_string(),
|
||||
reasoning_effort_mapping: None,
|
||||
migration_config_key: "caribou".to_string(),
|
||||
model_link: Some("https://www.codex.com/models/caribou".to_string()),
|
||||
migration_config_key: "gpt-5.2-codex".to_string(),
|
||||
model_link: Some("https://openai.com/index/introducing-gpt-5-2-codex".to_string()),
|
||||
}),
|
||||
show_in_picker: false,
|
||||
supported_in_api: true,
|
||||
@@ -249,10 +249,10 @@ static PRESETS: Lazy<Vec<ModelPreset>> = Lazy::new(|| {
|
||||
],
|
||||
is_default: false,
|
||||
upgrade: Some(ModelUpgrade {
|
||||
id: "caribou".to_string(),
|
||||
id: "gpt-5.2-codex".to_string(),
|
||||
reasoning_effort_mapping: None,
|
||||
migration_config_key: "caribou".to_string(),
|
||||
model_link: Some("https://www.codex.com/models/caribou".to_string()),
|
||||
migration_config_key: "gpt-5.2-codex".to_string(),
|
||||
model_link: Some("https://openai.com/index/introducing-gpt-5-2-codex".to_string()),
|
||||
}),
|
||||
show_in_picker: false,
|
||||
supported_in_api: true,
|
||||
|
||||
@@ -30,7 +30,7 @@ use crate::openai_models::model_presets::builtin_model_presets;
|
||||
const MODEL_CACHE_FILE: &str = "models_cache.json";
|
||||
const DEFAULT_MODEL_CACHE_TTL: Duration = Duration::from_secs(300);
|
||||
const OPENAI_DEFAULT_API_MODEL: &str = "gpt-5.1-codex-max";
|
||||
const OPENAI_DEFAULT_CHATGPT_MODEL: &str = "caribou";
|
||||
const OPENAI_DEFAULT_CHATGPT_MODEL: &str = "gpt-5.2-codex";
|
||||
const CODEX_AUTO_BALANCED_MODEL: &str = "codex-auto-balanced";
|
||||
|
||||
/// Coordinates remote model discovery plus cached metadata on disk.
|
||||
|
||||
Reference in New Issue
Block a user