Skip to content

Use Claude Code with your ChatGPT, Kimi, Cursor or Grok subscription via a local Anthropic-compatible proxy

Rust

codex: offer the ultrafast tier on gpt-6.1-sol as the catalog does

Koichi Shiraishif161fd782f2c
diff --git a/docs/src/content/docs/providers/codex.md b/docs/src/content/docs/providers/codex.md
index d446a21..b885ad4 100644
--- a/docs/src/content/docs/providers/codex.md
+++ b/docs/src/content/docs/providers/codex.md
@@ -32,7 +32,7 @@ Claude-style aliases map to Codex models: `haiku` and `claude-haiku-*` to `gpt-6
Append `-fast` to any registered Codex model to request `service_tier: "priority"`. For example, `gpt-6-sol-fast` selects `gpt-6-sol` with fast service.
-Append `-ultrafast` to a model that offers the ultrafast tier to request `service_tier: "ultrafast"`. Only `gpt-6-astra` offers it today, so `gpt-6-astra-ultrafast` is the one ultrafast ID.
+Append `-ultrafast` to a model that offers the ultrafast tier to request `service_tier: "ultrafast"`. `gpt-6-astra` and `gpt-6.1-sol` offer it today, so `gpt-6-astra-ultrafast` and `gpt-6.1-sol-ultrafast` are the ultrafast IDs.
On `/v1/messages`, `CCP_CODEX_SERVICE_TIER` or `codex.serviceTier` takes precedence over either suffix. A forced `ultrafast` applies to models that offer it, and the proxy requests `priority` for the others. The OpenAI-compatible routes use only the suffix or, on `/v1/responses`, the request's own `service_tier`.
diff --git a/docs/src/content/docs/using/models-and-routing.md b/docs/src/content/docs/using/models-and-routing.md
index 80f9069..219b77e 100644
--- a/docs/src/content/docs/using/models-and-routing.md
+++ b/docs/src/content/docs/using/models-and-routing.md
@@ -39,7 +39,7 @@ curl http://127.0.0.1:18765/v1/models
Every registered Codex model also has a local `-fast` form. The proxy removes `-fast` from the upstream model and requests the priority service tier.
-Models that offer the ultrafast tier also have a local `-ultrafast` form, which requests the ultrafast service tier. Today that is `gpt-6-astra-ultrafast` only. An `-ultrafast` name on any other model is not a registered ID.
+Models that offer the ultrafast tier also have a local `-ultrafast` form, which requests the ultrafast service tier. Today those are `gpt-6-astra-ultrafast` and `gpt-6.1-sol-ultrafast`. An `-ultrafast` name on any other model is not a registered ID.
For Claude Code requests on `/v1/messages`, a configured `codex.serviceTier` or `CCP_CODEX_SERVICE_TIER` override wins over both suffixes. When the forced tier is `ultrafast` and the model does not offer it, the proxy requests priority instead.
diff --git a/src/providers/codex/mod.rs b/src/providers/codex/mod.rs
index 52bb657..581e010 100644
--- a/src/providers/codex/mod.rs
+++ b/src/providers/codex/mod.rs
@@ -2075,6 +2075,7 @@ mod tests {
assert!(models.contains(&"gpt-6-luna".to_string()));
assert!(models.contains(&"gpt-6.1-sol".to_string()));
assert!(models.contains(&"gpt-6.1-sol-fast".to_string()));
+ assert!(models.contains(&"gpt-6.1-sol-ultrafast".to_string()));
assert!(models.contains(&"gpt-5.4".to_string()));
assert!(models.contains(&"gpt-5.4-mini".to_string()));
assert!(models.contains(&"gpt-6-astra-fast".to_string()));
diff --git a/src/providers/codex/translate/model_allowlist.rs b/src/providers/codex/translate/model_allowlist.rs
index 6ee7b35..6655a07 100644
--- a/src/providers/codex/translate/model_allowlist.rs
+++ b/src/providers/codex/translate/model_allowlist.rs
@@ -42,7 +42,7 @@ pub struct ResolvedModel {
/// Models whose Codex catalog entry offers the `ultrafast` service tier.
/// Every other model offers `priority` at most, so it gets no `-ultrafast` form.
-pub const ULTRAFAST_MODELS: &[&str] = &["gpt-6-astra"];
+pub const ULTRAFAST_MODELS: &[&str] = &["gpt-6-astra", "gpt-6.1-sol"];
const FAST_SUFFIX: &str = "-fast";
const ULTRAFAST_SUFFIX: &str = "-ultrafast";
@@ -313,6 +313,11 @@ mod tests {
),
("gpt-6-astra", ServiceTier::Priority, ServiceTier::Priority),
("gpt-6-astra", ServiceTier::Flex, ServiceTier::Flex),
+ (
+ "gpt-6.1-sol",
+ ServiceTier::Ultrafast,
+ ServiceTier::Ultrafast,
+ ),
("gpt-6-sol", ServiceTier::Ultrafast, ServiceTier::Priority),
("gpt-6-luna", ServiceTier::Ultrafast, ServiceTier::Priority),
("gpt-6-sol", ServiceTier::Priority, ServiceTier::Priority),
diff --git a/src/registry.rs b/src/registry.rs
index 2a1bc5d..4696081 100644
--- a/src/registry.rs
+++ b/src/registry.rs
@@ -361,7 +361,11 @@ mod tests {
#[test]
fn ultrafast_variant_routes_to_codex_only_where_offered() {
let registry = Registry::new(AliasProvider::Codex);
- for model in ["gpt-6-astra-ultrafast", "gpt-6-astra-ultrafast[1m]"] {
+ for model in [
+ "gpt-6-astra-ultrafast",
+ "gpt-6-astra-ultrafast[1m]",
+ "gpt-6.1-sol-ultrafast",
+ ] {
assert_eq!(
registry.provider_for_model(model, None).unwrap().name(),
"codex"
diff --git a/tests/server.rs b/tests/server.rs
index eb36c78..ed44d86 100644
--- a/tests/server.rs
+++ b/tests/server.rs
@@ -1530,7 +1530,8 @@ async fn models_endpoint_lists_supported_models() {
assert!(ids.contains(&"gpt-6.1-sol"));
assert!(ids.contains(&"gpt-6.1-sol-fast"));
assert!(ids.contains(&"gpt-6-astra-ultrafast"));
- assert!(!ids.contains(&"gpt-6.1-sol-ultrafast"));
+ assert!(ids.contains(&"gpt-6.1-sol-ultrafast"));
+ assert!(!ids.contains(&"gpt-6-sol-ultrafast"));
assert!(ids.contains(&"grok-4.6"));
for entry in data {
assert_eq!(entry["type"], "model");