diff --git a/agent/usage_pricing.py b/agent/usage_pricing.py index 99d593ce6b2d..aa306fa12f8c 100644 --- a/agent/usage_pricing.py +++ b/agent/usage_pricing.py @@ -109,7 +109,11 @@ _OFFICIAL_DOCS_PRICING: Dict[tuple[str, str], PricingEntry] = { # writes are billed at 1.25x the uncached input rate; cache reads get the # standard 90% discount (0.10x input, confirmed: Sol $0.50/M cached). # Note: "Sol Fast mode" ($12.5/$75, up to 750 tok/s via Cerebras) is a - # separate serving tier, not covered by these entries. + # separate serving tier, not covered by these entries. The "-pro" + # variants (high-effort modes, GA alongside base tiers) bill at the + # SAME per-token rates and are aliased onto these entries below the + # dict (they cost more per task by consuming more tokens, not by a + # higher rate — verified against OpenRouter's live pricing 2026-07-09). # Source: https://openai.com/index/previewing-gpt-5-6-sol/ ( "openai", @@ -607,6 +611,15 @@ _OFFICIAL_DOCS_PRICING: Dict[tuple[str, str], PricingEntry] = { ), } +# GPT-5.6 "-pro" high-effort variants bill at the same per-token rates as +# their base tiers (more tokens per task, not a higher rate). Alias them +# onto the base entries so the snapshot stays single-source. +for _base_56 in ("gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna"): + _OFFICIAL_DOCS_PRICING[("openai", f"{_base_56}-pro")] = _OFFICIAL_DOCS_PRICING[ + ("openai", _base_56) + ] +del _base_56 + def _to_decimal(value: Any) -> Optional[Decimal]: if value is None: diff --git a/hermes_cli/models.py b/hermes_cli/models.py index af2aba931dcd..2f3ae5c06269 100644 --- a/hermes_cli/models.py +++ b/hermes_cli/models.py @@ -240,8 +240,11 @@ _PROVIDER_MODELS: dict[str, list[str]] = { ], "openai-api": [ "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", diff --git a/tests/hermes_cli/test_gpt56_registration.py b/tests/hermes_cli/test_gpt56_registration.py index f88a07cb6c53..9d63992ecaab 100644 --- a/tests/hermes_cli/test_gpt56_registration.py +++ b/tests/hermes_cli/test_gpt56_registration.py @@ -38,6 +38,14 @@ class TestGpt56SortInvariants: assert models[0] == "openai/gpt-5.6-sol" + def test_base_sol_outranks_sol_pro_for_alias_default(self): + # "-pro" high-effort variants parse as suffix "sol-pro" (rank 1), so + # `/model gpt` defaults to base Sol rather than the high-effort mode. + models = ["gpt-5.6-sol-pro", "gpt-5.6-sol"] + models.sort(key=lambda m: _model_sort_key(m, "gpt")) + assert models[0] == "gpt-5.6-sol" + + class TestGpt56PricingRoute: def test_official_pricing_reachable_from_openai(self): route = resolve_billing_route("gpt-5.6-sol", provider="openai") @@ -64,3 +72,12 @@ class TestGpt56PricingRoute: assert entry.cache_read_cost_per_million == ( entry.input_cost_per_million * Decimal("0.10") ), slug + + def test_pro_variants_alias_to_base_tier_pricing(self): + # -pro high-effort modes bill at the same per-token rates as their + # base tiers; the snapshot aliases them rather than duplicating rows. + for base in ("gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna"): + assert ( + _OFFICIAL_DOCS_PRICING[("openai", f"{base}-pro")] + is _OFFICIAL_DOCS_PRICING[("openai", base)] + ), base