feat(openai): cover gpt-5.6 -pro variants (PR #61587 complement)
PR #61587 adds sol-pro/terra-pro/luna-pro to the aggregator lists. Complete those on the native surfaces the same way this PR completes the base tiers: - hermes_cli/models.py: -pro variants in _PROVIDER_MODELS[openai-api]. - agent/usage_pricing.py: alias ("openai", "gpt-5.6-*-pro") onto the base-tier PricingEntry rows — the -pro high-effort modes bill at the SAME per-token rates (verified against OpenRouter live pricing 2026-07-09: identical prompt/completion prices for base and -pro); they cost more per task by consuming more tokens, not a higher rate. - Context lengths need no new entries: "gpt-5.6-sol" et al. are substrings of their -pro variants and both lookup tables match longest-key-first (verified: sol-pro -> 1.05M direct / 272K codex). - model_switch sort: -pro variants parse as suffix "sol-pro" (rank 1), so /model gpt still defaults to base sol — pinned by test. - Not added to DEFAULT_CODEX_MODELS: only confirmed routable via API/ OpenRouter so far; codex live discovery will surface them if ChatGPT exposes them, same policy as other unconfirmed codex slugs. Tests: invariant tests extended (pro aliases share base entries, base sol outranks sol-pro); 191 targeted tests pass.
This commit is contained in:
+14
-1
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user