This commit is contained in:
Thibault Sottiaux
2025-09-12 22:44:05 -07:00
parent 3d4acbaea0
commit 19b4ed3c96
4 changed files with 34 additions and 16 deletions

View File

@@ -33,7 +33,7 @@ use toml_edit::DocumentMut;
const OPENAI_DEFAULT_MODEL: &str = "gpt-5";
const OPENAI_DEFAULT_REVIEW_MODEL: &str = "gpt-5";
pub const GPT5_HIGH_MODEL: &str = "gpt-5-high-new";
pub const SWIFTFOX_MEDIUM_MODEL: &str = "swiftfox-medium";
/// Maximum number of bytes of the documentation that will be embedded. Larger
/// files are *silently truncated* to this size so we do not take up too much of
@@ -1184,7 +1184,7 @@ exclude_slash_tmp = true
persist_model_selection(
codex_home.path(),
None,
"gpt-5-high-new",
"swiftfox-high",
Some(ReasoningEffort::High),
)
.await?;
@@ -1193,7 +1193,7 @@ exclude_slash_tmp = true
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-high-new"));
assert_eq!(parsed.model.as_deref(), Some("swiftfox-high"));
assert_eq!(parsed.model_reasoning_effort, Some(ReasoningEffort::High));
Ok(())
@@ -1247,8 +1247,8 @@ model = "gpt-4.1"
persist_model_selection(
codex_home.path(),
Some("dev"),
"gpt-5-high-new",
Some(ReasoningEffort::Low),
"swiftfox-medium",
Some(ReasoningEffort::Medium),
)
.await?;
@@ -1260,8 +1260,11 @@ model = "gpt-4.1"
.get("dev")
.expect("profile should be created");
assert_eq!(profile.model.as_deref(), Some("gpt-5-high-new"));
assert_eq!(profile.model_reasoning_effort, Some(ReasoningEffort::Low));
assert_eq!(profile.model.as_deref(), Some("swiftfox-medium"));
assert_eq!(
profile.model_reasoning_effort,
Some(ReasoningEffort::Medium)
);
Ok(())
}