From 2386e654208b65ad2b287777d0b7f27890ee79ed Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 18 Nov 2026 07:10:44 +0000 Subject: [PATCH 1/2] Add GPT-6.2 Astra, GPT-6.2 Sol and Tencent Hy4 to the model registry GPT-6.2 Astra ($8/$40 per MTok) and GPT-6.2 Sol ($2/$10) were released by OpenAI on 2026-11-17. Both route tools through the Responses API and omit temperature, like the rest of the GPT-6 family. Tencent Hy4 is the GA release of Hy4 Preview on OpenRouter at half the preview's price ($0.417/$1.2505). The bare "hy4" alias now resolves to it. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01SQvDLx7BikWySs9gYoiW1c --- CLAUDE.md | 4 +-- README.md | 4 +-- tee_gateway/model_registry.py | 42 ++++++++++++++++++++++++++++- tests/test_pricing.py | 50 ++++++++++++++++++++++++++++++++++- 4 files changed, 94 insertions(+), 6 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index e273476..42968cf 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -130,12 +130,12 @@ Server configuration: `model_registry.py` is the source of truth; this list mirrors it. Model name 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 +- **OpenAI**: gpt-6.2-astra, gpt-6.2-sol, 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-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 +- **OpenRouter** (OpenAI-compatible): hy4, aion-3.5, deepseek-v4-pro (pinned to Together), hy4-preview, hermes-4-405b, hy3 - **abliteration.ai** (OpenAI-compatible): abliterated-model-large-v2 - **Moonshot AI** (Kimi API, OpenAI-compatible, api.moonshot.ai): kimi-k3.1-pro - **NEAR AI** (NEAR AI Cloud, OpenAI-compatible, cloud-api.near.ai): deepseek-v4.1-flash-abliterated diff --git a/README.md b/README.md index 69e668a..2c18957 100644 --- a/README.md +++ b/README.md @@ -33,12 +33,12 @@ The gateway solves this by running inside a hardware-isolated Nitro Enclave wher | Provider | Models | |----------|--------| -| 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 | +| OpenAI | gpt-6.2-astra, gpt-6.2-sol, 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-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 | +| OpenRouter | hy4, aion-3.5, deepseek-v4-pro, hy4-preview, hermes-4-405b, hy3 | | abliteration.ai | abliterated-model-large-v2 | | Moonshot AI | kimi-k3.1-pro | | NEAR AI | deepseek-v4.1-flash-abliterated | diff --git a/tee_gateway/model_registry.py b/tee_gateway/model_registry.py index 8114689..1feb91e 100644 --- a/tee_gateway/model_registry.py +++ b/tee_gateway/model_registry.py @@ -479,6 +479,31 @@ class SupportedModel(Enum): output_price_usd=Decimal("0.000006"), responses_api_for_tools=True, ) + # GPT-6.2 Astra and GPT-6.2 Sol (released 2026-11-17) — point releases of + # GPT-6 Astra and GPT-6 Sol that finish tasks in fewer output tokens. + # Astra is $8/$40 per MTok (20% under GPT-6 Astra's $10/$50); Sol keeps + # $2/$10 (OpenAI pricing page, standard tier, <=272K input). Both have a + # 1.05M context window. Same reasoning_effort/function-tools conflict on + # Chat Completions as the GPT-6 and gpt-5.6 families, so tools go through + # the Responses API. OpenAI's model pages do not say whether `temperature` + # is accepted; every earlier GPT-6 model rejects it (and langchain only + # strips it for "gpt-5*" names), so supports_temperature=False. + GPT_6_2_ASTRA = ModelConfig( + provider="openai", + api_name="gpt-6.2-astra", + input_price_usd=Decimal("0.000008"), + output_price_usd=Decimal("0.00004"), + responses_api_for_tools=True, + supports_temperature=False, + ) + GPT_6_2_SOL = ModelConfig( + provider="openai", + api_name="gpt-6.2-sol", + input_price_usd=Decimal("0.000002"), + output_price_usd=Decimal("0.00001"), + responses_api_for_tools=True, + supports_temperature=False, + ) # GPT-6 Astra — OpenAI's flagship successor to the gpt-5.6 family (GA # 2026-09-03). Ships with native web search, code interpreter, hosted # shell, apply-patch, computer use and MCP. Priced at $10/$50 per MTok. @@ -1196,6 +1221,16 @@ class SupportedModel(Enum): output_price_usd=Decimal("0.00000396"), openrouter_provider="together", ) + # Tencent Hy4 — the GA release of Hy4 Preview (listed on OpenRouter + # 2026-11-04), served by Tencent only, adding image input and halving the + # preview's price: $0.417/$1.2505 per MTok (openrouter.ai/api/v1/models). + # Same 1,048,576-token context; temperature is a supported parameter. + HY4 = ModelConfig( + provider="openrouter", + api_name="tencent/hy4", + input_price_usd=Decimal("0.000000417"), + output_price_usd=Decimal("0.0000012505"), + ) # Tencent Hy4 Preview — 770B-parameter (49B active) open-weight MoE, # open-sourced 2026-08-28, aimed at coding agents and long-horizon # tool-use with a 1,048,576-token context window. Routed through @@ -1478,6 +1513,10 @@ class SupportedModel(Enum): "gpt-5.6-sol": SupportedModel.GPT_5_6_SOL, "gpt-5.6-terra": SupportedModel.GPT_5_6_TERRA, "gpt-5.6-luna": SupportedModel.GPT_5_6_LUNA, + "gpt-6.2-astra": SupportedModel.GPT_6_2_ASTRA, + "gpt-6-2-astra": SupportedModel.GPT_6_2_ASTRA, + "gpt-6.2-sol": SupportedModel.GPT_6_2_SOL, + "gpt-6-2-sol": SupportedModel.GPT_6_2_SOL, "gpt-6-astra": SupportedModel.GPT_6_ASTRA, "gpt-6-sol": SupportedModel.GPT_6_SOL, "gpt-6-luna": SupportedModel.GPT_6_LUNA, @@ -1589,8 +1628,9 @@ class SupportedModel(Enum): "hy3": SupportedModel.HY3, "tencent/hy3": SupportedModel.HY3, "tencent/hy3:floor": SupportedModel.HY3, + "hy4": SupportedModel.HY4, + "tencent/hy4": SupportedModel.HY4, "hy4-preview": SupportedModel.HY4_PREVIEW, - "hy4": SupportedModel.HY4_PREVIEW, "tencent/hy4-preview": SupportedModel.HY4_PREVIEW, # Z.ai "glm-5.2": SupportedModel.GLM_5_2, diff --git a/tests/test_pricing.py b/tests/test_pricing.py index 8e208e6..ecb59f8 100644 --- a/tests/test_pricing.py +++ b/tests/test_pricing.py @@ -320,6 +320,26 @@ def test_gpt_6_astra_resolves(self): self.assertEqual(cfg.output_price_usd, Decimal("0.00005")) self.assertTrue(cfg.responses_api_for_tools) + def test_gpt_6_2_astra_resolves(self): + cfg = get_model_config("gpt-6.2-astra") + self.assertEqual(cfg.provider, "openai") + self.assertEqual(cfg.api_name, "gpt-6.2-astra") + self.assertEqual(cfg.input_price_usd, Decimal("0.000008")) + self.assertEqual(cfg.output_price_usd, Decimal("0.00004")) + self.assertTrue(cfg.responses_api_for_tools) + self.assertFalse(cfg.supports_temperature) + self.assertEqual(cfg, get_model_config("gpt-6-2-astra")) + + def test_gpt_6_2_sol_resolves(self): + cfg = get_model_config("gpt-6.2-sol") + self.assertEqual(cfg.provider, "openai") + self.assertEqual(cfg.api_name, "gpt-6.2-sol") + self.assertEqual(cfg.input_price_usd, Decimal("0.000002")) + self.assertEqual(cfg.output_price_usd, Decimal("0.00001")) + self.assertTrue(cfg.responses_api_for_tools) + self.assertFalse(cfg.supports_temperature) + self.assertEqual(cfg, get_model_config("gpt-6-2-sol")) + def test_gpt_6_sol_resolves(self): cfg = get_model_config("gpt-6-sol") self.assertEqual(cfg.provider, "openai") @@ -768,13 +788,20 @@ def test_aion_3_5_resolves(self): self.assertEqual(cfg, get_model_config("aion-3-5")) self.assertEqual(cfg, get_model_config("aion-labs/aion-3.5")) + def test_hy4_resolves(self): + cfg = get_model_config("tencent/hy4") + self.assertEqual(cfg.provider, "openrouter") + self.assertEqual(cfg.api_name, "tencent/hy4") + self.assertEqual(cfg.input_price_usd, Decimal("0.000000417")) + self.assertEqual(cfg.output_price_usd, Decimal("0.0000012505")) + self.assertEqual(cfg, get_model_config("hy4")) + def test_hy4_preview_resolves(self): cfg = get_model_config("hy4-preview") self.assertEqual(cfg.provider, "openrouter") self.assertEqual(cfg.api_name, "tencent/hy4-preview") self.assertEqual(cfg.input_price_usd, Decimal("0.000000834")) self.assertEqual(cfg.output_price_usd, Decimal("0.000002501")) - self.assertEqual(cfg, get_model_config("hy4")) self.assertEqual(cfg, get_model_config("tencent/hy4-preview")) # ── Z.ai (Model API) ─────────────────────────────────────────────────── @@ -1065,6 +1092,20 @@ def test_gpt_6_astra_cost(self): # 1000*0.00001 + 500*0.00005 = 0.01 + 0.025 = 0.035 USD = 3.5e16 wei self.assertEqual(cost, 35_000_000_000_000_000) + def test_gpt_6_2_astra_cost(self): + cost = self._calc("gpt-6.2-astra", 1000, 500) + expected = _expected_cost_opg("gpt-6.2-astra", 1000, 500) + self.assertEqual(cost, expected) + # 1000*0.000008 + 500*0.00004 = 0.008 + 0.02 = 0.028 USD = 2.8e16 wei + self.assertEqual(cost, 28_000_000_000_000_000) + + def test_gpt_6_2_sol_cost(self): + cost = self._calc("gpt-6.2-sol", 1000, 500) + expected = _expected_cost_opg("gpt-6.2-sol", 1000, 500) + self.assertEqual(cost, expected) + # 1000*0.000002 + 500*0.00001 = 0.002 + 0.005 = 0.007 USD = 7e15 wei + self.assertEqual(cost, 7_000_000_000_000_000) + def test_gpt_6_sol_cost(self): cost = self._calc("gpt-6-sol", 1000, 500) expected = _expected_cost_opg("gpt-6-sol", 1000, 500) @@ -1385,6 +1426,13 @@ def test_aion_3_5_cost(self): 6_000_000_000_000_000, ) + def test_hy4_cost(self): + # 1000*0.000000417 + 500*0.0000012505 = 0.00104225 USD + self.assertEqual( + self._calc("hy4", 1000, 500), + 1_042_250_000_000_000, + ) + def test_hy4_preview_cost(self): self.assertEqual( self._calc("hy4-preview", 1000, 500), From 2a6cd6b966f312bec0b042a18ec6365a2af93318 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 18 Nov 2026 07:11:03 +0000 Subject: [PATCH 2/2] Drop Tencent Hy4 from this change Hy4 Preview was retired from chat-api's picker for low usage, and the GA release adds nothing a visible row lacks, so nothing would offer it. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01SQvDLx7BikWySs9gYoiW1c --- CLAUDE.md | 2 +- README.md | 2 +- tee_gateway/model_registry.py | 13 +------------ tests/test_pricing.py | 16 +--------------- 4 files changed, 4 insertions(+), 29 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 42968cf..c562650 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -135,7 +135,7 @@ prefixes determine routing: - **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): hy4, aion-3.5, deepseek-v4-pro (pinned to Together), hy4-preview, hermes-4-405b, hy3 +- **OpenRouter** (OpenAI-compatible): aion-3.5, deepseek-v4-pro (pinned to Together), hy4-preview, hermes-4-405b, hy3 - **abliteration.ai** (OpenAI-compatible): abliterated-model-large-v2 - **Moonshot AI** (Kimi API, OpenAI-compatible, api.moonshot.ai): kimi-k3.1-pro - **NEAR AI** (NEAR AI Cloud, OpenAI-compatible, cloud-api.near.ai): deepseek-v4.1-flash-abliterated diff --git a/README.md b/README.md index 2c18957..3ec9696 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ The gateway solves this by running inside a hardware-isolated Nitro Enclave wher | 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 | hy4, aion-3.5, deepseek-v4-pro, hy4-preview, hermes-4-405b, hy3 | +| OpenRouter | aion-3.5, deepseek-v4-pro, hy4-preview, hermes-4-405b, hy3 | | abliteration.ai | abliterated-model-large-v2 | | Moonshot AI | kimi-k3.1-pro | | NEAR AI | deepseek-v4.1-flash-abliterated | diff --git a/tee_gateway/model_registry.py b/tee_gateway/model_registry.py index 1feb91e..c14d3a4 100644 --- a/tee_gateway/model_registry.py +++ b/tee_gateway/model_registry.py @@ -1221,16 +1221,6 @@ class SupportedModel(Enum): output_price_usd=Decimal("0.00000396"), openrouter_provider="together", ) - # Tencent Hy4 — the GA release of Hy4 Preview (listed on OpenRouter - # 2026-11-04), served by Tencent only, adding image input and halving the - # preview's price: $0.417/$1.2505 per MTok (openrouter.ai/api/v1/models). - # Same 1,048,576-token context; temperature is a supported parameter. - HY4 = ModelConfig( - provider="openrouter", - api_name="tencent/hy4", - input_price_usd=Decimal("0.000000417"), - output_price_usd=Decimal("0.0000012505"), - ) # Tencent Hy4 Preview — 770B-parameter (49B active) open-weight MoE, # open-sourced 2026-08-28, aimed at coding agents and long-horizon # tool-use with a 1,048,576-token context window. Routed through @@ -1628,9 +1618,8 @@ class SupportedModel(Enum): "hy3": SupportedModel.HY3, "tencent/hy3": SupportedModel.HY3, "tencent/hy3:floor": SupportedModel.HY3, - "hy4": SupportedModel.HY4, - "tencent/hy4": SupportedModel.HY4, "hy4-preview": SupportedModel.HY4_PREVIEW, + "hy4": SupportedModel.HY4_PREVIEW, "tencent/hy4-preview": SupportedModel.HY4_PREVIEW, # Z.ai "glm-5.2": SupportedModel.GLM_5_2, diff --git a/tests/test_pricing.py b/tests/test_pricing.py index ecb59f8..1e6cc46 100644 --- a/tests/test_pricing.py +++ b/tests/test_pricing.py @@ -788,20 +788,13 @@ def test_aion_3_5_resolves(self): self.assertEqual(cfg, get_model_config("aion-3-5")) self.assertEqual(cfg, get_model_config("aion-labs/aion-3.5")) - def test_hy4_resolves(self): - cfg = get_model_config("tencent/hy4") - self.assertEqual(cfg.provider, "openrouter") - self.assertEqual(cfg.api_name, "tencent/hy4") - self.assertEqual(cfg.input_price_usd, Decimal("0.000000417")) - self.assertEqual(cfg.output_price_usd, Decimal("0.0000012505")) - self.assertEqual(cfg, get_model_config("hy4")) - def test_hy4_preview_resolves(self): cfg = get_model_config("hy4-preview") self.assertEqual(cfg.provider, "openrouter") self.assertEqual(cfg.api_name, "tencent/hy4-preview") self.assertEqual(cfg.input_price_usd, Decimal("0.000000834")) self.assertEqual(cfg.output_price_usd, Decimal("0.000002501")) + self.assertEqual(cfg, get_model_config("hy4")) self.assertEqual(cfg, get_model_config("tencent/hy4-preview")) # ── Z.ai (Model API) ─────────────────────────────────────────────────── @@ -1426,13 +1419,6 @@ def test_aion_3_5_cost(self): 6_000_000_000_000_000, ) - def test_hy4_cost(self): - # 1000*0.000000417 + 500*0.0000012505 = 0.00104225 USD - self.assertEqual( - self._calc("hy4", 1000, 500), - 1_042_250_000_000_000, - ) - def test_hy4_preview_cost(self): self.assertEqual( self._calc("hy4-preview", 1000, 500),