mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
Update models.json (#18586)
- Replace the active models-manager catalog with the deleted core catalog contents. - Replace stale hardcoded test model slugs with current bundled model slugs. - Keep this as a stacked change on top of the cleanup PR.
This commit is contained in:
committed by
GitHub
Unverified
parent
5d5d610740
commit
316cf0e90b
@@ -83,7 +83,7 @@ async fn apply_explorer_role_sets_model_and_adds_session_flags_layer() {
|
||||
.await
|
||||
.expect("explorer role should apply");
|
||||
|
||||
assert_eq!(config.model.as_deref(), Some("gpt-5.1-codex-mini"));
|
||||
assert_eq!(config.model.as_deref(), Some("gpt-5.4-mini"));
|
||||
assert_eq!(config.model_reasoning_effort, Some(ReasoningEffort::Medium));
|
||||
assert_eq!(session_flags_layer_count(&config), before_layers + 1);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ fn serializes_text_verbosity_when_set() {
|
||||
let input: Vec<ResponseItem> = vec![];
|
||||
let tools: Vec<serde_json::Value> = vec![];
|
||||
let req = ResponsesApiRequest {
|
||||
model: "gpt-5.1".to_string(),
|
||||
model: "gpt-5.4".to_string(),
|
||||
instructions: "i".to_string(),
|
||||
input,
|
||||
tools,
|
||||
@@ -57,7 +57,7 @@ fn serializes_text_schema_with_strict_format() {
|
||||
.expect("text controls");
|
||||
|
||||
let req = ResponsesApiRequest {
|
||||
model: "gpt-5.1".to_string(),
|
||||
model: "gpt-5.4".to_string(),
|
||||
instructions: "i".to_string(),
|
||||
input,
|
||||
tools,
|
||||
@@ -95,7 +95,7 @@ fn omits_text_when_not_set() {
|
||||
let input: Vec<ResponseItem> = vec![];
|
||||
let tools: Vec<serde_json::Value> = vec![];
|
||||
let req = ResponsesApiRequest {
|
||||
model: "gpt-5.1".to_string(),
|
||||
model: "gpt-5.4".to_string(),
|
||||
instructions: "i".to_string(),
|
||||
input,
|
||||
tools,
|
||||
@@ -118,7 +118,7 @@ fn omits_text_when_not_set() {
|
||||
#[test]
|
||||
fn serializes_flex_service_tier_when_set() {
|
||||
let req = ResponsesApiRequest {
|
||||
model: "gpt-5.1".to_string(),
|
||||
model: "gpt-5.4".to_string(),
|
||||
instructions: "i".to_string(),
|
||||
input: vec![],
|
||||
tools: vec![],
|
||||
|
||||
@@ -232,7 +232,7 @@ max_rollout_age_days = 42
|
||||
max_rollouts_per_startup = 9
|
||||
min_rollout_idle_hours = 24
|
||||
extract_model = "gpt-5-mini"
|
||||
consolidation_model = "gpt-5"
|
||||
consolidation_model = "gpt-5.2"
|
||||
"#;
|
||||
let memories_cfg =
|
||||
toml::from_str::<ConfigToml>(memories).expect("TOML deserialization should succeed");
|
||||
@@ -247,7 +247,7 @@ consolidation_model = "gpt-5"
|
||||
max_rollouts_per_startup: Some(9),
|
||||
min_rollout_idle_hours: Some(24),
|
||||
extract_model: Some("gpt-5-mini".to_string()),
|
||||
consolidation_model: Some("gpt-5".to_string()),
|
||||
consolidation_model: Some("gpt-5.2".to_string()),
|
||||
}),
|
||||
memories_cfg.memories
|
||||
);
|
||||
@@ -271,7 +271,7 @@ consolidation_model = "gpt-5"
|
||||
max_rollouts_per_startup: 9,
|
||||
min_rollout_idle_hours: 24,
|
||||
extract_model: Some("gpt-5-mini".to_string()),
|
||||
consolidation_model: Some("gpt-5".to_string()),
|
||||
consolidation_model: Some("gpt-5.2".to_string()),
|
||||
}
|
||||
);
|
||||
|
||||
@@ -3229,14 +3229,14 @@ async fn set_model_updates_defaults() -> anyhow::Result<()> {
|
||||
let codex_home = TempDir::new()?;
|
||||
|
||||
ConfigEditsBuilder::new(codex_home.path())
|
||||
.set_model(Some("gpt-5.1-codex"), Some(ReasoningEffort::High))
|
||||
.set_model(Some("gpt-5.4"), Some(ReasoningEffort::High))
|
||||
.apply()
|
||||
.await?;
|
||||
|
||||
let serialized = tokio::fs::read_to_string(codex_home.path().join(CONFIG_TOML_FILE)).await?;
|
||||
let parsed: ConfigToml = toml::from_str(&serialized)?;
|
||||
|
||||
assert_eq!(parsed.model.as_deref(), Some("gpt-5.1-codex"));
|
||||
assert_eq!(parsed.model.as_deref(), Some("gpt-5.4"));
|
||||
assert_eq!(parsed.model_reasoning_effort, Some(ReasoningEffort::High));
|
||||
|
||||
Ok(())
|
||||
@@ -3250,7 +3250,7 @@ async fn set_model_overwrites_existing_model() -> anyhow::Result<()> {
|
||||
tokio::fs::write(
|
||||
&config_path,
|
||||
r#"
|
||||
model = "gpt-5.1-codex"
|
||||
model = "gpt-5.4"
|
||||
model_reasoning_effort = "medium"
|
||||
|
||||
[profiles.dev]
|
||||
@@ -3286,7 +3286,7 @@ async fn set_model_updates_profile() -> anyhow::Result<()> {
|
||||
|
||||
ConfigEditsBuilder::new(codex_home.path())
|
||||
.with_profile(Some("dev"))
|
||||
.set_model(Some("gpt-5.1-codex"), Some(ReasoningEffort::Medium))
|
||||
.set_model(Some("gpt-5.4"), Some(ReasoningEffort::Medium))
|
||||
.apply()
|
||||
.await?;
|
||||
|
||||
@@ -3297,7 +3297,7 @@ async fn set_model_updates_profile() -> anyhow::Result<()> {
|
||||
.get("dev")
|
||||
.expect("profile should be created");
|
||||
|
||||
assert_eq!(profile.model.as_deref(), Some("gpt-5.1-codex"));
|
||||
assert_eq!(profile.model.as_deref(), Some("gpt-5.4"));
|
||||
assert_eq!(
|
||||
profile.model_reasoning_effort,
|
||||
Some(ReasoningEffort::Medium)
|
||||
@@ -3319,7 +3319,7 @@ model = "gpt-4"
|
||||
model_reasoning_effort = "medium"
|
||||
|
||||
[profiles.prod]
|
||||
model = "gpt-5.1-codex"
|
||||
model = "gpt-5.4"
|
||||
"#,
|
||||
)
|
||||
.await?;
|
||||
@@ -3348,7 +3348,7 @@ model = "gpt-5.1-codex"
|
||||
.profiles
|
||||
.get("prod")
|
||||
.and_then(|profile| profile.model.as_deref()),
|
||||
Some("gpt-5.1-codex"),
|
||||
Some("gpt-5.4"),
|
||||
);
|
||||
|
||||
Ok(())
|
||||
@@ -3713,7 +3713,7 @@ async fn agent_role_file_metadata_overrides_config_toml_metadata() -> std::io::R
|
||||
description = "Role metadata from file"
|
||||
nickname_candidates = ["Hypatia"]
|
||||
developer_instructions = "Research carefully"
|
||||
model = "gpt-5"
|
||||
model = "gpt-5.2"
|
||||
"#,
|
||||
)
|
||||
.await?;
|
||||
@@ -3775,7 +3775,7 @@ trust_level = "trusted"
|
||||
r#"
|
||||
name = "researcher"
|
||||
description = "Role metadata from file"
|
||||
model = "gpt-5"
|
||||
model = "gpt-5.2"
|
||||
"#,
|
||||
)
|
||||
.await?;
|
||||
@@ -3785,7 +3785,7 @@ model = "gpt-5"
|
||||
name = "reviewer"
|
||||
description = "Review role"
|
||||
developer_instructions = "Review carefully"
|
||||
model = "gpt-5"
|
||||
model = "gpt-5.2"
|
||||
"#,
|
||||
)
|
||||
.await?;
|
||||
@@ -3830,7 +3830,7 @@ async fn legacy_agent_role_config_file_allows_missing_developer_instructions() -
|
||||
tokio::fs::write(
|
||||
&role_config_path,
|
||||
r#"
|
||||
model = "gpt-5"
|
||||
model = "gpt-5.2"
|
||||
model_reasoning_effort = "high"
|
||||
"#,
|
||||
)
|
||||
@@ -3882,7 +3882,7 @@ async fn agent_role_without_description_after_merge_is_dropped_with_warning() ->
|
||||
&role_config_path,
|
||||
r#"
|
||||
developer_instructions = "Research carefully"
|
||||
model = "gpt-5"
|
||||
model = "gpt-5.2"
|
||||
"#,
|
||||
)
|
||||
.await?;
|
||||
@@ -4001,7 +4001,7 @@ async fn agent_role_file_name_takes_precedence_over_config_key() -> std::io::Res
|
||||
name = "archivist"
|
||||
description = "Role metadata from file"
|
||||
developer_instructions = "Research carefully"
|
||||
model = "gpt-5"
|
||||
model = "gpt-5.2"
|
||||
"#,
|
||||
)
|
||||
.await?;
|
||||
@@ -4286,7 +4286,7 @@ nickname_candidates = ["Ada"]
|
||||
home_agents_dir.join("researcher.toml"),
|
||||
r#"
|
||||
developer_instructions = "Research carefully"
|
||||
model = "gpt-5"
|
||||
model = "gpt-5.2"
|
||||
"#,
|
||||
)
|
||||
.await?;
|
||||
@@ -4319,7 +4319,7 @@ name = "writer"
|
||||
description = "Writer role from file"
|
||||
nickname_candidates = ["Sagan"]
|
||||
developer_instructions = "Write carefully"
|
||||
model = "gpt-5"
|
||||
model = "gpt-5.2"
|
||||
"#,
|
||||
)
|
||||
.await?;
|
||||
@@ -4426,7 +4426,7 @@ config_file = "./agents/researcher.toml"
|
||||
home_agents_dir.join("researcher.toml"),
|
||||
r#"
|
||||
developer_instructions = "Research carefully"
|
||||
model = "gpt-5"
|
||||
model = "gpt-5.2"
|
||||
"#,
|
||||
)
|
||||
.await?;
|
||||
@@ -4725,7 +4725,7 @@ approval_policy = "on-failure"
|
||||
enabled = false
|
||||
|
||||
[profiles.gpt5]
|
||||
model = "gpt-5.1"
|
||||
model = "gpt-5.4"
|
||||
model_provider = "openai"
|
||||
approval_policy = "on-failure"
|
||||
model_reasoning_effort = "high"
|
||||
@@ -5248,7 +5248,7 @@ async fn test_precedence_fixture_with_gpt5_profile() -> std::io::Result<()> {
|
||||
)
|
||||
.await?;
|
||||
let expected_gpt5_profile_config = Config {
|
||||
model: Some("gpt-5.1".to_string()),
|
||||
model: Some("gpt-5.4".to_string()),
|
||||
review_model: None,
|
||||
model_context_window: None,
|
||||
model_auto_compact_token_limit: None,
|
||||
@@ -5898,7 +5898,7 @@ fn config_toml_deserializes_mcp_oauth_callback_url() {
|
||||
async fn config_loads_mcp_oauth_callback_port_from_toml() -> std::io::Result<()> {
|
||||
let codex_home = TempDir::new()?;
|
||||
let toml = r#"
|
||||
model = "gpt-5.1"
|
||||
model = "gpt-5.4"
|
||||
mcp_oauth_callback_port = 5678
|
||||
"#;
|
||||
let cfg: ConfigToml =
|
||||
@@ -5920,7 +5920,7 @@ async fn config_loads_allow_login_shell_from_toml() -> std::io::Result<()> {
|
||||
let codex_home = TempDir::new()?;
|
||||
let cfg: ConfigToml = toml::from_str(
|
||||
r#"
|
||||
model = "gpt-5.1"
|
||||
model = "gpt-5.4"
|
||||
allow_login_shell = false
|
||||
"#,
|
||||
)
|
||||
@@ -5941,7 +5941,7 @@ allow_login_shell = false
|
||||
async fn config_loads_mcp_oauth_callback_url_from_toml() -> std::io::Result<()> {
|
||||
let codex_home = TempDir::new()?;
|
||||
let toml = r#"
|
||||
model = "gpt-5.1"
|
||||
model = "gpt-5.4"
|
||||
mcp_oauth_callback_url = "https://example.com/callback"
|
||||
"#;
|
||||
let cfg: ConfigToml =
|
||||
|
||||
@@ -18,14 +18,14 @@ fn blocking_set_model_top_level() {
|
||||
codex_home,
|
||||
/*profile*/ None,
|
||||
&[ConfigEdit::SetModel {
|
||||
model: Some("gpt-5.1-codex".to_string()),
|
||||
model: Some("gpt-5.4".to_string()),
|
||||
effort: Some(ReasoningEffort::High),
|
||||
}],
|
||||
)
|
||||
.expect("persist");
|
||||
|
||||
let contents = std::fs::read_to_string(codex_home.join(CONFIG_TOML_FILE)).expect("read config");
|
||||
let expected = r#"model = "gpt-5.1-codex"
|
||||
let expected = r#"model = "gpt-5.4"
|
||||
model_reasoning_effort = "high"
|
||||
"#;
|
||||
assert_eq!(contents, expected);
|
||||
@@ -197,7 +197,7 @@ fn blocking_set_model_writes_through_symlink_chain() {
|
||||
codex_home,
|
||||
/*profile*/ None,
|
||||
&[ConfigEdit::SetModel {
|
||||
model: Some("gpt-5.1-codex".to_string()),
|
||||
model: Some("gpt-5.4".to_string()),
|
||||
effort: Some(ReasoningEffort::High),
|
||||
}],
|
||||
)
|
||||
@@ -207,7 +207,7 @@ fn blocking_set_model_writes_through_symlink_chain() {
|
||||
assert!(meta.file_type().is_symlink());
|
||||
|
||||
let contents = std::fs::read_to_string(&target_path).expect("read target");
|
||||
let expected = r#"model = "gpt-5.1-codex"
|
||||
let expected = r#"model = "gpt-5.4"
|
||||
model_reasoning_effort = "high"
|
||||
"#;
|
||||
assert_eq!(contents, expected);
|
||||
@@ -230,7 +230,7 @@ fn blocking_set_model_replaces_symlink_on_cycle() {
|
||||
codex_home,
|
||||
/*profile*/ None,
|
||||
&[ConfigEdit::SetModel {
|
||||
model: Some("gpt-5.1-codex".to_string()),
|
||||
model: Some("gpt-5.4".to_string()),
|
||||
effort: None,
|
||||
}],
|
||||
)
|
||||
@@ -240,7 +240,7 @@ fn blocking_set_model_replaces_symlink_on_cycle() {
|
||||
assert!(!meta.file_type().is_symlink());
|
||||
|
||||
let contents = std::fs::read_to_string(&config_path).expect("read config");
|
||||
let expected = r#"model = "gpt-5.1-codex"
|
||||
let expected = r#"model = "gpt-5.4"
|
||||
"#;
|
||||
assert_eq!(contents, expected);
|
||||
}
|
||||
@@ -381,7 +381,7 @@ fn blocking_set_model_with_explicit_profile() {
|
||||
std::fs::write(
|
||||
codex_home.join(CONFIG_TOML_FILE),
|
||||
r#"[profiles."team a"]
|
||||
model = "gpt-5.1-codex"
|
||||
model = "gpt-5.4"
|
||||
"#,
|
||||
)
|
||||
.expect("seed");
|
||||
@@ -536,8 +536,8 @@ existing = "value"
|
||||
codex_home,
|
||||
/*profile*/ None,
|
||||
&[ConfigEdit::RecordModelMigrationSeen {
|
||||
from: "gpt-5".to_string(),
|
||||
to: "gpt-5.1".to_string(),
|
||||
from: "gpt-5.2".to_string(),
|
||||
to: "gpt-5.4".to_string(),
|
||||
}],
|
||||
)
|
||||
.expect("persist");
|
||||
@@ -547,7 +547,7 @@ existing = "value"
|
||||
existing = "value"
|
||||
|
||||
[notice.model_migrations]
|
||||
gpt-5 = "gpt-5.1"
|
||||
gpt-5 = "gpt-5.4"
|
||||
"#;
|
||||
assert_eq!(contents, expected);
|
||||
}
|
||||
@@ -1102,13 +1102,13 @@ async fn async_builder_set_model_persists() {
|
||||
let codex_home = tmp.path().to_path_buf();
|
||||
|
||||
ConfigEditsBuilder::new(&codex_home)
|
||||
.set_model(Some("gpt-5.1-codex"), Some(ReasoningEffort::High))
|
||||
.set_model(Some("gpt-5.4"), Some(ReasoningEffort::High))
|
||||
.apply()
|
||||
.await
|
||||
.expect("persist");
|
||||
|
||||
let contents = std::fs::read_to_string(codex_home.join(CONFIG_TOML_FILE)).expect("read config");
|
||||
let expected = r#"model = "gpt-5.1-codex"
|
||||
let expected = r#"model = "gpt-5.4"
|
||||
model_reasoning_effort = "high"
|
||||
"#;
|
||||
assert_eq!(contents, expected);
|
||||
@@ -1130,11 +1130,11 @@ model_reasoning_effort = "low"
|
||||
std::fs::read_to_string(codex_home.join(CONFIG_TOML_FILE)).expect("read config");
|
||||
assert_eq!(contents, initial_expected);
|
||||
|
||||
let updated_expected = r#"model = "gpt-5.1-codex"
|
||||
let updated_expected = r#"model = "gpt-5.4"
|
||||
model_reasoning_effort = "high"
|
||||
"#;
|
||||
ConfigEditsBuilder::new(codex_home)
|
||||
.set_model(Some("gpt-5.1-codex"), Some(ReasoningEffort::High))
|
||||
.set_model(Some("gpt-5.4"), Some(ReasoningEffort::High))
|
||||
.apply_blocking()
|
||||
.expect("persist update");
|
||||
contents = std::fs::read_to_string(codex_home.join(CONFIG_TOML_FILE)).expect("read config");
|
||||
|
||||
@@ -62,7 +62,7 @@ X-Doc = "42"
|
||||
async fn write_value_preserves_comments_and_order() -> Result<()> {
|
||||
let tmp = tempdir().expect("tempdir");
|
||||
let original = r#"# Codex user configuration
|
||||
model = "gpt-5"
|
||||
model = "gpt-5.2"
|
||||
approval_policy = "on-request"
|
||||
|
||||
[notice]
|
||||
@@ -88,7 +88,7 @@ unified_exec = true
|
||||
|
||||
let updated = std::fs::read_to_string(tmp.path().join(CONFIG_TOML_FILE)).expect("read config");
|
||||
let expected = r#"# Codex user configuration
|
||||
model = "gpt-5"
|
||||
model = "gpt-5.2"
|
||||
approval_policy = "on-request"
|
||||
|
||||
[notice]
|
||||
@@ -390,7 +390,7 @@ async fn version_conflict_rejected() {
|
||||
.write_value(ConfigValueWriteParams {
|
||||
file_path: Some(tmp.path().join(CONFIG_TOML_FILE).display().to_string()),
|
||||
key_path: "model".to_string(),
|
||||
value: serde_json::json!("gpt-5"),
|
||||
value: serde_json::json!("gpt-5.2"),
|
||||
merge_strategy: MergeStrategy::Replace,
|
||||
expected_version: Some("sha256:bogus".to_string()),
|
||||
})
|
||||
|
||||
@@ -94,7 +94,7 @@ fn numbered_mcp_tools(count: usize) -> HashMap<String, ToolInfo> {
|
||||
async fn tools_config_for_mcp_tool_exposure(search_tool: bool) -> ToolsConfig {
|
||||
let config = test_config().await;
|
||||
let model_info = ModelsManager::construct_model_info_offline_for_tests(
|
||||
"gpt-5-codex",
|
||||
"gpt-5.4",
|
||||
&config.to_models_manager_config(),
|
||||
);
|
||||
let features = Features::with_defaults();
|
||||
|
||||
@@ -10,7 +10,7 @@ use tokio::fs as tokio_fs;
|
||||
#[test]
|
||||
fn build_stage_one_input_message_truncates_rollout_using_model_context_window() {
|
||||
let input = format!("{}{}{}", "a".repeat(700_000), "middle", "z".repeat(700_000));
|
||||
let mut model_info = model_info_from_slug("gpt-5.2-codex");
|
||||
let mut model_info = model_info_from_slug("gpt-5.3-codex");
|
||||
model_info.context_window = Some(123_000);
|
||||
let expected_rollout_token_limit = usize::try_from(
|
||||
((123_000_i64 * model_info.effective_context_window_percent) / 100)
|
||||
@@ -39,7 +39,7 @@ fn build_stage_one_input_message_truncates_rollout_using_model_context_window()
|
||||
#[test]
|
||||
fn build_stage_one_input_message_uses_default_limit_when_model_context_window_missing() {
|
||||
let input = format!("{}{}{}", "a".repeat(700_000), "middle", "z".repeat(700_000));
|
||||
let mut model_info = model_info_from_slug("gpt-5.2-codex");
|
||||
let mut model_info = model_info_from_slug("gpt-5.3-codex");
|
||||
model_info.context_window = None;
|
||||
model_info.max_context_window = None;
|
||||
let expected_truncated = truncate_text(
|
||||
|
||||
@@ -35,7 +35,7 @@ fn stored_thread(cwd: &str, title: &str, first_user_message: &str) -> StoredThre
|
||||
preview: first_user_message.to_string(),
|
||||
name: (!title.is_empty()).then(|| title.to_string()),
|
||||
model_provider: "test-provider".to_string(),
|
||||
model: Some("gpt-5".to_string()),
|
||||
model: Some("gpt-5.2".to_string()),
|
||||
reasoning_effort: None,
|
||||
created_at: Utc
|
||||
.timestamp_opt(1_709_251_100, 0)
|
||||
|
||||
@@ -202,8 +202,8 @@ fn test_session_telemetry_without_metadata() -> SessionTelemetry {
|
||||
.expect("in-memory metrics client");
|
||||
SessionTelemetry::new(
|
||||
ThreadId::new(),
|
||||
"gpt-5.1",
|
||||
"gpt-5.1",
|
||||
"gpt-5.4",
|
||||
"gpt-5.4",
|
||||
/*account_id*/ None,
|
||||
/*account_email*/ None,
|
||||
/*auth_mode*/ None,
|
||||
@@ -455,7 +455,7 @@ async fn preview_session_start_hooks(
|
||||
session_id: ThreadId::new(),
|
||||
cwd: config.cwd.clone(),
|
||||
transcript_path: None,
|
||||
model: "gpt-5".to_string(),
|
||||
model: "gpt-5.2".to_string(),
|
||||
permission_mode: "default".to_string(),
|
||||
source: codex_hooks::SessionStartSource::Startup,
|
||||
}),
|
||||
@@ -1042,19 +1042,19 @@ async fn get_base_instructions_no_user_content() {
|
||||
};
|
||||
let test_cases = vec![
|
||||
InstructionsTestCase {
|
||||
slug: "gpt-5",
|
||||
slug: "gpt-5.4",
|
||||
expects_apply_patch_description: false,
|
||||
},
|
||||
InstructionsTestCase {
|
||||
slug: "gpt-5.1",
|
||||
slug: "gpt-5.4-mini",
|
||||
expects_apply_patch_description: false,
|
||||
},
|
||||
InstructionsTestCase {
|
||||
slug: "gpt-5.1-codex",
|
||||
slug: "gpt-5.3-codex",
|
||||
expects_apply_patch_description: false,
|
||||
},
|
||||
InstructionsTestCase {
|
||||
slug: "gpt-5.1-codex-max",
|
||||
slug: "gpt-5.2",
|
||||
expects_apply_patch_description: false,
|
||||
},
|
||||
];
|
||||
@@ -2538,19 +2538,19 @@ async fn turn_context_with_model_updates_model_fields() {
|
||||
let (session, mut turn_context) = make_session_and_context().await;
|
||||
turn_context.reasoning_effort = Some(ReasoningEffortConfig::Minimal);
|
||||
let updated = turn_context
|
||||
.with_model("gpt-5.1".to_string(), &session.services.models_manager)
|
||||
.with_model("gpt-5.4".to_string(), &session.services.models_manager)
|
||||
.await;
|
||||
let expected_model_info = session
|
||||
.services
|
||||
.models_manager
|
||||
.get_model_info(
|
||||
"gpt-5.1",
|
||||
"gpt-5.4",
|
||||
&updated.config.as_ref().to_models_manager_config(),
|
||||
)
|
||||
.await;
|
||||
|
||||
assert_eq!(updated.config.model.as_deref(), Some("gpt-5.1"));
|
||||
assert_eq!(updated.collaboration_mode.model(), "gpt-5.1");
|
||||
assert_eq!(updated.config.model.as_deref(), Some("gpt-5.4"));
|
||||
assert_eq!(updated.collaboration_mode.model(), "gpt-5.4");
|
||||
assert_eq!(updated.model_info, expected_model_info);
|
||||
assert_eq!(
|
||||
updated.reasoning_effort,
|
||||
@@ -5303,10 +5303,10 @@ async fn record_context_updates_and_set_reference_context_item_reinjects_full_co
|
||||
async fn record_context_updates_and_set_reference_context_item_persists_baseline_without_emitting_diffs()
|
||||
{
|
||||
let (session, previous_context) = make_session_and_context().await;
|
||||
let next_model = if previous_context.model_info.slug == "gpt-5.1" {
|
||||
"gpt-5"
|
||||
let next_model = if previous_context.model_info.slug == "gpt-5.4" {
|
||||
"gpt-5.2"
|
||||
} else {
|
||||
"gpt-5.1"
|
||||
"gpt-5.4"
|
||||
};
|
||||
let turn_context = previous_context
|
||||
.with_model(next_model.to_string(), &session.services.models_manager)
|
||||
@@ -5455,10 +5455,10 @@ async fn build_initial_context_prepends_model_switch_message() {
|
||||
async fn record_context_updates_and_set_reference_context_item_persists_full_reinjection_to_rollout()
|
||||
{
|
||||
let (session, previous_context) = make_session_and_context().await;
|
||||
let next_model = if previous_context.model_info.slug == "gpt-5.1" {
|
||||
"gpt-5"
|
||||
let next_model = if previous_context.model_info.slug == "gpt-5.4" {
|
||||
"gpt-5.2"
|
||||
} else {
|
||||
"gpt-5.1"
|
||||
"gpt-5.4"
|
||||
};
|
||||
let turn_context = previous_context
|
||||
.with_model(next_model.to_string(), &session.services.models_manager)
|
||||
|
||||
@@ -25,8 +25,8 @@ fn test_session_telemetry() -> SessionTelemetry {
|
||||
.expect("in-memory metrics client");
|
||||
SessionTelemetry::new(
|
||||
ThreadId::new(),
|
||||
"gpt-5.1",
|
||||
"gpt-5.1",
|
||||
"gpt-5.4",
|
||||
"gpt-5.4",
|
||||
/*account_id*/ None,
|
||||
/*account_email*/ None,
|
||||
/*auth_mode*/ None,
|
||||
|
||||
@@ -109,7 +109,7 @@ fn discoverable_connector(id: &str, name: &str, description: &str) -> Discoverab
|
||||
|
||||
async fn search_capable_model_info() -> ModelInfo {
|
||||
let config = test_config().await;
|
||||
let mut model_info = construct_model_info_offline("gpt-5-codex", &config);
|
||||
let mut model_info = construct_model_info_offline("gpt-5.4", &config);
|
||||
model_info.supports_search_tool = true;
|
||||
model_info
|
||||
}
|
||||
@@ -218,7 +218,7 @@ fn find_namespace_function_tool<'a>(
|
||||
|
||||
async fn multi_agent_v2_tools_config() -> ToolsConfig {
|
||||
let config = test_config().await;
|
||||
let model_info = construct_model_info_offline("gpt-5-codex", &config);
|
||||
let model_info = construct_model_info_offline("gpt-5.4", &config);
|
||||
let mut features = Features::with_defaults();
|
||||
features.enable(Feature::Collab);
|
||||
features.enable(Feature::MultiAgentV2);
|
||||
@@ -297,7 +297,7 @@ fn build_specs_with_unavailable_tools(
|
||||
|
||||
#[tokio::test]
|
||||
async fn model_provided_unified_exec_is_blocked_for_windows_sandboxed_policies() {
|
||||
let mut model_info = model_info_from_models_json("gpt-5-codex").await;
|
||||
let mut model_info = model_info_from_models_json("gpt-5.4").await;
|
||||
model_info.shell_type = ConfigShellToolType::UnifiedExec;
|
||||
let features = Features::with_defaults();
|
||||
let available_models = Vec::new();
|
||||
@@ -323,7 +323,7 @@ async fn model_provided_unified_exec_is_blocked_for_windows_sandboxed_policies()
|
||||
#[tokio::test]
|
||||
async fn get_memory_requires_feature_flag() {
|
||||
let config = test_config().await;
|
||||
let model_info = construct_model_info_offline("gpt-5-codex", &config);
|
||||
let model_info = construct_model_info_offline("gpt-5.4", &config);
|
||||
let mut features = Features::with_defaults();
|
||||
features.disable(Feature::MemoryTool);
|
||||
let available_models = Vec::new();
|
||||
@@ -408,7 +408,7 @@ async fn assert_default_model_tools(
|
||||
async fn test_build_specs_gpt5_codex_default() {
|
||||
let features = Features::with_defaults();
|
||||
assert_default_model_tools(
|
||||
"gpt-5-codex",
|
||||
"gpt-5.4",
|
||||
&features,
|
||||
Some(WebSearchMode::Cached),
|
||||
"shell_command",
|
||||
@@ -433,7 +433,7 @@ async fn test_build_specs_gpt5_codex_default() {
|
||||
async fn test_build_specs_gpt51_codex_default() {
|
||||
let features = Features::with_defaults();
|
||||
assert_default_model_tools(
|
||||
"gpt-5.1-codex",
|
||||
"gpt-5.4",
|
||||
&features,
|
||||
Some(WebSearchMode::Cached),
|
||||
"shell_command",
|
||||
@@ -459,7 +459,7 @@ async fn test_build_specs_gpt5_codex_unified_exec_web_search() {
|
||||
let mut features = Features::with_defaults();
|
||||
features.enable(Feature::UnifiedExec);
|
||||
assert_model_tools(
|
||||
"gpt-5-codex",
|
||||
"gpt-5.4",
|
||||
&features,
|
||||
Some(WebSearchMode::Live),
|
||||
&[
|
||||
@@ -486,7 +486,7 @@ async fn test_build_specs_gpt51_codex_unified_exec_web_search() {
|
||||
let mut features = Features::with_defaults();
|
||||
features.enable(Feature::UnifiedExec);
|
||||
assert_model_tools(
|
||||
"gpt-5.1-codex",
|
||||
"gpt-5.4",
|
||||
&features,
|
||||
Some(WebSearchMode::Live),
|
||||
&[
|
||||
@@ -512,7 +512,7 @@ async fn test_build_specs_gpt51_codex_unified_exec_web_search() {
|
||||
async fn test_gpt_5_1_codex_max_defaults() {
|
||||
let features = Features::with_defaults();
|
||||
assert_default_model_tools(
|
||||
"gpt-5.1-codex-max",
|
||||
"gpt-5.4",
|
||||
&features,
|
||||
Some(WebSearchMode::Cached),
|
||||
"shell_command",
|
||||
@@ -537,7 +537,7 @@ async fn test_gpt_5_1_codex_max_defaults() {
|
||||
async fn test_codex_5_1_mini_defaults() {
|
||||
let features = Features::with_defaults();
|
||||
assert_default_model_tools(
|
||||
"gpt-5.1-codex-mini",
|
||||
"gpt-5.4-mini",
|
||||
&features,
|
||||
Some(WebSearchMode::Cached),
|
||||
"shell_command",
|
||||
@@ -562,13 +562,14 @@ async fn test_codex_5_1_mini_defaults() {
|
||||
async fn test_gpt_5_defaults() {
|
||||
let features = Features::with_defaults();
|
||||
assert_default_model_tools(
|
||||
"gpt-5",
|
||||
"gpt-5.2",
|
||||
&features,
|
||||
Some(WebSearchMode::Cached),
|
||||
"shell",
|
||||
"shell_command",
|
||||
&[
|
||||
"update_plan",
|
||||
"request_user_input",
|
||||
"apply_patch",
|
||||
"web_search",
|
||||
"image_generation",
|
||||
"view_image",
|
||||
@@ -586,7 +587,7 @@ async fn test_gpt_5_defaults() {
|
||||
async fn test_gpt_5_1_defaults() {
|
||||
let features = Features::with_defaults();
|
||||
assert_default_model_tools(
|
||||
"gpt-5.1",
|
||||
"gpt-5.4",
|
||||
&features,
|
||||
Some(WebSearchMode::Cached),
|
||||
"shell_command",
|
||||
@@ -612,7 +613,7 @@ async fn test_gpt_5_1_codex_max_unified_exec_web_search() {
|
||||
let mut features = Features::with_defaults();
|
||||
features.enable(Feature::UnifiedExec);
|
||||
assert_model_tools(
|
||||
"gpt-5.1-codex-max",
|
||||
"gpt-5.4",
|
||||
&features,
|
||||
Some(WebSearchMode::Live),
|
||||
&[
|
||||
@@ -998,7 +999,7 @@ async fn search_tool_registers_namespaced_mcp_tool_aliases() {
|
||||
#[tokio::test]
|
||||
async fn direct_mcp_tools_register_namespaced_handlers() {
|
||||
let config = test_config().await;
|
||||
let model_info = construct_model_info_offline("gpt-5-codex", &config);
|
||||
let model_info = construct_model_info_offline("gpt-5.4", &config);
|
||||
let mut features = Features::with_defaults();
|
||||
features.enable(Feature::UnifiedExec);
|
||||
let available_models = Vec::new();
|
||||
@@ -1035,7 +1036,7 @@ async fn direct_mcp_tools_register_namespaced_handlers() {
|
||||
#[tokio::test]
|
||||
async fn unavailable_mcp_tools_are_exposed_as_dummy_function_tools() {
|
||||
let config = test_config().await;
|
||||
let model_info = construct_model_info_offline("gpt-5-codex", &config);
|
||||
let model_info = construct_model_info_offline("gpt-5.4", &config);
|
||||
let mut features = Features::with_defaults();
|
||||
features.enable(Feature::UnifiedExec);
|
||||
let available_models = Vec::new();
|
||||
@@ -1084,7 +1085,7 @@ async fn unavailable_mcp_tools_are_exposed_as_dummy_function_tools() {
|
||||
#[tokio::test]
|
||||
async fn test_mcp_tool_property_missing_type_defaults_to_string() {
|
||||
let config = test_config().await;
|
||||
let model_info = construct_model_info_offline("gpt-5-codex", &config);
|
||||
let model_info = construct_model_info_offline("gpt-5.4", &config);
|
||||
let mut features = Features::with_defaults();
|
||||
features.enable(Feature::UnifiedExec);
|
||||
let available_models = Vec::new();
|
||||
@@ -1147,7 +1148,7 @@ async fn test_mcp_tool_property_missing_type_defaults_to_string() {
|
||||
#[tokio::test]
|
||||
async fn test_mcp_tool_preserves_integer_schema() {
|
||||
let config = test_config().await;
|
||||
let model_info = construct_model_info_offline("gpt-5-codex", &config);
|
||||
let model_info = construct_model_info_offline("gpt-5.4", &config);
|
||||
let mut features = Features::with_defaults();
|
||||
features.enable(Feature::UnifiedExec);
|
||||
let available_models = Vec::new();
|
||||
@@ -1208,7 +1209,7 @@ async fn test_mcp_tool_preserves_integer_schema() {
|
||||
#[tokio::test]
|
||||
async fn test_mcp_tool_array_without_items_gets_default_string_items() {
|
||||
let config = test_config().await;
|
||||
let model_info = construct_model_info_offline("gpt-5-codex", &config);
|
||||
let model_info = construct_model_info_offline("gpt-5.4", &config);
|
||||
let mut features = Features::with_defaults();
|
||||
features.enable(Feature::UnifiedExec);
|
||||
features.enable(Feature::ApplyPatchFreeform);
|
||||
@@ -1273,7 +1274,7 @@ async fn test_mcp_tool_array_without_items_gets_default_string_items() {
|
||||
#[tokio::test]
|
||||
async fn test_mcp_tool_anyof_defaults_to_string() {
|
||||
let config = test_config().await;
|
||||
let model_info = construct_model_info_offline("gpt-5-codex", &config);
|
||||
let model_info = construct_model_info_offline("gpt-5.4", &config);
|
||||
let mut features = Features::with_defaults();
|
||||
features.enable(Feature::UnifiedExec);
|
||||
let available_models = Vec::new();
|
||||
@@ -1342,7 +1343,7 @@ async fn test_mcp_tool_anyof_defaults_to_string() {
|
||||
#[tokio::test]
|
||||
async fn test_get_openai_tools_mcp_tools_with_additional_properties_schema() {
|
||||
let config = test_config().await;
|
||||
let model_info = construct_model_info_offline("gpt-5-codex", &config);
|
||||
let model_info = construct_model_info_offline("gpt-5.4", &config);
|
||||
let mut features = Features::with_defaults();
|
||||
features.enable(Feature::UnifiedExec);
|
||||
let available_models = Vec::new();
|
||||
@@ -1461,7 +1462,7 @@ async fn code_mode_only_restricts_model_tools_to_exec_tools() {
|
||||
features.enable(Feature::CodeModeOnly);
|
||||
|
||||
assert_model_tools(
|
||||
"gpt-5.1-codex",
|
||||
"gpt-5.4",
|
||||
&features,
|
||||
Some(WebSearchMode::Live),
|
||||
&["exec", "wait"],
|
||||
|
||||
@@ -20,7 +20,7 @@ fn feedback_tags_macro_compiles() {
|
||||
#[derive(Debug)]
|
||||
struct OnlyDebug;
|
||||
|
||||
feedback_tags!(model = "gpt-5", cached = true, debug_only = OnlyDebug);
|
||||
feedback_tags!(model = "gpt-5.2", cached = true, debug_only = OnlyDebug);
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
|
||||
Reference in New Issue
Block a user