Compare commits

...

1 Commits

Author SHA1 Message Date
Michael Bolin
713eb0dbf0 chore: introduce ModelFamily.requires_chatgpt_auth 2025-08-06 16:20:32 -07:00
3 changed files with 11 additions and 4 deletions

View File

@@ -127,12 +127,13 @@ impl ModelClient {
let auth_mode = auth.as_ref().map(|a| a.mode);
if self.config.model_family.family == "2025-08-06-model"
&& auth_mode != Some(AuthMode::ChatGPT)
{
if self.config.model_family.requires_chatgpt_auth && auth_mode != Some(AuthMode::ChatGPT) {
return Err(CodexErr::UnexpectedStatus(
StatusCode::BAD_REQUEST,
"2025-08-06-model is only supported with ChatGPT auth, run `codex login status` to check your auth status and `codex login` to login with ChatGPT".to_string(),
format!(
"{slug} is only supported with ChatGPT auth, run `codex login status` to check your auth status and `codex login` to login with ChatGPT",
slug = self.config.model_family.slug
),
));
}

View File

@@ -486,6 +486,7 @@ impl Config {
needs_special_apply_patch_instructions: false,
supports_reasoning_summaries,
uses_local_shell_tool: false,
requires_chatgpt_auth: false,
}
});

View File

@@ -23,6 +23,8 @@ pub struct ModelFamily {
// the model such that its description can be omitted.
// See https://platform.openai.com/docs/guides/tools-local-shell
pub uses_local_shell_tool: bool,
pub requires_chatgpt_auth: bool,
}
macro_rules! model_family {
@@ -36,6 +38,7 @@ macro_rules! model_family {
needs_special_apply_patch_instructions: false,
supports_reasoning_summaries: false,
uses_local_shell_tool: false,
requires_chatgpt_auth: false,
};
// apply overrides
$(
@@ -55,6 +58,7 @@ macro_rules! simple_model_family {
needs_special_apply_patch_instructions: false,
supports_reasoning_summaries: false,
uses_local_shell_tool: false,
requires_chatgpt_auth: false,
})
}};
}
@@ -93,6 +97,7 @@ pub fn find_family_for_model(slug: &str) -> Option<ModelFamily> {
model_family!(
slug, "2025-08-06-model",
supports_reasoning_summaries: true,
requires_chatgpt_auth: true,
)
} else {
None