The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(models): drop gpt-6-terra, a tier OpenAI never published
teknium138c289c0146e
diff --git a/agent/auxiliary_client.py b/agent/auxiliary_client.pyindex 80f27197fc3..4668b3989bf 100644--- a/agent/auxiliary_client.py+++ b/agent/auxiliary_client.py@@ -620,7 +620,7 @@ def _is_codex_gpt54_or_gpt55(model: Optional[str], provider: Optional[str] = Nonreturn "900k" not in barereturn bare == "gpt-daybreak-blue-latest" or any(bare == fam or bare.startswith(fam + "-") or bare.startswith(fam + ".")- for fam in ("gpt-5.4", "gpt-5.5", "gpt-5.6", "gpt-6-sol", "gpt-6-terra", "gpt-6-luna"))+ for fam in ("gpt-5.4", "gpt-5.5", "gpt-5.6", "gpt-6-sol", "gpt-6-luna"))def _codex_route_bare_model(model: Optional[str], provider: Optional[str]) -> Optional[str]:diff --git a/agent/model_metadata.py b/agent/model_metadata.pyindex 83b1cc71014..9b468e5f25b 100644--- a/agent/model_metadata.py+++ b/agent/model_metadata.py@@ -343,7 +343,7 @@ DEFAULT_CONTEXT_LENGTHS = {# its own branch). 5.4-nano/-mini are 400k, not 1.05M; gpt-5.3-codex-spark is# Codex-OAuth-only and listed so "gpt-5" (400k) doesn't win."gpt-6-astra": 1050000, # also matches -pro (verified live on OpenRouter)- "gpt-6-sol": 1050000, "gpt-6-terra": 1050000, "gpt-6-luna": 1050000, # -pro too (OpenRouter live 2026-09-22)+ "gpt-6-sol": 1050000, "gpt-6-luna": 1050000, # -pro too (OpenRouter live 2026-09-22)"gpt-5.6-luna": 1050000, "gpt-5.6-terra": 1050000, "gpt-5.6-sol": 1050000, "gpt-5.5": 1050000,"gpt-5.4-nano": 400000, "gpt-5.4-mini": 400000, "gpt-5.4": 1050000,"gpt-5.3-codex-spark": 128000, "gpt-5.1-chat": 128000, "gpt-5": 400000,@@ -1722,7 +1722,7 @@ def _query_anthropic_context_length(model: str, base_url: str, api_key: Any) -># Codex OAuth `context_window` values (what Codex enforces — lower than the direct API for the same# slugs). Fallback when the live probe fails; longest-key-first. gpt-5.3-codex-spark is listed so "gpt-5.3-codex" doesn't win._CODEX_OAUTH_CONTEXT_FALLBACK: Dict[str, int] = {- "gpt-6-astra": 272_000, "gpt-6-sol": 272_000, "gpt-6-terra": 272_000, "gpt-6-luna": 272_000,+ "gpt-6-astra": 272_000, "gpt-6-sol": 272_000, "gpt-6-luna": 272_000,"gpt-5.1-codex-max": 272_000, "gpt-5.1-codex-mini": 272_000, "gpt-5.3-codex": 272_000,"gpt-5.3-codex-spark": 128_000, "gpt-5.2-codex": 272_000, "gpt-5.4-mini": 272_000,"gpt-5.6-sol": 272_000, "gpt-5.6-terra": 272_000, "gpt-5.6-luna": 272_000, "gpt-daybreak-blue-latest": 272_000,@@ -1737,7 +1737,7 @@ _CODEX_OAUTH_CONTEXT_FALLBACK: Dict[str, int] = {# carry the 5.6 verdict forward: they replace Sol/Terra/Luna on the same Codex route, and the live# catalog's ``max_context_window`` still caps the bump (#105443) if it publishes a lower ceiling._CODEX_OAUTH_VERIFIED_ABOVE_ADVERTISED_PREFIXES: Dict[str, int] = {- "gpt-5.6": 900_000, "gpt-6-sol": 900_000, "gpt-6-terra": 900_000, "gpt-6-luna": 900_000,+ "gpt-5.6": 900_000, "gpt-6-sol": 900_000, "gpt-6-luna": 900_000,}_CODEX_OAUTH_VERIFIED_ABOVE_ADVERTISED_EXACT: Dict[str, int] = {"gpt-5.4": 900_000, "gpt-daybreak-blue-latest": 900_000,@@ -1747,7 +1747,7 @@ _CODEX_OAUTH_STALE_ADVERTISED_CTX = 272_000 # the only advertised value the bumCODEX_CONTEXT_VARIANT_SUFFIX = "-900k" # picker-only opt-in suffix; never sent on the wire# The ONLY bases eligible for ``-900k``: routable, live-verified. No family prefixing (it would synthesize# dead ``-pro`` variants); dated snapshots of the 5.6 / gpt-6 tier bases are allowed. gpt-daybreak-blue-latest is a verified Sol alias.-_CODEX_900K_SNAPSHOT_BASES = ("gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-6-sol", "gpt-6-terra", "gpt-6-luna")+_CODEX_900K_SNAPSHOT_BASES = ("gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-6-sol", "gpt-6-luna")_CODEX_900K_ELIGIBLE_BASES = frozenset({*_CODEX_900K_SNAPSHOT_BASES, "gpt-5.4", "gpt-daybreak-blue-latest", "gpt-6-astra"})_CODEX_900K_SNAPSHOT_RE = re.compile(r"^\d{4}-\d{2}-\d{2}$")diff --git a/agent/reasoning_effort.py b/agent/reasoning_effort.pyindex 5f2a23b62df..88d4d3cf4b2 100644--- a/agent/reasoning_effort.py+++ b/agent/reasoning_effort.py@@ -36,7 +36,7 @@ CODEX_LEGACY_EFFORTS: tuple[str, ...] = ("none", "low", "medium", "high", "xhighCODEX_ASTRA_EFFORTS: tuple[str, ...] = ("low", "medium", "high", "xhigh", "max")ASTRA_MODEL_IDS: frozenset[str] = frozenset({"gpt-6-astra", "gpt-6-astra-900k"})#: GPT-6 Sol/Terra/Luna (the 5.6 successors; ``-pro``/``-900k``/dated snapshots share the prefix).-GPT6_TIER_PREFIXES: tuple[str, ...] = ("gpt-6-sol", "gpt-6-terra", "gpt-6-luna")+GPT6_TIER_PREFIXES: tuple[str, ...] = ("gpt-6-sol", "gpt-6-luna")DAYBREAK_MODEL_IDS: frozenset[str] = frozenset({"gpt-daybreak-blue-latest", "gpt-daybreak-blue-latest-900k"})diff --git a/hermes_cli/codex_models.py b/hermes_cli/codex_models.pyindex 34f36334aeb..cc0230223bb 100644--- a/hermes_cli/codex_models.py+++ b/hermes_cli/codex_models.py@@ -18,7 +18,6 @@ logger = logging.getLogger(__name__)# up automatically.DEFAULT_CODEX_MODELS: List[str] = ["gpt-6-sol",- "gpt-6-terra","gpt-6-luna","gpt-5.6-sol","gpt-5.6-terra",@@ -42,7 +41,6 @@ DEFAULT_CODEX_MODELS: List[str] = [# in `/model` when live discovery is unavailable (offline first run, transient API failure)._FORWARD_COMPAT_TEMPLATE_MODELS: List[tuple[str, tuple[str, ...]]] = [("gpt-6-sol", ("gpt-5.6-sol", "gpt-5.5")),- ("gpt-6-terra", ("gpt-5.6-terra", "gpt-5.5")),("gpt-6-luna", ("gpt-5.6-luna", "gpt-5.5")),("gpt-5.6-sol", ("gpt-5.5", "gpt-5.4")),("gpt-5.6-terra", ("gpt-5.5", "gpt-5.4")),diff --git a/hermes_cli/models_catalog_static.py b/hermes_cli/models_catalog_static.pyindex 81cf04fe352..3cfcda14ebd 100644--- a/hermes_cli/models_catalog_static.py+++ b/hermes_cli/models_catalog_static.py@@ -34,7 +34,7 @@ OPENROUTER_MODELS: list[tuple[str, str]] = ["anthropic/claude-sonnet-5", "anthropic/claude-haiku-4.5", "openai/gpt-6-astra", "openai/gpt-6-astra-fast","openai/gpt-6-astra-flex", "openai/gpt-6-astra-pro", "openai/gpt-6-astra-pro-fast", "openai/gpt-6-astra-pro-flex","openai/gpt-6-sol", "openai/gpt-6-sol-pro",- "openai/gpt-6-terra", "openai/gpt-6-terra-pro", "openai/gpt-6-luna", "openai/gpt-6-luna-pro",+ "openai/gpt-6-luna", "openai/gpt-6-luna-pro","openai/gpt-5.5", "openai/gpt-5.5-pro", "openai/gpt-5.4-mini", "google/gemini-3.1-pro-preview","google/gemini-3.8-flash", "google/gemini-3.7-flash", "x-ai/grok-4.7", "x-ai/grok-4.6","deepseek/deepseek-v4-pro",@@ -165,7 +165,7 @@ _PROVIDER_MODELS: dict[str, list[str]] = {# Used by /model counts and provider_model_ids fallback when /v1/models is unavailable."openai": list(_OPENAI_CHAT_MODELS),"openai-api": [- "gpt-6-sol", "gpt-6-sol-pro", "gpt-6-terra", "gpt-6-terra-pro", "gpt-6-luna", "gpt-6-luna-pro",+ "gpt-6-sol", "gpt-6-sol-pro", "gpt-6-luna", "gpt-6-luna-pro","gpt-5.6-sol", "gpt-5.6-sol-pro", "gpt-5.6-terra", "gpt-5.6-terra-pro", "gpt-5.6-luna","gpt-5.6-luna-pro", "gpt-5.5", "gpt-5.5-pro", "gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano","gpt-5-mini", "gpt-5.3-codex", "gpt-4.1", "gpt-4o", "gpt-4o-mini",diff --git a/tests/hermes_cli/test_gpt6_tiers_registration.py b/tests/hermes_cli/test_gpt6_tiers_registration.pyindex a41d66cb1cb..bb06907f116 100644--- a/tests/hermes_cli/test_gpt6_tiers_registration.py+++ b/tests/hermes_cli/test_gpt6_tiers_registration.py@@ -24,11 +24,11 @@ from hermes_cli.codex_models import _finalize_codex_modelsfrom hermes_cli.model_switch import _model_sort_keyfrom hermes_cli.models import OPENROUTER_MODELS, _PROVIDER_MODELS-GPT6_TIERS = ("gpt-6-sol", "gpt-6-terra", "gpt-6-luna")+GPT6_TIERS = ("gpt-6-sol", "gpt-6-luna") # terra: never published by OpenAI, not on OpenRouter/Codex (2026-09-22)def test_model_gpt_resolves_flagship_across_gpt6_tiers():- models = ["gpt-6-luna", "gpt-5.6-sol", "gpt-6-terra", "gpt-6-sol", "gpt-6-astra"]+ models = ["gpt-6-luna", "gpt-5.6-sol", "gpt-6-sol", "gpt-6-astra"]models.sort(key=lambda m: _model_sort_key(m, "gpt"))assert models[:2] == ["gpt-6-astra", "gpt-6-sol"]assert models.index("gpt-6-luna") < models.index("gpt-5.6-sol")@@ -58,3 +58,11 @@ def test_gpt6_tiers_replace_56_in_aggregator_catalogs_with_pricing_aliases():assert entry.cache_write_cost_per_million == entry.input_cost_per_million * Decimal("1.25"), basefor suffix in ("pro", "900k"):assert _OFFICIAL_DOCS_PRICING[("openai", f"{base}-{suffix}")] is entry, (base, suffix)+++def test_codex_forward_compat_only_synthesizes_published_gpt6_tiers():+ """Forward-compat synthesis puts names in the picker before the account catalog lists them, so it+ must stay within tiers OpenAI has actually published (sol, luna; astra is discovery-only). A guessed+ name such as gpt-6-terra shipped as a live picker choice once."""+ synthesized = {m for m in _finalize_codex_models(["gpt-5.5"]) if m.startswith("gpt-6-")}+ assert synthesized == {f"{base}{suffix}" for base in GPT6_TIERS for suffix in ("", "-900k")}diff --git a/website/static/api/model-catalog.json b/website/static/api/model-catalog.jsonindex 83abe6a189d..5fa3cff8453 100644--- a/website/static/api/model-catalog.json+++ b/website/static/api/model-catalog.json@@ -1,6 +1,6 @@{"version": 1,- "updated_at": "2026-09-22T18:26:41Z",+ "updated_at": "2026-09-23T07:20:37Z","metadata": {"source": "hermes-agent repo","docs": "https://hermes-agent.nousresearch.com/docs/reference/model-catalog"@@ -80,14 +80,6 @@"id": "openai/gpt-6-sol-pro","description": ""},- {- "id": "openai/gpt-6-terra",- "description": ""- },- {- "id": "openai/gpt-6-terra-pro",- "description": ""- },{"id": "openai/gpt-6-luna","description": ""@@ -326,12 +318,6 @@{"id": "openai/gpt-6-sol-pro"},- {- "id": "openai/gpt-6-terra"- },- {- "id": "openai/gpt-6-terra-pro"- },{"id": "openai/gpt-6-luna"},