The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
feat(models): add the gpt-6.1-sol-900k Codex OAuth picker variant
GodsBoy5bb6127c5b16
diff --git a/agent/model_metadata.py b/agent/model_metadata.pyindex ac21f532c15..13a581611a9 100644--- a/agent/model_metadata.py+++ b/agent/model_metadata.py@@ -1708,13 +1708,16 @@ _CODEX_OAUTH_VERIFIED_ABOVE_ADVERTISED_PREFIXES: Dict[str, int] = {_CODEX_OAUTH_VERIFIED_ABOVE_ADVERTISED_EXACT: Dict[str, int] = {"gpt-5.4": 900_000, "gpt-daybreak-blue-latest": 900_000,"gpt-6-astra": 900_000, # advertised 272K; 920,043 input OK, 1,000,043 rejected (live 2026-09-04)+ # advertised 272K; 918,137 input OK, ~931K rejected (live 2026-09-29), in line with the model page's+ # 922,000 max input. EXACT, not a prefix: the dotted slug is its own line and ``-pro`` is not routable.+ "gpt-6.1-sol": 900_000,}_CODEX_OAUTH_STALE_ADVERTISED_CTX = 272_000 # the only advertised value the bump may overrideCODEX_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-luna")-_CODEX_900K_ELIGIBLE_BASES = frozenset({*_CODEX_900K_SNAPSHOT_BASES, "gpt-5.4", "gpt-daybreak-blue-latest", "gpt-6-astra"})+_CODEX_900K_ELIGIBLE_BASES = frozenset({*_CODEX_900K_SNAPSHOT_BASES, "gpt-5.4", "gpt-daybreak-blue-latest", "gpt-6-astra", "gpt-6.1-sol"})_CODEX_900K_SNAPSHOT_RE = re.compile(r"^\d{4}-\d{2}-\d{2}$")diff --git a/agent/usage_pricing.py b/agent/usage_pricing.pyindex 0aea86bcfa2..97cd4108059 100644--- a/agent/usage_pricing.py+++ b/agent/usage_pricing.py@@ -341,7 +341,8 @@ for _provider, _alias, _canonical in (*((("openai", f"{m}-{suffix}", m)for m in ("gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-6-sol", "gpt-6-luna")for suffix in ("pro", "900k"))),- ("openai", "gpt-6.1-sol-pro", "gpt-6.1-sol"), # no -900k: not verified above 272K on Codex+ ("openai", "gpt-6.1-sol-pro", "gpt-6.1-sol"),+ ("openai", "gpt-6.1-sol-900k", "gpt-6.1-sol"), # Hermes-side Codex picker variant, same model("google", "gemini-3.1-pro-preview", "gemini-3.1-pro"),("google", "gemini-3.1-flash-lite-preview", "gemini-3.1-flash-lite"),):diff --git a/tests/hermes_cli/test_gpt6_tiers_registration.py b/tests/hermes_cli/test_gpt6_tiers_registration.pyindex 53951739776..149b8cedd21 100644--- a/tests/hermes_cli/test_gpt6_tiers_registration.py+++ b/tests/hermes_cli/test_gpt6_tiers_registration.py@@ -77,4 +77,22 @@ def test_gpt61_sol_resolves_context_and_pricing_like_its_tier():base = _OFFICIAL_DOCS_PRICING[("openai", "gpt-6.1-sol")]assert _OFFICIAL_DOCS_PRICING[("openai", "gpt-6.1-sol-pro")] is baseassert base.cache_read_cost_per_million == base.input_cost_per_million / 20 # 5%, not 6 Sol's 10%- assert not is_codex_900k_base("gpt-6.1-sol") # not verified above 272K on Codex+ assert is_codex_900k_base("gpt-6.1-sol") # verified above 272K on Codex (live 2026-09-29, see 900k test)+++def test_gpt61_sol_900k_is_opt_in_exact_and_billed_as_the_base():+ from agent.model_metadata import is_codex_context_variant+ from agent.usage_pricing import _OFFICIAL_DOCS_PRICING++ ids = _finalize_codex_models(["gpt-6.1-sol"]) # what live discovery hands the picker+ assert ids.index("gpt-6.1-sol-900k") == ids.index("gpt-6.1-sol") + 1+ assert "gpt-6.1-sol-pro-900k" not in ids # -pro is not routable on Codex+ assert is_codex_context_variant("openai/gpt-6.1-sol-900k")+ assert strip_codex_context_variant_suffix("gpt-6.1-sol-900k") == "gpt-6.1-sol"+ # The base keeps the advertised 272K; only the explicit variant opts into the bump.+ assert _verified_codex_ctx_for_slug("gpt-6.1-sol") is None+ assert _verified_codex_ctx_for_slug("gpt-6.1-sol-900k") == _verified_codex_ctx_for_slug("gpt-6-astra-900k")+ assert _verified_codex_ctx_for_slug("gpt-6.1-sol-900k") < 922_000 # the model page's max input+ assert _OFFICIAL_DOCS_PRICING[("openai", "gpt-6.1-sol-900k")] is _OFFICIAL_DOCS_PRICING[("openai", "gpt-6.1-sol")]+ assert _compression_threshold_for_model("gpt-6.1-sol-900k", provider="openai-codex") is None+ assert not is_codex_context_variant("gpt-6.1-luna-900k")diff --git a/website/docs/developer-guide/context-compression-and-caching.md b/website/docs/developer-guide/context-compression-and-caching.mdindex b7e84c076ef..9ed03f22102 100644--- a/website/docs/developer-guide/context-compression-and-caching.md+++ b/website/docs/developer-guide/context-compression-and-caching.md@@ -386,7 +386,7 @@ more tokens per request and much faster subscription-usage burn, so the largewindow is strictly opt-in.To use the large window, pick the explicit `-900k` variant in `/model` (e.g.-`gpt-6-sol-900k`, `gpt-6-terra-900k`, `gpt-6-luna-900k`, `gpt-5.6-sol-900k`,+`gpt-6.1-sol-900k`, `gpt-6-sol-900k`, `gpt-6-terra-900k`, `gpt-6-luna-900k`, `gpt-5.6-sol-900k`,`gpt-5.6-terra-900k`, `gpt-5.6-luna-900k`, `gpt-5.4-900k`). These are Hermes-side aliases: the suffix is stripped beforethe model id is sent to the backend, and pricing/usage accounting treats themas the base model. Slugs that genuinely enforce 272K (gpt-5.5, gpt-5.4-mini)