diff --git a/docs/src/content/docs/providers/codex.md b/docs/src/content/docs/providers/codex.md index cca0fc42..b471b340 100644 --- a/docs/src/content/docs/providers/codex.md +++ b/docs/src/content/docs/providers/codex.md @@ -28,6 +28,10 @@ The proxy owns its tokens and does not read native Codex CLI credentials. It ref Use `claude-code-proxy models` as the current catalog. Model access depends on your ChatGPT account. A model rejected by the subscription produces the upstream error verbatim. +`gpt-6.2-sol` and `gpt-6.2-astra` are built-in models, including their `-fast` +variants. They use Responses Lite; the `fullLane` setting does not switch them +to the full lane. + The proxy also reads the Codex CLI's optional `$CODEX_HOME/models_cache.json` (default `~/.codex/models_cache.json`) to recognize additional models. Listed entries marked `supported_in_api: true` appear in discovery; hidden entries diff --git a/src/providers/codex/translate/model_allowlist.rs b/src/providers/codex/translate/model_allowlist.rs index 63075fc4..a3a70520 100644 --- a/src/providers/codex/translate/model_allowlist.rs +++ b/src/providers/codex/translate/model_allowlist.rs @@ -23,6 +23,8 @@ pub const ALLOWED_MODELS: &[&str] = &[ "gpt-6-sol", "gpt-6.1-sol", "gpt-6.1-terra", + "gpt-6.2-astra", + "gpt-6.2-sol", ]; pub const MODEL_ALIASES: &[(&str, &str)] = &[ @@ -207,6 +209,8 @@ pub fn uses_responses_lite(model: &str) -> bool { | "gpt-6-sol" | "gpt-6.1-sol" | "gpt-6.1-terra" + | "gpt-6.2-astra" + | "gpt-6.2-sol" ) || (!ALLOWED_MODELS.contains(&model) && catalog_model(model) .is_some_and(|entry| entry.supported_in_api && entry.use_responses_lite)) @@ -264,7 +268,7 @@ mod tests { } #[test] - fn full_lane_covers_all_lite_models_except_luna() { + fn full_lane_covers_known_full_lane_models() { for model in [ "gpt-5.6-sol", "gpt-5.6-terra", @@ -276,7 +280,12 @@ mod tests { assert!(uses_responses_lite_with_full_lane(model, false), "{model}"); assert!(!uses_responses_lite_with_full_lane(model, true), "{model}"); } - for model in ["gpt-5.6-luna", "gpt-6-luna"] { + for model in [ + "gpt-5.6-luna", + "gpt-6-luna", + "gpt-6.2-astra", + "gpt-6.2-sol", + ] { assert!(uses_responses_lite_with_full_lane(model, false), "{model}"); assert!(uses_responses_lite_with_full_lane(model, true), "{model}"); } @@ -331,8 +340,14 @@ mod tests { } #[test] - fn gpt_6_sol_fast_adds_priority() { - for model in ["gpt-6-sol", "gpt-6.1-sol", "gpt-6.1-terra"] { + fn gpt_6_fast_adds_priority() { + for model in [ + "gpt-6-sol", + "gpt-6.1-sol", + "gpt-6.1-terra", + "gpt-6.2-astra", + "gpt-6.2-sol", + ] { let r = resolve_model_request(&format!("{model}-fast")); assert_eq!(r.model, model); assert_eq!(r.service_tier, Some(ServiceTier::Priority)); @@ -345,6 +360,8 @@ mod tests { assert!(uses_responses_lite("gpt-6-luna")); assert!(uses_responses_lite("gpt-6.1-sol")); assert!(uses_responses_lite("gpt-6.1-terra")); + assert!(uses_responses_lite("gpt-6.2-astra")); + assert!(uses_responses_lite("gpt-6.2-sol")); } #[test] @@ -508,6 +525,8 @@ mod tests { assert!(assert_allowed_model("gpt-5.6-luna").is_ok()); assert!(assert_allowed_model("gpt-6.1-sol").is_ok()); assert!(assert_allowed_model("gpt-6.1-terra").is_ok()); + assert!(assert_allowed_model("gpt-6.2-astra").is_ok()); + assert!(assert_allowed_model("gpt-6.2-sol").is_ok()); } #[test] diff --git a/src/registry.rs b/src/registry.rs index 2dad8e5c..c0a9adec 100644 --- a/src/registry.rs +++ b/src/registry.rs @@ -54,6 +54,8 @@ pub(crate) const CODEX_MODELS: &[&str] = &[ "gpt-6-sol", "gpt-6.1-sol", "gpt-6.1-terra", + "gpt-6.2-astra", + "gpt-6.2-sol", ]; pub(crate) const KIMI_MODELS: &[&str] = &["kimi-for-coding", "kimi-k2.6", "kimi-k3", "k2.6", "k3"]; @@ -486,6 +488,12 @@ mod tests { "gpt-6.1-sol-fast", "gpt-6.1-terra", "gpt-6.1-terra-fast", + "gpt-6.2-astra", + "gpt-6.2-astra-fast", + "gpt-6.2-astra-fast[1m]", + "gpt-6.2-sol", + "gpt-6.2-sol-fast", + "gpt-6.2-sol[1m]", ] { assert_eq!( registry.provider_for_model(model, None).unwrap().name(), diff --git a/tests/server.rs b/tests/server.rs index 7fb5e6f8..d51f1d7d 100644 --- a/tests/server.rs +++ b/tests/server.rs @@ -1754,6 +1754,10 @@ async fn models_endpoint_lists_supported_models() { assert!(ids.contains(&"gpt-6.1-sol-fast")); assert!(ids.contains(&"gpt-6.1-terra")); assert!(ids.contains(&"gpt-6.1-terra-fast")); + assert!(ids.contains(&"gpt-6.2-astra")); + assert!(ids.contains(&"gpt-6.2-astra-fast")); + assert!(ids.contains(&"gpt-6.2-sol")); + assert!(ids.contains(&"gpt-6.2-sol-fast")); assert!(ids.contains(&"gpt-6-astra-ultrafast")); assert!(ids.contains(&"gpt-6.1-sol-ultrafast")); assert!(!ids.contains(&"gpt-6-sol-ultrafast"));