From f2ef01857da46809b9b8054eeaf1a28187697c7d Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 11 Nov 2026 07:10:58 +0000 Subject: [PATCH 1/2] Add Gemini 4 Carbon to the model registry Google's strongest model, opened to paid Gemini API developers on 2026-11-10. Priced at the standard $4/$20 per MTok like Gemini 4 Argon, not the $2/$10 introductory rate that ends 2026-11-30. Registered with supports_temperature=False: Google's migration page says to remove temperature/top_p/top_k from requests. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01SQvDLzbNRmhcXcLvrNciZB --- CLAUDE.md | 2 +- README.md | 2 +- tee_gateway/model_registry.py | 16 ++++++++++++++++ tests/test_pricing.py | 14 ++++++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 97e947b..9c02cf6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -132,7 +132,7 @@ Server configuration: prefixes determine routing: - **OpenAI**: gpt-6-sol, gpt-6-luna, gpt-6-astra, gpt-4.1, gpt-4.1-mini, gpt-5, gpt-5-mini, gpt-5.2, gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, gpt-5.5, gpt-5.6-sol/terra/luna, o3; image generation: gpt-image-2.5-flare, gpt-image-2.5-sunburst, gpt-image-2 - **Anthropic**: claude-sonnet-4-5/4-6, claude-sonnet-5, claude-sonnet-5-5, claude-haiku-5-5, claude-haiku-4-5, claude-opus-4-5/4-6/4-7/4-8, claude-opus-5, claude-opus-5-5, claude-fable-5, claude-fable-5-1, claude-fable-5-2 -- **Google**: gemini-4-argon, gemini-3.8-flash, gemini-3.7-flash, gemini-3.6-flash, gemini-3.5-flash, gemini-3.5-flash-lite, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.5-pro, gemini-3-flash-preview, gemini-3.1-pro-preview; image generation: gemini-2.5-flash-image, gemini-3.1-flash-image, gemini-nano-banana-2.1 +- **Google**: gemini-4-carbon, gemini-4-argon, gemini-3.8-flash, gemini-3.7-flash, gemini-3.6-flash, gemini-3.5-flash, gemini-3.5-flash-lite, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.5-pro, gemini-3-flash-preview, gemini-3.1-pro-preview; image generation: gemini-2.5-flash-image, gemini-3.1-flash-image, gemini-nano-banana-2.1 - **xAI**: grok-4.7, grok-4.6, grok-4.5, grok-4.3, grok-4.20-reasoning, grok-4.20-non-reasoning; image generation: grok-2-image, grok-imagine-image-2.0 - **ByteDance** (BytePlus ModelArk, OpenAI-compatible, ap-southeast): seed-1.6, seed-1.8, seed-2.0-lite, deepseek-v4-flash, glm-5.2 (Z.ai's model served via a ModelArk deployment endpoint); image generation: seedream-4.0, seedream-5.0-lite, seedance-4.5, seedance-5.0 - **OpenRouter** (OpenAI-compatible): aion-3.5, deepseek-v4-pro (pinned to Together), hy4-preview, hermes-4-405b, hy3 diff --git a/README.md b/README.md index 8415da8..6e3c326 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ The gateway solves this by running inside a hardware-isolated Nitro Enclave wher |----------|--------| | OpenAI | gpt-6-sol, gpt-6-luna, gpt-6-astra, gpt-4.1, gpt-4.1-mini, gpt-5, gpt-5-mini, gpt-5.2, gpt-5.4, gpt-5.5, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, o3 | | Anthropic | claude-haiku-5-5, claude-sonnet-5-5, claude-fable-5-2, claude-fable-5-1, claude-fable-5, claude-opus-5-5, claude-opus-5, claude-opus-4-8, claude-opus-4-7, claude-opus-4-6, claude-opus-4-5, claude-sonnet-5, claude-sonnet-4-6, claude-sonnet-4-5, claude-haiku-4-5 | -| Google | gemini-4-argon, gemini-3.8-flash, gemini-3.7-flash, gemini-3.6-flash, gemini-3.5-flash, gemini-3.5-flash-lite, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.5-pro, gemini-3-flash-preview, gemini-3.1-pro-preview | +| Google | gemini-4-carbon, gemini-4-argon, gemini-3.8-flash, gemini-3.7-flash, gemini-3.6-flash, gemini-3.5-flash, gemini-3.5-flash-lite, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.5-pro, gemini-3-flash-preview, gemini-3.1-pro-preview | | xAI | grok-4.7, grok-4.6, grok-4.5, grok-4.3, grok-4.20-reasoning, grok-4.20-non-reasoning | | ByteDance | seed-1.6, seed-1.8, seed-2.0-lite, dola-seed-2.0-mini, deepseek-v4-flash, glm-5.2 | | OpenRouter | aion-3.5, deepseek-v4-pro, hy4-preview, hermes-4-405b, hy3 | diff --git a/tee_gateway/model_registry.py b/tee_gateway/model_registry.py index b6cad30..8d429ee 100644 --- a/tee_gateway/model_registry.py +++ b/tee_gateway/model_registry.py @@ -897,6 +897,20 @@ class SupportedModel(Enum): output_price_usd=Decimal("0.00002"), supports_temperature=False, ) + # Gemini 4 Carbon — Google's strongest model, built on Argon for the + # hardest long-horizon/multi-step reasoning (paid Gemini API, 2026-11-10; + # text/image/video/audio/PDF in, text out, 1M context). Same sticker as + # Argon: priced at the standard $4/$20 per MTok, NOT the introductory + # $2/$10 that runs to 2026-11-30 (aistudio.google.com/docs/pricing). + # Google's "What's new in Gemini 4 Carbon" page says to remove + # `temperature`, `top_p` and `top_k` from requests, so the field is omitted. + GEMINI_4_CARBON = ModelConfig( + provider="google", + api_name="gemini-4-carbon", + input_price_usd=Decimal("0.000004"), + output_price_usd=Decimal("0.00002"), + supports_temperature=False, + ) # ── xAI Grok ──────────────────────────────────────────────────────── # Grok 4.7 — xAI's newest flagship (released 2026-09-21), a larger base @@ -1455,6 +1469,8 @@ class SupportedModel(Enum): "gemini-3.8-flash": SupportedModel.GEMINI_3_8_FLASH, "gemini-4-argon": SupportedModel.GEMINI_4_ARGON, "gemini-4.0-argon": SupportedModel.GEMINI_4_ARGON, + "gemini-4-carbon": SupportedModel.GEMINI_4_CARBON, + "gemini-4.0-carbon": SupportedModel.GEMINI_4_CARBON, # xAI "grok-4.7": SupportedModel.GROK_4_7, "grok-4.6": SupportedModel.GROK_4_6, diff --git a/tests/test_pricing.py b/tests/test_pricing.py index ecbb9f5..d33f400 100644 --- a/tests/test_pricing.py +++ b/tests/test_pricing.py @@ -431,6 +431,15 @@ def test_gemini_3_8_flash_resolves(self): self.assertEqual(cfg.input_price_usd, Decimal("0.00000075")) self.assertEqual(cfg.output_price_usd, Decimal("0.00000375")) + def test_gemini_4_carbon_resolves(self): + for name in ("gemini-4-carbon", "gemini-4.0-carbon"): + cfg = get_model_config(name) + self.assertEqual(cfg.provider, "google") + self.assertEqual(cfg.api_name, "gemini-4-carbon") + self.assertEqual(cfg.input_price_usd, Decimal("0.000004")) + self.assertEqual(cfg.output_price_usd, Decimal("0.00002")) + self.assertFalse(cfg.supports_temperature) + def test_gemini_4_argon_resolves(self): cfg = get_model_config("gemini-4-argon") self.assertEqual(cfg.provider, "google") @@ -1163,6 +1172,11 @@ def test_gemini_3_8_flash_cost(self): self.assertEqual(cost, _expected_cost_opg("gemini-3.8-flash", 1000, 500)) self.assertEqual(cost, 2_625_000_000_000_000) + def test_gemini_4_carbon_cost(self): + cost = self._calc("gemini-4-carbon", 1000, 500) + self.assertEqual(cost, _expected_cost_opg("gemini-4-carbon", 1000, 500)) + self.assertEqual(cost, 14_000_000_000_000_000) + def test_gemini_4_argon_cost(self): cost = self._calc("gemini-4-argon", 1000, 500) self.assertEqual(cost, _expected_cost_opg("gemini-4-argon", 1000, 500)) From f024c83fc5ab3ee9ab40deda99fe72bbceb5a5e4 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Nov 2026 07:11:09 +0000 Subject: [PATCH 2/2] Add Gemini 4 Hydrogen to the model registry Google's named replacement for Gemini 3.8 Flash, released 2026-11-13. $1.50/$7.50 per MTok standard (aistudio.google.com/docs/pricing); registered with supports_temperature=False like Argon and Carbon. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01SQvDLwjwn2id1pqTj58rVR --- CLAUDE.md | 2 +- README.md | 2 +- tee_gateway/model_registry.py | 16 ++++++++++++++++ tests/test_pricing.py | 14 ++++++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 9c02cf6..c2c1fc8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -132,7 +132,7 @@ Server configuration: prefixes determine routing: - **OpenAI**: gpt-6-sol, gpt-6-luna, gpt-6-astra, gpt-4.1, gpt-4.1-mini, gpt-5, gpt-5-mini, gpt-5.2, gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, gpt-5.5, gpt-5.6-sol/terra/luna, o3; image generation: gpt-image-2.5-flare, gpt-image-2.5-sunburst, gpt-image-2 - **Anthropic**: claude-sonnet-4-5/4-6, claude-sonnet-5, claude-sonnet-5-5, claude-haiku-5-5, claude-haiku-4-5, claude-opus-4-5/4-6/4-7/4-8, claude-opus-5, claude-opus-5-5, claude-fable-5, claude-fable-5-1, claude-fable-5-2 -- **Google**: gemini-4-carbon, gemini-4-argon, gemini-3.8-flash, gemini-3.7-flash, gemini-3.6-flash, gemini-3.5-flash, gemini-3.5-flash-lite, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.5-pro, gemini-3-flash-preview, gemini-3.1-pro-preview; image generation: gemini-2.5-flash-image, gemini-3.1-flash-image, gemini-nano-banana-2.1 +- **Google**: gemini-4-hydrogen, gemini-4-carbon, gemini-4-argon, gemini-3.8-flash, gemini-3.7-flash, gemini-3.6-flash, gemini-3.5-flash, gemini-3.5-flash-lite, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.5-pro, gemini-3-flash-preview, gemini-3.1-pro-preview; image generation: gemini-2.5-flash-image, gemini-3.1-flash-image, gemini-nano-banana-2.1 - **xAI**: grok-4.7, grok-4.6, grok-4.5, grok-4.3, grok-4.20-reasoning, grok-4.20-non-reasoning; image generation: grok-2-image, grok-imagine-image-2.0 - **ByteDance** (BytePlus ModelArk, OpenAI-compatible, ap-southeast): seed-1.6, seed-1.8, seed-2.0-lite, deepseek-v4-flash, glm-5.2 (Z.ai's model served via a ModelArk deployment endpoint); image generation: seedream-4.0, seedream-5.0-lite, seedance-4.5, seedance-5.0 - **OpenRouter** (OpenAI-compatible): aion-3.5, deepseek-v4-pro (pinned to Together), hy4-preview, hermes-4-405b, hy3 diff --git a/README.md b/README.md index 6e3c326..ab49e32 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ The gateway solves this by running inside a hardware-isolated Nitro Enclave wher |----------|--------| | OpenAI | gpt-6-sol, gpt-6-luna, gpt-6-astra, gpt-4.1, gpt-4.1-mini, gpt-5, gpt-5-mini, gpt-5.2, gpt-5.4, gpt-5.5, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, o3 | | Anthropic | claude-haiku-5-5, claude-sonnet-5-5, claude-fable-5-2, claude-fable-5-1, claude-fable-5, claude-opus-5-5, claude-opus-5, claude-opus-4-8, claude-opus-4-7, claude-opus-4-6, claude-opus-4-5, claude-sonnet-5, claude-sonnet-4-6, claude-sonnet-4-5, claude-haiku-4-5 | -| Google | gemini-4-carbon, gemini-4-argon, gemini-3.8-flash, gemini-3.7-flash, gemini-3.6-flash, gemini-3.5-flash, gemini-3.5-flash-lite, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.5-pro, gemini-3-flash-preview, gemini-3.1-pro-preview | +| Google | gemini-4-hydrogen, gemini-4-carbon, gemini-4-argon, gemini-3.8-flash, gemini-3.7-flash, gemini-3.6-flash, gemini-3.5-flash, gemini-3.5-flash-lite, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.5-pro, gemini-3-flash-preview, gemini-3.1-pro-preview | | xAI | grok-4.7, grok-4.6, grok-4.5, grok-4.3, grok-4.20-reasoning, grok-4.20-non-reasoning | | ByteDance | seed-1.6, seed-1.8, seed-2.0-lite, dola-seed-2.0-mini, deepseek-v4-flash, glm-5.2 | | OpenRouter | aion-3.5, deepseek-v4-pro, hy4-preview, hermes-4-405b, hy3 | diff --git a/tee_gateway/model_registry.py b/tee_gateway/model_registry.py index 8d429ee..8e17f26 100644 --- a/tee_gateway/model_registry.py +++ b/tee_gateway/model_registry.py @@ -911,6 +911,20 @@ class SupportedModel(Enum): output_price_usd=Decimal("0.00002"), supports_temperature=False, ) + # Gemini 4 Hydrogen — Google's named replacement for Gemini 3.8 Flash + # (paid Gemini API, 2026-11-13; text/image/video/audio/PDF in, text out, + # 1M context). Standard $1.50/$7.50 per MTok with no introductory rate + # (aistudio.google.com/docs/pricing) — the same rate 3.8 Flash moves to on + # 2027-01-01. Google's migration notes say `temperature`, `top_p` and + # `top_k` are no longer honoured on Gemini 4 models, so the field is + # omitted like Argon and Carbon. + GEMINI_4_HYDROGEN = ModelConfig( + provider="google", + api_name="gemini-4-hydrogen", + input_price_usd=Decimal("0.0000015"), + output_price_usd=Decimal("0.0000075"), + supports_temperature=False, + ) # ── xAI Grok ──────────────────────────────────────────────────────── # Grok 4.7 — xAI's newest flagship (released 2026-09-21), a larger base @@ -1471,6 +1485,8 @@ class SupportedModel(Enum): "gemini-4.0-argon": SupportedModel.GEMINI_4_ARGON, "gemini-4-carbon": SupportedModel.GEMINI_4_CARBON, "gemini-4.0-carbon": SupportedModel.GEMINI_4_CARBON, + "gemini-4-hydrogen": SupportedModel.GEMINI_4_HYDROGEN, + "gemini-4.0-hydrogen": SupportedModel.GEMINI_4_HYDROGEN, # xAI "grok-4.7": SupportedModel.GROK_4_7, "grok-4.6": SupportedModel.GROK_4_6, diff --git a/tests/test_pricing.py b/tests/test_pricing.py index d33f400..4ba6352 100644 --- a/tests/test_pricing.py +++ b/tests/test_pricing.py @@ -431,6 +431,15 @@ def test_gemini_3_8_flash_resolves(self): self.assertEqual(cfg.input_price_usd, Decimal("0.00000075")) self.assertEqual(cfg.output_price_usd, Decimal("0.00000375")) + def test_gemini_4_hydrogen_resolves(self): + for name in ("gemini-4-hydrogen", "gemini-4.0-hydrogen"): + cfg = get_model_config(name) + self.assertEqual(cfg.provider, "google") + self.assertEqual(cfg.api_name, "gemini-4-hydrogen") + self.assertEqual(cfg.input_price_usd, Decimal("0.0000015")) + self.assertEqual(cfg.output_price_usd, Decimal("0.0000075")) + self.assertFalse(cfg.supports_temperature) + def test_gemini_4_carbon_resolves(self): for name in ("gemini-4-carbon", "gemini-4.0-carbon"): cfg = get_model_config(name) @@ -1172,6 +1181,11 @@ def test_gemini_3_8_flash_cost(self): self.assertEqual(cost, _expected_cost_opg("gemini-3.8-flash", 1000, 500)) self.assertEqual(cost, 2_625_000_000_000_000) + def test_gemini_4_hydrogen_cost(self): + cost = self._calc("gemini-4-hydrogen", 1000, 500) + self.assertEqual(cost, _expected_cost_opg("gemini-4-hydrogen", 1000, 500)) + self.assertEqual(cost, 5_250_000_000_000_000) + def test_gemini_4_carbon_cost(self): cost = self._calc("gemini-4-carbon", 1000, 500) self.assertEqual(cost, _expected_cost_opg("gemini-4-carbon", 1000, 500))