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:
Ahmed Ibrahim
2026-04-20 10:27:01 -07:00
committed by GitHub
Unverified
parent 5d5d610740
commit 316cf0e90b
63 changed files with 540 additions and 1016 deletions
+24 -24
View File
@@ -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 =
+14 -14
View File
@@ -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");
+3 -3
View File
@@ -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()),
})