From 8714b73cd9700ebfdde0c568c7c86d18127340ba Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 28 May 2026 20:25:42 +0000 Subject: [PATCH] Add Claude Opus 4.8 to model registry Register claude-opus-4-8 with Opus-tier pricing ($5/$25 per MTok input/ output) and supports_temperature=False (Opus 4.7+ reject the temperature field). Adds a resolution test mirroring the other Opus models. --- tee_gateway/model_registry.py | 8 ++++++++ tests/test_pricing.py | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/tee_gateway/model_registry.py b/tee_gateway/model_registry.py index b5280b0..3935514 100644 --- a/tee_gateway/model_registry.py +++ b/tee_gateway/model_registry.py @@ -140,6 +140,13 @@ class SupportedModel(Enum): output_price_usd=Decimal("0.000025"), supports_temperature=False, ) + CLAUDE_OPUS_4_8 = ModelConfig( + provider="anthropic", + api_name="claude-opus-4-8", + input_price_usd=Decimal("0.000005"), + output_price_usd=Decimal("0.000025"), + supports_temperature=False, + ) # ── Google Gemini ─────────────────────────────────────────────────── # Note: gemini-2.5-flash, gemini-2.5-pro, and gemini-2.5-flash-lite are scheduled @@ -293,6 +300,7 @@ class SupportedModel(Enum): "claude-opus-4-5": SupportedModel.CLAUDE_OPUS_4_5, "claude-opus-4-6": SupportedModel.CLAUDE_OPUS_4_6, "claude-opus-4-7": SupportedModel.CLAUDE_OPUS_4_7, + "claude-opus-4-8": SupportedModel.CLAUDE_OPUS_4_8, # Google "gemini-2.5-flash": SupportedModel.GEMINI_2_5_FLASH, "gemini-2.5-pro": SupportedModel.GEMINI_2_5_PRO, diff --git a/tests/test_pricing.py b/tests/test_pricing.py index 99fa4b2..fcf5878 100644 --- a/tests/test_pricing.py +++ b/tests/test_pricing.py @@ -104,6 +104,14 @@ def test_claude_opus_4_6_resolves(self): cfg = get_model_config("claude-opus-4-6") self.assertEqual(cfg.provider, "anthropic") + def test_claude_opus_4_8_resolves(self): + cfg = get_model_config("claude-opus-4-8") + self.assertEqual(cfg.provider, "anthropic") + self.assertEqual(cfg.input_price_usd, Decimal("0.000005")) + self.assertEqual(cfg.output_price_usd, Decimal("0.000025")) + # Opus 4.7+ rejects the `temperature` field (HTTP 400) + self.assertFalse(cfg.supports_temperature) + # ── OpenAI ────────────────────────────────────────────────────────────── def test_gpt_4_1_resolves(self):