Skip to content

The agent that grows with you

fix(fast): offer Ultrafast only where it is served; /fast ultra shorthand

Teknium690b75a31a6d
diff --git a/agent/codex_service_tiers.py b/agent/codex_service_tiers.py
index 23fb1cd8ded..d4d9197a3ed 100644
--- a/agent/codex_service_tiers.py
+++ b/agent/codex_service_tiers.py
@@ -59,6 +59,57 @@ def _tiers_for_model(access_token: str, base_url: str, model: str) -> frozenset[
return cached[0].get(wire_model)
+def codex_account_offers_tier(
+ model: Any, tier: str, *, base_url: Any = None, access_token: Any = None,
+) -> bool | None:
+ """Whether the signed-in ChatGPT account's Codex catalog lists ``tier`` for ``model``.
+
+ ``None`` when unknown (no usable token, catalog unreachable, model absent) so callers never refuse
+ on a failed lookup. ``access_token`` defaults to the profile's stored Codex OAuth token."""
+ from agent.codex_headers import CODEX_AUX_BASE_URL, is_official_codex_base_url
+ base = str(base_url or "").strip() or CODEX_AUX_BASE_URL
+ if not is_official_codex_base_url(base):
+ return None
+ from hermes_cli.auth_constants import AuthError, _decode_jwt_claims
+ # Only a ChatGPT OAuth JWT reads this catalog; a caller's pre-init key (an OpenAI API key on a
+ # profile that also has one) is not this account's credential, so use the stored Codex login.
+ token = access_token if isinstance(access_token, str) and _decode_jwt_claims(access_token) else None
+ if not token:
+ try:
+ from hermes_cli.auth_codex import resolve_codex_runtime_credentials
+ token = resolve_codex_runtime_credentials(read_only=True).get("api_key")
+ except AuthError: # no Codex login on this profile: unknown, never a refusal
+ return None
+ if not isinstance(token, str) or not token:
+ return None
+ from agent.model_metadata import _bare_codex_slug
+ supported = _tiers_for_model(token, base, _bare_codex_slug(str(model or "")))
+ return None if supported is None else tier in supported
+
+
+def ultrafast_offered(model: Any, *, provider: Any = None, base_url: Any = None, access_token: Any = None) -> bool:
+ """Whether ``/fast ultrafast`` (and the Ultrafast picker row) is offered on this route: the route
+ gate plus, on the ChatGPT/Codex subscription, the account's own Codex catalog. That backend accepts
+ ``service_tier: "ultrafast"`` from a plan without the entitlement and silently serves the default
+ tier, so the catalog the official client reads is the authority. An unreadable catalog never
+ blocks (request-time negotiation still clamps per credential)."""
+ from urllib.parse import urlparse
+
+ from hermes_cli.models import normalize_provider, resolve_fast_mode_overrides
+ if resolve_fast_mode_overrides(model, provider=provider, base_url=base_url, tier="ultrafast") is None:
+ return False
+ on_codex_sub = (provider and normalize_provider(provider) == "openai-codex") or (
+ (urlparse(str(base_url or "")).hostname or "").lower() == "chatgpt.com")
+ return not on_codex_sub or codex_account_offers_tier(
+ model, "ultrafast", base_url=base_url, access_token=access_token) is not False
+
+
+def ultrafast_offered_for(cli: Any, model: Any) -> bool:
+ """:func:`ultrafast_offered` on a CLI shell's resolved route (attributes absent before setup)."""
+ return ultrafast_offered(model, provider=getattr(cli, "provider", None), base_url=getattr(cli, "base_url", None),
+ access_token=getattr(cli, "api_key", None))
+
+
def negotiate_request_tier(agent: Any, overrides: dict[str, Any]) -> None:
"""Resolve the current credential on each build without mutating user preference."""
from agent.codex_headers import is_official_codex_base_url
diff --git a/agent/fast_mode.py b/agent/fast_mode.py
index 5ed2998faa6..006a17e914a 100644
--- a/agent/fast_mode.py
+++ b/agent/fast_mode.py
@@ -30,8 +30,10 @@ NORMAL_TIER_WORDS = frozenset({"", "normal", "default", "standard", "off", "none
# on CLI / gateway / TUI) parses through, so a new tier is one edit.
SERVICE_TIER_WORDS: dict[str, str] = {
"fast": "priority", "priority": "priority", "on": "priority",
- "ultrafast": "ultrafast", "auto": "auto", "cold": "cold",
+ "ultrafast": "ultrafast", "ultra": "ultrafast", "auto": "auto", "cold": "cold",
}
+# Typed /fast shorthands -> canonical /fast word (pickers always send the canonical value).
+FAST_ARG_ALIASES: dict[str, str] = {"ultra": "ultrafast"}
def parse_service_tier(raw: Any) -> str | None:
diff --git a/gateway/slash_commands_model.py b/gateway/slash_commands_model.py
index fd2e3ab5514..cea2c26781e 100644
--- a/gateway/slash_commands_model.py
+++ b/gateway/slash_commands_model.py
@@ -821,7 +821,7 @@ class GatewayModelCommandsMixin:
async def _handle_fast_command(self, event: MessageEvent) -> Optional[str]:
"""Handle /fast — the CLI Priority Processing toggle; session-scoped unless ``--global``
(persists agent.service_tier, parity with /model)."""
- from agent.fast_mode import service_tier_word
+ from agent.fast_mode import FAST_ARG_ALIASES, service_tier_word
from gateway.run import _load_gateway_config, _resolve_gateway_model
# The /reasoning parser strips --global (any position) and normalizes unicode dashes.
@@ -841,7 +841,10 @@ class GatewayModelCommandsMixin:
model, runtime = _resolve_gateway_model(user_config), {}
if not _fast_route_supports(model, runtime):
return t("gateway.fast.not_supported")
- ultrafast = _fast_route_supports(model, runtime, tier="ultrafast")
+ args = FAST_ARG_ALIASES.get(args, args)
+ from agent.codex_service_tiers import ultrafast_offered
+ ultrafast = ultrafast_offered(model, provider=runtime.get("provider"), base_url=runtime.get("base_url"),
+ access_token=runtime.get("api_key"))
if args == "ultrafast" and not ultrafast:
return t("gateway.fast.ultrafast_not_supported", model=model)
if args and args != "status":
diff --git a/hermes_cli/cli_commands_mixin.py b/hermes_cli/cli_commands_mixin.py
index ac050556fdc..3a5a0e0928f 100644
--- a/hermes_cli/cli_commands_mixin.py
+++ b/hermes_cli/cli_commands_mixin.py
@@ -100,7 +100,7 @@ _BUSY_MODES = ("queue", "steer", "interrupt")
_FAST_TIERS = {
"fast": ("priority", "fast"), "on": ("priority", "fast"), "normal": (None, "normal"),
"off": (None, "normal"), "auto": ("auto", "auto"), "cold": ("cold", "cold"),
- "ultrafast": ("ultrafast", "ultrafast")}
+ "ultrafast": ("ultrafast", "ultrafast"), "ultra": ("ultrafast", "ultrafast")}
# /reasoning display toggles: arg -> (attr, value, headline key, follow-up note key or None);
# the keys resolve under ``cli.commands.reasoning.*`` at call time.
@@ -2361,8 +2361,8 @@ class CLICommandsMixin(CLICommandsSessionToolsMixin):
arg, explicit_global = _split_scope_flags(raw)
if arg not in _FAST_TIERS:
return _cp(_dim_line(_t("shared.unknown_argument", arg=arg)), usage)
- if arg == "ultrafast":
- if not _probe("hermes_cli.models", "model_supports_ultrafast", False, model):
+ if _FAST_TIERS[arg][0] == "ultrafast":
+ if not _probe("agent.codex_service_tiers", "ultrafast_offered_for", False, self, model):
return _cp(_dim_line(_t("fast.ultrafast_not_supported", model=model or "?")), usage)
feature_name = _t("fast.feature_ultrafast")
self.service_tier, saved_value = _FAST_TIERS[arg]
diff --git a/hermes_cli/commands.py b/hermes_cli/commands.py
index 0cda0ff6a32..ba6d73fcd20 100644
--- a/hermes_cli/commands.py
+++ b/hermes_cli/commands.py
@@ -224,9 +224,9 @@ COMMAND_REGISTRY: list[CommandDef] = [
CommandDef("reasoning", "Manage reasoning effort and display", "Configuration",
args_hint="[level|show|hide|full|clamp] [--global]",
subcommands=("none", "minimal", "low", "medium", "high", "xhigh", "max", "ultra", "show", "hide", "on", "off", "full", "clamp", "--global")),
- CommandDef("fast", "Fast mode — OpenAI Priority Processing / Anthropic Fast Mode (normal/fast/auto/cold)", "Configuration",
- args_hint="[normal|fast|auto|cold|status] [--global]",
- subcommands=("normal", "fast", "auto", "cold", "status", "on", "off", "--global"),
+ CommandDef("fast", "Fast mode — OpenAI Priority Processing / Anthropic Fast Mode (normal/fast/auto/cold/ultrafast)", "Configuration",
+ args_hint="[normal|fast|auto|cold|ultrafast|status] [--global]",
+ subcommands=("normal", "fast", "auto", "cold", "ultrafast", "ultra", "status", "on", "off", "--global"),
desktop="advanced"),
CommandDef("skin", "Show or change the display skin/theme", "Configuration",
cli_only=True, args_hint="[name]", argument_mode="options"),
diff --git a/hermes_cli/inventory.py b/hermes_cli/inventory.py
index b6933231724..b464c807e8b 100644
--- a/hermes_cli/inventory.py
+++ b/hermes_cli/inventory.py
@@ -541,6 +541,7 @@ def _apply_capabilities(rows: list[dict], *, metadata_config: dict | None = None
silent (the dial is a no-op on models that ignore it; hiding it from a capable model is worse). A
serving aggregator's detail overrides models.dev (adds ``can_disable_reasoning``). ``supported_efforts``
is deliberately NOT forwarded — it under-reports levels that work."""
+ from agent.codex_service_tiers import ultrafast_offered
from hermes_cli.models import model_supports_ultrafast, resolve_fast_mode_overrides
try:
@@ -565,7 +566,8 @@ def _apply_capabilities(rows: list[dict], *, metadata_config: dict | None = None
fast = resolve_fast_mode_overrides(
model, provider=slug, base_url=row.get("api_url")) is not None
entry: dict[str, Any] = {"fast": fast, "reasoning": reasoning}
- if fast and model_supports_ultrafast(model):
+ if fast and model_supports_ultrafast(model) and ultrafast_offered(
+ model, provider=slug, base_url=row.get("api_url")):
entry["ultrafast"] = True
if reasoning and read_reasoning_catalog is not None:
diff --git a/locales/af.yaml b/locales/af.yaml
index c8b11e00781..daef166f549 100644
--- a/locales/af.yaml
+++ b/locales/af.yaml
@@ -184,8 +184,8 @@ gateway:
choice_normal: "normal — standaardverwerking"
choice_auto: "auto — vinnig vir die eerste sekondes van elke beurt"
choice_cold: "cold — vinnig slegs vir die eerste beurt van 'n sessie"
- choice_ultrafast: "ultrafast — OpenAI Ultrafast (GPT-6 Astra, 6x prys)"
- ultrafast_not_supported: "⚡ Ultrafast is slegs beskikbaar vir GPT-6 Astra (huidige model: `{model}`)."
+ choice_ultrafast: "ultrafast — OpenAI Ultrafast, 6x prys"
+ ultrafast_not_supported: "⚡ Ultrafast is nie beskikbaar vir `{model}` op hierdie rekening of roete nie."
footer:
status: "📎 Looptyd-voetstuk: **{state}**\nVelde: `{fields}`\nPlatform: `{platform}`"
usage: "Gebruik: `/footer [on|off|status]`"
@@ -2661,7 +2661,7 @@ cli:
feature_anthropic: "Anthropic Fast Mode"
feature_openai: "Priority Processing"
feature_ultrafast: "OpenAI Ultrafast"
- ultrafast_not_supported: "(._.) Ultrafast is slegs beskikbaar vir GPT-6 Astra (huidige model: {model})."
+ ultrafast_not_supported: "(._.) Ultrafast is nie beskikbaar vir {model} op hierdie rekening of roete nie."
usage: "Gebruik: /fast [normal|fast|auto|cold|ultrafast|status] [--global]"
status: "{feature}: {status}"
set_to: "✓ {feature} gestel op {value} {scope}"
diff --git a/locales/ar.yaml b/locales/ar.yaml
index e8e5c0224bf..90bbffb9437 100644
--- a/locales/ar.yaml
+++ b/locales/ar.yaml
@@ -184,8 +184,8 @@ gateway:
choice_normal: "normal — المعالجة القياسية"
choice_auto: "auto — سريع في الثواني الأولى من كل دور"
choice_cold: "cold — سريع في الدور الأول من الجلسة فقط"
- choice_ultrafast: "ultrafast — ‏OpenAI Ultrafast ‏(GPT-6 Astra، السعر ×6)"
- ultrafast_not_supported: "⚡ ‏Ultrafast متاح فقط لـ GPT-6 Astra (النموذج الحالي: `{model}`)."
+ choice_ultrafast: "ultrafast — ‏OpenAI Ultrafast، السعر ×6"
+ ultrafast_not_supported: "⚡ ‏Ultrafast غير متاح لـ `{model}` على هذا الحساب أو المسار."
footer:
status: "📎 تذييل التشغيل: **{state}**\nالحقول: `{fields}`\nالمنصّة: `{platform}`"
usage: "الاستخدام: `/footer [on|off|status]`"
@@ -2661,7 +2661,7 @@ cli:
feature_anthropic: "الوضع السريع من Anthropic"
feature_openai: "المعالجة ذات الأولوية"
feature_ultrafast: "OpenAI Ultrafast"
- ultrafast_not_supported: "(._.) ‏Ultrafast متاح فقط لـ GPT-6 Astra (النموذج الحالي: {model})."
+ ultrafast_not_supported: "(._.) ‏Ultrafast غير متاح لـ {model} على هذا الحساب أو المسار."
usage: "الاستخدام: /fast [normal|fast|auto|cold|ultrafast|status] [--global]"
status: "{feature}: {status}"
set_to: "✓ تم ضبط {feature} على {value} {scope}"
diff --git a/locales/de.yaml b/locales/de.yaml
index a2dd1f484c6..ed8e3486762 100644
--- a/locales/de.yaml
+++ b/locales/de.yaml
@@ -184,8 +184,8 @@ gateway:
choice_normal: "normal — Standardverarbeitung"
choice_auto: "auto — schnell in den ersten Sekunden jedes Zugs"
choice_cold: "cold — schnell nur im ersten Zug einer Sitzung"
- choice_ultrafast: "ultrafast — OpenAI Ultrafast (GPT-6 Astra, 6-facher Preis)"
- ultrafast_not_supported: "⚡ Ultrafast ist nur für GPT-6 Astra verfügbar (aktuelles Modell: `{model}`)."
+ choice_ultrafast: "ultrafast — OpenAI Ultrafast, 6-facher Preis"
+ ultrafast_not_supported: "⚡ Ultrafast ist für `{model}` mit diesem Konto oder dieser Route nicht verfügbar."
footer:
status: "📎 Laufzeit-Fußzeile: **{state}**\nFelder: `{fields}`\nPlattform: `{platform}`"
usage: "Verwendung: `/footer [on|off|status]`"
@@ -2661,7 +2661,7 @@ cli:
feature_anthropic: "Anthropic Fast Mode"
feature_openai: "Priority Processing"
feature_ultrafast: "OpenAI Ultrafast"
- ultrafast_not_supported: "(._.) Ultrafast ist nur für GPT-6 Astra verfügbar (aktuelles Modell: {model})."
+ ultrafast_not_supported: "(._.) Ultrafast ist für {model} mit diesem Konto oder dieser Route nicht verfügbar."
usage: "Verwendung: /fast [normal|fast|auto|cold|ultrafast|status] [--global]"
status: "{feature}: {status}"
set_to: "✓ {feature} auf {value} gesetzt {scope}"
diff --git a/locales/en.yaml b/locales/en.yaml
index 11d5c242cf6..4d6426e2d50 100644
--- a/locales/en.yaml
+++ b/locales/en.yaml
@@ -187,8 +187,8 @@ gateway:
choice_normal: "normal — standard processing"
choice_auto: "auto — fast for the first seconds of every turn"
choice_cold: "cold — fast for the first turn of a session only"
- choice_ultrafast: "ultrafast — OpenAI Ultrafast (GPT-6 Astra, 6x price)"
- ultrafast_not_supported: "⚡ Ultrafast is only available for GPT-6 Astra (current model: `{model}`)."
+ choice_ultrafast: "ultrafast — OpenAI Ultrafast, 6x price"
+ ultrafast_not_supported: "⚡ Ultrafast isn't available for `{model}` on this account or route."
footer:
status: "📎 Runtime footer: **{state}**\nFields: `{fields}`\nPlatform: `{platform}`"
usage: "Usage: `/footer [on|off|status]`"
@@ -2762,7 +2762,7 @@ cli:
feature_anthropic: "Anthropic Fast Mode"
feature_openai: "Priority Processing"
feature_ultrafast: "OpenAI Ultrafast"
- ultrafast_not_supported: "(._.) Ultrafast is only available for GPT-6 Astra (current model: {model})."
+ ultrafast_not_supported: "(._.) Ultrafast isn't available for {model} on this account or route."
usage: "Usage: /fast [normal|fast|auto|cold|ultrafast|status] [--global]"
status: "{feature}: {status}"
set_to: "✓ {feature} set to {value} {scope}"
diff --git a/locales/es.yaml b/locales/es.yaml
index 2b163937ec0..9a3f0319ee4 100644
--- a/locales/es.yaml
+++ b/locales/es.yaml
@@ -184,8 +184,8 @@ gateway:
choice_normal: "normal — procesamiento estándar"
choice_auto: "auto — rápido en los primeros segundos de cada turno"
choice_cold: "cold — rápido solo en el primer turno de una sesión"
- choice_ultrafast: "ultrafast — OpenAI Ultrafast (GPT-6 Astra, precio x6)"
- ultrafast_not_supported: "⚡ Ultrafast solo está disponible para GPT-6 Astra (modelo actual: `{model}`)."
+ choice_ultrafast: "ultrafast — OpenAI Ultrafast, precio x6"
+ ultrafast_not_supported: "⚡ Ultrafast no está disponible para `{model}` en esta cuenta o ruta."
footer:
status: "📎 Pie de ejecución: **{state}**\nCampos: `{fields}`\nPlataforma: `{platform}`"
usage: "Uso: `/footer [on|off|status]`"
@@ -2661,7 +2661,7 @@ cli:
feature_anthropic: "Anthropic Fast Mode"
feature_openai: "Priority Processing"
feature_ultrafast: "OpenAI Ultrafast"
- ultrafast_not_supported: "(._.) Ultrafast solo está disponible para GPT-6 Astra (modelo actual: {model})."
+ ultrafast_not_supported: "(._.) Ultrafast no está disponible para {model} en esta cuenta o ruta."
usage: "Uso: /fast [normal|fast|auto|cold|ultrafast|status] [--global]"
status: "{feature}: {status}"
set_to: "✓ {feature} establecido en {value} {scope}"
diff --git a/locales/fr.yaml b/locales/fr.yaml
index 5e233df87a4..dbd6d9a1ed9 100644
--- a/locales/fr.yaml
+++ b/locales/fr.yaml
@@ -210,8 +210,8 @@ gateway:
choice_normal: "normal — traitement standard"
choice_auto: "auto — rapide pendant les premières secondes de chaque tour"
choice_cold: "cold — rapide uniquement au premier tour d'une session"
- choice_ultrafast: "ultrafast — OpenAI Ultrafast (GPT-6 Astra, prix x6)"
- ultrafast_not_supported: "⚡ Ultrafast n'est disponible que pour GPT-6 Astra (modèle actuel : `{model}`)."
+ choice_ultrafast: "ultrafast — OpenAI Ultrafast, prix x6"
+ ultrafast_not_supported: "⚡ Ultrafast n'est pas disponible pour `{model}` sur ce compte ou cette route."
footer:
status: "📎 Pied de page d'exécution : **{state}**\nChamps : `{fields}`\nPlateforme : `{platform}`"
usage: "Usage : `/footer [on|off|status]`"
@@ -2939,7 +2939,7 @@ cli:
feature_anthropic: "Anthropic Fast Mode"
feature_openai: "Priority Processing"
feature_ultrafast: "OpenAI Ultrafast"
- ultrafast_not_supported: "(._.) Ultrafast n'est disponible que pour GPT-6 Astra (modèle actuel : {model})."
+ ultrafast_not_supported: "(._.) Ultrafast n'est pas disponible pour {model} sur ce compte ou cette route."
usage: "Usage : /fast [normal|fast|auto|cold|ultrafast|status] [--global]"
status: "{feature} : {status}"
set_to: "✓ {feature} défini sur {value} {scope}"
diff --git a/locales/ga.yaml b/locales/ga.yaml
index 94dcb1c1b9a..08c1a849163 100644
--- a/locales/ga.yaml
+++ b/locales/ga.yaml
@@ -184,8 +184,8 @@ gateway:
choice_normal: "normal — gnáthphróiseáil"
choice_auto: "auto — tapa do na chéad soicindí de gach seal"
choice_cold: "cold — tapa don chéad seal de sheisiún amháin"
- choice_ultrafast: "ultrafast — OpenAI Ultrafast (GPT-6 Astra, praghas x6)"
- ultrafast_not_supported: "⚡ Níl Ultrafast ar fáil ach do GPT-6 Astra (samhail reatha: `{model}`)."
+ choice_ultrafast: "ultrafast — OpenAI Ultrafast, praghas x6"
+ ultrafast_not_supported: "⚡ Níl Ultrafast ar fáil do `{model}` ar an gcuntas nó ar an mbealach seo."
footer:
status: "📎 Buntásc rite: **{state}**\nRéimsí: `{fields}`\nArdán: `{platform}`"
usage: "Úsáid: `/footer [on|off|status]`"
@@ -2661,7 +2661,7 @@ cli:
feature_anthropic: "Anthropic Fast Mode"
feature_openai: "Priority Processing"
feature_ultrafast: "OpenAI Ultrafast"
- ultrafast_not_supported: "(._.) Níl Ultrafast ar fáil ach do GPT-6 Astra (samhail reatha: {model})."
+ ultrafast_not_supported: "(._.) Níl Ultrafast ar fáil do {model} ar an gcuntas nó ar an mbealach seo."
usage: "Úsáid: /fast [normal|fast|auto|cold|ultrafast|status] [--global]"
status: "{feature}: {status}"
set_to: "✓ {feature} socraithe go {value} {scope}"
diff --git a/locales/hu.yaml b/locales/hu.yaml
index fd60538ae5c..1ce725e2f04 100644
--- a/locales/hu.yaml
+++ b/locales/hu.yaml
@@ -187,8 +187,8 @@ gateway:
choice_normal: "normal — normál feldolgozás"
choice_auto: "auto — gyors minden kör első másodperceiben"
choice_cold: "cold — gyors csak a munkamenet első körében"
- choice_ultrafast: "ultrafast — OpenAI Ultrafast (GPT-6 Astra, hatszoros ár)"
- ultrafast_not_supported: "⚡ Az Ultrafast csak a GPT-6 Astra modellhez érhető el (jelenlegi modell: `{model}`)."
+ choice_ultrafast: "ultrafast — OpenAI Ultrafast, hatszoros ár"
+ ultrafast_not_supported: "⚡ Az Ultrafast nem érhető el a(z) `{model}` modellhez ezen a fiókon vagy útvonalon."
footer:
status: "📎 Futási idejű lábléc: **{state}**\nMezők: `{fields}`\nPlatform: `{platform}`"
usage: "Használat: `/footer [on|off|status]`"
@@ -2678,7 +2678,7 @@ cli:
feature_anthropic: "Anthropic Fast Mode"
feature_openai: "Priority Processing"
feature_ultrafast: "OpenAI Ultrafast"
- ultrafast_not_supported: "(._.) Az Ultrafast csak a GPT-6 Astra modellhez érhető el (jelenlegi modell: {model})."
+ ultrafast_not_supported: "(._.) Az Ultrafast nem érhető el a(z) {model} modellhez ezen a fiókon vagy útvonalon."
usage: "Használat: /fast [normal|fast|auto|cold|ultrafast|status] [--global]"
status: "{feature}: {status}"
set_to: "✓ {feature} beállítva: {value} {scope}"
diff --git a/locales/it.yaml b/locales/it.yaml
index 6017c025170..aae1ebd6f84 100644
--- a/locales/it.yaml
+++ b/locales/it.yaml
@@ -184,8 +184,8 @@ gateway:
choice_normal: "normal — elaborazione standard"
choice_auto: "auto — veloce nei primi secondi di ogni turno"
choice_cold: "cold — veloce solo nel primo turno di una sessione"
- choice_ultrafast: "ultrafast — OpenAI Ultrafast (GPT-6 Astra, prezzo x6)"
- ultrafast_not_supported: "⚡ Ultrafast è disponibile solo per GPT-6 Astra (modello attuale: `{model}`)."
+ choice_ultrafast: "ultrafast — OpenAI Ultrafast, prezzo x6"
+ ultrafast_not_supported: "⚡ Ultrafast non è disponibile per `{model}` su questo account o percorso."
footer:
status: "📎 Footer di runtime: **{state}**\nCampi: `{fields}`\nPiattaforma: `{platform}`"
usage: "Uso: `/footer [on|off|status]`"
@@ -2661,7 +2661,7 @@ cli:
feature_anthropic: "Anthropic Fast Mode"
feature_openai: "Priority Processing"
feature_ultrafast: "OpenAI Ultrafast"
- ultrafast_not_supported: "(._.) Ultrafast è disponibile solo per GPT-6 Astra (modello attuale: {model})."
+ ultrafast_not_supported: "(._.) Ultrafast non è disponibile per {model} su questo account o percorso."
usage: "Uso: /fast [normal|fast|auto|cold|ultrafast|status] [--global]"
status: "{feature}: {status}"
set_to: "✓ {feature} impostato su {value} {scope}"
diff --git a/locales/ja.yaml b/locales/ja.yaml
index 9a093de154e..519cf8a053a 100644
--- a/locales/ja.yaml
+++ b/locales/ja.yaml
@@ -184,8 +184,8 @@ gateway:
choice_normal: "normal — 標準処理"
choice_auto: "auto — 各ターンの最初の数秒間だけ高速"
choice_cold: "cold — セッションの最初のターンのみ高速"
- choice_ultrafast: "ultrafast — OpenAI Ultrafast(GPT-6 Astra、料金 6 倍)"
- ultrafast_not_supported: "⚡ Ultrafast は GPT-6 Astra でのみ利用できます(現在のモデル: `{model}`)。"
+ choice_ultrafast: "ultrafast — OpenAI Ultrafast、料金 6 倍"
+ ultrafast_not_supported: "⚡ このアカウントまたはルートでは `{model}` の Ultrafast は利用できません。"
footer:
status: "📎 ランタイムフッター: **{state}**\nフィールド: `{fields}`\nプラットフォーム: `{platform}`"
usage: "使い方: `/footer [on|off|status]`"
@@ -2661,7 +2661,7 @@ cli:
feature_anthropic: "Anthropic Fast Mode"
feature_openai: "Priority Processing"
feature_ultrafast: "OpenAI Ultrafast"
- ultrafast_not_supported: "(._.) Ultrafast は GPT-6 Astra でのみ利用できます(現在のモデル: {model})。"
+ ultrafast_not_supported: "(._.) このアカウントまたはルートでは {model} の Ultrafast は利用できません。"
usage: "使い方: /fast [normal|fast|auto|cold|ultrafast|status] [--global]"
status: "{feature}: {status}"
set_to: "✓ {feature} を {value} に設定しました {scope}"
diff --git a/locales/ko.yaml b/locales/ko.yaml
index 24470fcad60..396bd550a05 100644
--- a/locales/ko.yaml
+++ b/locales/ko.yaml
@@ -184,8 +184,8 @@ gateway:
choice_normal: "normal — 표준 처리"
choice_auto: "auto — 매 턴의 처음 몇 초 동안 빠름"
choice_cold: "cold — 세션의 첫 턴에만 빠름"
- choice_ultrafast: "ultrafast — OpenAI Ultrafast (GPT-6 Astra, 가격 6배)"
- ultrafast_not_supported: "⚡ Ultrafast는 GPT-6 Astra에서만 사용할 수 있습니다 (현재 모델: `{model}`)."
+ choice_ultrafast: "ultrafast — OpenAI Ultrafast, 가격 6배"
+ ultrafast_not_supported: "⚡ 이 계정 또는 경로에서는 `{model}`에 Ultrafast를 사용할 수 없습니다."
footer:
status: "📎 런타임 푸터: **{state}**\n필드: `{fields}`\n플랫폼: `{platform}`"
usage: "사용법: `/footer [on|off|status]`"
@@ -2661,7 +2661,7 @@ cli:
feature_anthropic: "Anthropic Fast Mode"
feature_openai: "Priority Processing"
feature_ultrafast: "OpenAI Ultrafast"
- ultrafast_not_supported: "(._.) Ultrafast는 GPT-6 Astra에서만 사용할 수 있습니다 (현재 모델: {model})."
+ ultrafast_not_supported: "(._.) 이 계정 또는 경로에서는 {model}에 Ultrafast를 사용할 수 없습니다."
usage: "사용법: /fast [normal|fast|auto|cold|ultrafast|status] [--global]"
status: "{feature}: {status}"
set_to: "✓ {feature}을(를) {value}(으)로 설정했어요 {scope}"
diff --git a/locales/pt.yaml b/locales/pt.yaml
index 6250fbebce1..799ab40caa0 100644
--- a/locales/pt.yaml
+++ b/locales/pt.yaml
@@ -184,8 +184,8 @@ gateway:
choice_normal: "normal — processamento padrão"
choice_auto: "auto — rápido nos primeiros segundos de cada turno"
choice_cold: "cold — rápido apenas no primeiro turno de uma sessão"
- choice_ultrafast: "ultrafast — OpenAI Ultrafast (GPT-6 Astra, preço 6x)"
- ultrafast_not_supported: "⚡ O Ultrafast só está disponível para o GPT-6 Astra (modelo atual: `{model}`)."
+ choice_ultrafast: "ultrafast — OpenAI Ultrafast, preço 6x"
+ ultrafast_not_supported: "⚡ O Ultrafast não está disponível para `{model}` nesta conta ou rota."
footer:
status: "📎 Rodapé de execução: **{state}**\nCampos: `{fields}`\nPlataforma: `{platform}`"
usage: "Uso: `/footer [on|off|status]`"
@@ -2661,7 +2661,7 @@ cli:
feature_anthropic: "Anthropic Fast Mode"
feature_openai: "Priority Processing"
feature_ultrafast: "OpenAI Ultrafast"
- ultrafast_not_supported: "(._.) O Ultrafast só está disponível para o GPT-6 Astra (modelo atual: {model})."
+ ultrafast_not_supported: "(._.) O Ultrafast não está disponível para {model} nesta conta ou rota."
usage: "Uso: /fast [normal|fast|auto|cold|ultrafast|status] [--global]"
status: "{feature}: {status}"
set_to: "✓ {feature} definido como {value} {scope}"
diff --git a/locales/ru.yaml b/locales/ru.yaml
index 372bec53ae6..4066eb14c63 100644
--- a/locales/ru.yaml
+++ b/locales/ru.yaml
@@ -184,8 +184,8 @@ gateway:
choice_normal: "normal — стандартная обработка"
choice_auto: "auto — быстро в первые секунды каждого хода"
choice_cold: "cold — быстро только на первом ходе сессии"
- choice_ultrafast: "ultrafast — OpenAI Ultrafast (GPT-6 Astra, цена ×6)"
- ultrafast_not_supported: "⚡ Ultrafast доступен только для GPT-6 Astra (текущая модель: `{model}`)."
+ choice_ultrafast: "ultrafast — OpenAI Ultrafast, цена ×6"
+ ultrafast_not_supported: "⚡ Ultrafast недоступен для `{model}` в этом аккаунте или маршруте."
footer:
status: "📎 Нижний колонтитул среды выполнения: **{state}**\nПоля: `{fields}`\nПлатформа: `{platform}`"
usage: "Использование: `/footer [on|off|status]`"
@@ -2661,7 +2661,7 @@ cli:
feature_anthropic: "Anthropic Fast Mode"
feature_openai: "Priority Processing"
feature_ultrafast: "OpenAI Ultrafast"
- ultrafast_not_supported: "(._.) Ultrafast доступен только для GPT-6 Astra (текущая модель: {model})."
+ ultrafast_not_supported: "(._.) Ultrafast недоступен для {model} в этом аккаунте или маршруте."
usage: "Использование: /fast [normal|fast|auto|cold|ultrafast|status] [--global]"
status: "{feature}: {status}"
set_to: "✓ {feature}: установлено {value} {scope}"
diff --git a/locales/tr.yaml b/locales/tr.yaml
index fda6173d58e..60b965a3fec 100644
--- a/locales/tr.yaml
+++ b/locales/tr.yaml
@@ -184,8 +184,8 @@ gateway:
choice_normal: "normal — standart işleme"
choice_auto: "auto — her turun ilk saniyelerinde hızlı"
choice_cold: "cold — yalnızca oturumun ilk turunda hızlı"
- choice_ultrafast: "ultrafast — OpenAI Ultrafast (GPT-6 Astra, 6 kat fiyat)"
- ultrafast_not_supported: "⚡ Ultrafast yalnızca GPT-6 Astra için kullanılabilir (geçerli model: `{model}`)."
+ choice_ultrafast: "ultrafast — OpenAI Ultrafast, 6 kat fiyat"
+ ultrafast_not_supported: "⚡ Ultrafast bu hesapta veya rotada `{model}` için kullanılamıyor."
footer:
status: "📎 Çalışma zamanı altbilgisi: **{state}**\nAlanlar: `{fields}`\nPlatform: `{platform}`"
usage: "Kullanım: `/footer [on|off|status]`"
@@ -2661,7 +2661,7 @@ cli:
feature_anthropic: "Anthropic Fast Mode"
feature_openai: "Priority Processing"
feature_ultrafast: "OpenAI Ultrafast"
- ultrafast_not_supported: "(._.) Ultrafast yalnızca GPT-6 Astra için kullanılabilir (geçerli model: {model})."
+ ultrafast_not_supported: "(._.) Ultrafast bu hesapta veya rotada {model} için kullanılamıyor."
usage: "Kullanım: /fast [normal|fast|auto|cold|ultrafast|status] [--global]"
status: "{feature}: {status}"
set_to: "✓ {feature} {value} olarak ayarlandı {scope}"
diff --git a/locales/uk.yaml b/locales/uk.yaml
index 69216497ae7..f39727b3112 100644
--- a/locales/uk.yaml
+++ b/locales/uk.yaml
@@ -184,8 +184,8 @@ gateway:
choice_normal: "normal — стандартна обробка"
choice_auto: "auto — швидко в перші секунди кожного ходу"
choice_cold: "cold — швидко лише на першому ході сесії"
- choice_ultrafast: "ultrafast — OpenAI Ultrafast (GPT-6 Astra, ціна ×6)"
- ultrafast_not_supported: "⚡ Ultrafast доступний лише для GPT-6 Astra (поточна модель: `{model}`)."
+ choice_ultrafast: "ultrafast — OpenAI Ultrafast, ціна ×6"
+ ultrafast_not_supported: "⚡ Ultrafast недоступний для `{model}` у цьому обліковому записі або маршруті."
footer:
status: "📎 Нижній колонтитул середовища: **{state}**\nПоля: `{fields}`\nПлатформа: `{platform}`"
usage: "Використання: `/footer [on|off|status]`"
@@ -2661,7 +2661,7 @@ cli:
feature_anthropic: "Anthropic Fast Mode"
feature_openai: "Priority Processing"
feature_ultrafast: "OpenAI Ultrafast"
- ultrafast_not_supported: "(._.) Ultrafast доступний лише для GPT-6 Astra (поточна модель: {model})."
+ ultrafast_not_supported: "(._.) Ultrafast недоступний для {model} у цьому обліковому записі або маршруті."
usage: "Використання: /fast [normal|fast|auto|cold|ultrafast|status] [--global]"
status: "{feature}: {status}"
set_to: "✓ {feature}: встановлено {value} {scope}"
diff --git a/locales/zh-hant.yaml b/locales/zh-hant.yaml
index 2ec6d7363da..b82a68713df 100644
--- a/locales/zh-hant.yaml
+++ b/locales/zh-hant.yaml
@@ -184,8 +184,8 @@ gateway:
choice_normal: "normal — 標準處理"
choice_auto: "auto — 每輪的前幾秒快速"
choice_cold: "cold — 僅會話的第一輪快速"
- choice_ultrafast: "ultrafast — OpenAI Ultrafast(GPT-6 Astra,6 倍價格)"
- ultrafast_not_supported: "⚡ Ultrafast 僅適用於 GPT-6 Astra(目前模型:`{model}`)。"
+ choice_ultrafast: "ultrafast — OpenAI Ultrafast,6 倍價格"
+ ultrafast_not_supported: "⚡ 此帳戶或路由無法為 `{model}` 使用 Ultrafast。"
footer:
status: "📎 執行階段頁尾:**{state}**\n欄位:`{fields}`\n平台:`{platform}`"
usage: "用法:`/footer [on|off|status]`"
@@ -2661,7 +2661,7 @@ cli:
feature_anthropic: "Anthropic Fast Mode"
feature_openai: "Priority Processing"
feature_ultrafast: "OpenAI Ultrafast"
- ultrafast_not_supported: "(._.) Ultrafast 僅適用於 GPT-6 Astra(目前模型:{model})。"
+ ultrafast_not_supported: "(._.) 此帳戶或路由無法為 {model} 使用 Ultrafast。"
usage: "用法:/fast [normal|fast|auto|cold|ultrafast|status] [--global]"
status: "{feature}:{status}"
set_to: "✓ {feature} 已設為 {value} {scope}"
diff --git a/locales/zh.yaml b/locales/zh.yaml
index ad4ccb7e39b..bfdf2942bf1 100644
--- a/locales/zh.yaml
+++ b/locales/zh.yaml
@@ -184,8 +184,8 @@ gateway:
choice_normal: "normal — 标准处理"
choice_auto: "auto — 每轮的前几秒快速"
choice_cold: "cold — 仅会话的第一轮快速"
- choice_ultrafast: "ultrafast — OpenAI Ultrafast(GPT-6 Astra,6 倍价格)"
- ultrafast_not_supported: "⚡ Ultrafast 仅适用于 GPT-6 Astra(当前模型:`{model}`)。"
+ choice_ultrafast: "ultrafast — OpenAI Ultrafast,6 倍价格"
+ ultrafast_not_supported: "⚡ 此账户或路由无法为 `{model}` 使用 Ultrafast。"
footer:
status: "📎 运行时页脚:**{state}**\n字段:`{fields}`\n平台:`{platform}`"
usage: "用法:`/footer [on|off|status]`"
@@ -2661,7 +2661,7 @@ cli:
feature_anthropic: "Anthropic Fast Mode"
feature_openai: "Priority Processing"
feature_ultrafast: "OpenAI Ultrafast"
- ultrafast_not_supported: "(._.) Ultrafast 仅适用于 GPT-6 Astra(当前模型:{model})。"
+ ultrafast_not_supported: "(._.) 此账户或路由无法为 {model} 使用 Ultrafast。"
usage: "用法:/fast [normal|fast|auto|cold|ultrafast|status] [--global]"
status: "{feature}:{status}"
set_to: "✓ {feature} 已设为 {value} {scope}"
diff --git a/tests/agent/test_codex_service_tiers.py b/tests/agent/test_codex_service_tiers.py
index 53a43152e9a..cf382918353 100644
--- a/tests/agent/test_codex_service_tiers.py
+++ b/tests/agent/test_codex_service_tiers.py
@@ -110,3 +110,31 @@ def test_catalog_ceiling_unknown_expiry_and_route_isolation(monkeypatch):
assert tiers._advertised_tiers({"service_tiers": [], "additional_speed_tiers": ["fast"]}) == frozenset({"priority"})
assert tiers._advertised_tiers({"service_tiers": [{"id": "priority"}],
"additional_speed_tiers": ["fast", "ultrafast"]}) == frozenset({"priority"})
+
+
+def test_ultrafast_is_offered_on_the_codex_plan_only_when_its_catalog_lists_it(monkeypatch):
+ """The Codex backend accepts ``service_tier: ultrafast`` from a plan without the entitlement and
+ silently serves the default tier, so /fast must follow the account's own catalog (per model)."""
+ from agent import codex_service_tiers
+ from agent.codex_service_tiers import ultrafast_offered
+
+ monkeypatch.setattr(mm, "_codex_oauth_context_cache", {})
+ monkeypatch.setattr(codex_service_tiers, "_catalogs", {})
+
+ def get(url, **kwargs):
+ tiers = {"A": {"gpt-6-astra": ["priority", "ultrafast"], "gpt-6.1-sol": ["priority"]},
+ "B": {"gpt-6-astra": ["priority", "ultrafast"], "gpt-6.1-sol": ["priority", "ultrafast"]}}
+ account = kwargs["headers"]["ChatGPT-Account-ID"]
+ return SimpleNamespace(status_code=200, json=lambda: {"models": [
+ {"slug": slug, "context_window": 272000, "service_tiers": [{"id": t} for t in ids]}
+ for slug, ids in tiers[account].items()]})
+
+ monkeypatch.setattr(mm.model_metadata_http, "get", get)
+ codex = {"provider": "openai-codex", "base_url": BASE}
+ assert ultrafast_offered("gpt-6-astra", **codex, access_token=token("A"))
+ assert not ultrafast_offered("gpt-6.1-sol-900k", **codex, access_token=token("A")) # plan lacks Sol Ultrafast
+ assert ultrafast_offered("gpt-6.1-sol-900k", **codex, access_token=token("B"))
+ # The API key route is not plan-gated; an unreadable catalog never refuses.
+ assert ultrafast_offered("gpt-6.1-sol", provider="openai-api", base_url="https://api.openai.com/v1")
+ monkeypatch.setattr(mm.model_metadata_http, "get", lambda url, **kw: SimpleNamespace(status_code=503, json=dict))
+ assert ultrafast_offered("gpt-6.1-sol", **codex, access_token=token("C"))
diff --git a/tests/agent/test_openai_ultrafast.py b/tests/agent/test_openai_ultrafast.py
index eae30261240..9dfe5a87f8f 100644
--- a/tests/agent/test_openai_ultrafast.py
+++ b/tests/agent/test_openai_ultrafast.py
@@ -103,7 +103,7 @@ def test_cli_refuses_ultrafast_on_a_model_without_it(monkeypatch):
cli_mod.HermesCLI._handle_fast_command(stub, "/fast ultrafast")
assert stub.service_tier == "priority"
stub.model = stub.agent.model = "gpt-6-astra"
- cli_mod.HermesCLI._handle_fast_command(stub, "/fast ultrafast")
+ cli_mod.HermesCLI._handle_fast_command(stub, "/fast ultra") # typed shorthand
assert stub.service_tier == "ultrafast"
diff --git a/tui_gateway/methods_config_set.py b/tui_gateway/methods_config_set.py
index 5ea87a2cfb3..d691c1d2a81 100644
--- a/tui_gateway/methods_config_set.py
+++ b/tui_gateway/methods_config_set.py
@@ -168,7 +168,7 @@ def _set_model(rid, params, key, value, session):
_FAST_WORDS = {"fast": "fast", "on": "fast", "normal": "normal", "off": "normal",
- "auto": "auto", "cold": "cold", "ultrafast": "ultrafast"}
+ "auto": "auto", "cold": "cold", "ultrafast": "ultrafast", "ultra": "ultrafast"}
def _set_fast(rid, params, key, value, session):
@@ -199,6 +199,12 @@ def _set_fast(rid, params, key, value, session):
overrides = resolve_fast_mode_overrides(target_model, provider=getattr(agent, "provider", None),
base_url=getattr(agent, "base_url", None),
tier="ultrafast" if nv == "ultrafast" else None)
+ if overrides is not None and nv == "ultrafast":
+ from agent.codex_service_tiers import ultrafast_offered
+ if not ultrafast_offered(target_model, provider=getattr(agent, "provider", None),
+ base_url=getattr(agent, "base_url", None),
+ access_token=getattr(agent, "api_key", None)):
+ overrides = None
if overrides is None:
return _err(rid, 4002, f"{nv} mode is not available for this model")
if session is not None:
diff --git a/tui_gateway/methods_slash.py b/tui_gateway/methods_slash.py
index fae8a898922..e02a0c7260d 100644
--- a/tui_gateway/methods_slash.py
+++ b/tui_gateway/methods_slash.py
@@ -415,7 +415,7 @@ def _mirror_personality(sid, session, agent, arg) -> None:
_FAST_TIERS = {"fast": "priority", "on": "priority", "normal": None, "off": None, "auto": "auto", "cold": "cold",
- "ultrafast": "ultrafast"}
+ "ultrafast": "ultrafast", "ultra": "ultrafast"}
def _mirror_fast(sid, session, agent, arg) -> None:
diff --git a/website/docs/user-guide/configuration.md b/website/docs/user-guide/configuration.md
index 1f16eacb2b5..528b113e1d1 100644
--- a/website/docs/user-guide/configuration.md
+++ b/website/docs/user-guide/configuration.md
@@ -1971,7 +1971,7 @@ agent:
| `auto` | Requests in the first `fast_auto_seconds` of **every** turn | Snappy first reply; long tool loops fall back to standard pricing |
| `cold` | Same window, but only on the **first turn** of a session (no prior history) | Fast onboarding reply, standard pricing afterwards |
-`/fast normal|fast|ultrafast|auto|cold` switches the mode for the session. Add `--global` to persist to `config.yaml`. `/fast` alone shows the current mode.
+`/fast normal|fast|ultrafast|auto|cold` switches the mode for the session (`/fast ultra` is shorthand for `ultrafast`). On a ChatGPT/Codex subscription, Ultrafast is offered only when your account's Codex model catalog lists it for the current model; the backend otherwise accepts the request and serves standard speed. Add `--global` to persist to `config.yaml`. `/fast` alone shows the current mode.
**Cost note:** both providers bill fast requests at a multiplier on standard rates (Anthropic: $8 / $40 per MTok in/out on Opus 5.5, $10 / $50 on Opus 5 and Opus 4.8), stacking with prompt-cache pricing. Hermes prices each Anthropic response from the speed the API reports in `usage.speed`. `auto`/`cold` bound that premium to the window only. Fast params are only sent to the first-party endpoint that supports them (`api.openai.com` / Codex subscription, `api.anthropic.com`, `api.x.ai`); OpenRouter, Nous Portal, Copilot, Azure, Bedrock, and custom `base_url` routes never receive them in any mode.
diff --git a/website/docs/user-guide/configuring-models.md b/website/docs/user-guide/configuring-models.md
index b6b21aaec19..9af82859b63 100644
--- a/website/docs/user-guide/configuring-models.md
+++ b/website/docs/user-guide/configuring-models.md
@@ -49,7 +49,7 @@ Pick a model, hit **Switch**, and Hermes writes it to `~/.hermes/config.yaml` un
### Subscription speed and extended context
-Speed is separate from reasoning effort. On supported subscription models, **Fast** requests Priority; **Ultrafast** requests the Ultrafast tier. Selecting one clears the other. The chosen tier is remembered per model and carried into a new chat. The profile default lives under **Settings → Model → Main model → Speed** (`agent.service_tier`: `normal`, `fast` or `ultrafast`); Ultrafast is listed only for models that offer it. A legacy setting can be cleared with **Use standard speed**. An accepted request does not guarantee that OpenAI served the requested tier.
+Speed is separate from reasoning effort. On supported subscription models, **Fast** requests Priority; **Ultrafast** requests the Ultrafast tier. Selecting one clears the other. The chosen tier is remembered per model and carried into a new chat. The profile default lives under **Settings → Model → Main model → Speed** (`agent.service_tier`: `normal`, `fast` or `ultrafast`); Ultrafast is listed only for models that offer it, and on a subscription only when your account's Codex catalog lists it for that model. A legacy setting can be cleared with **Use standard speed**. An accepted request does not guarantee that OpenAI served the requested tier.
Hermes creates the **GPT-6.1 Sol-900k** choice from an eligible discovered GPT-6.1 Sol model. The `-900k` suffix is a local context choice, removed from the model ID sent to OpenAI. Hermes limits its budget to the account catalog's maximum, and Codex may report a smaller usable context after its own reserve. Use **Refresh models** if a new model is absent. A failed discovery uses short-lived compatibility hints instead of caching them as a successful account catalog.