Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ prefixes determine routing:
- **Google**: gemini-4-neon, 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-flash, 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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The gateway solves this by running inside a hardware-isolated Nitro Enclave wher
| Google | gemini-4-neon, 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-flash, 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 |
Expand Down
16 changes: 16 additions & 0 deletions tee_gateway/model_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1237,6 +1237,20 @@ class SupportedModel(Enum):
output_price_usd=Decimal("0.00000396"),
openrouter_provider="together",
)
# Tencent Hy4 Flash — released 2026-11-16: ~220B-parameter (12B active)
# open-weight MoE, text + image input, 1,048,576-token context. Tencent
# positions it for everyday/high-volume work at a fraction of Hy4's cost.
# Routed through OpenRouter like hy3 (Tencent Cloud is its only provider
# there); rate from openrouter.ai/api/v1/models. OpenRouter lists
# `temperature` and `reasoning` among its supported parameters, and the
# model card documents reasoning_effort (incl. no-think) for toggling
# thinking, so no supports_temperature/force_temperature override.
HY4_FLASH = ModelConfig(
provider="openrouter",
api_name="tencent/hy4-flash",
input_price_usd=Decimal("0.000000035"),
output_price_usd=Decimal("0.0000001405"),
)
# 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
Expand Down Expand Up @@ -1636,6 +1650,8 @@ class SupportedModel(Enum):
"hy3": SupportedModel.HY3,
"tencent/hy3": SupportedModel.HY3,
"tencent/hy3:floor": SupportedModel.HY3,
"hy4-flash": SupportedModel.HY4_FLASH,
"tencent/hy4-flash": SupportedModel.HY4_FLASH,
"hy4-preview": SupportedModel.HY4_PREVIEW,
"hy4": SupportedModel.HY4_PREVIEW,
"tencent/hy4-preview": SupportedModel.HY4_PREVIEW,
Expand Down
16 changes: 16 additions & 0 deletions tests/test_pricing.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,15 @@ def test_hy3_resolves(self):
self.assertEqual(cfg, get_model_config("tencent/hy3"))
self.assertEqual(cfg, get_model_config("tencent/hy3:floor"))

def test_hy4_flash_resolves(self):
cfg = get_model_config("hy4-flash")
self.assertEqual(cfg.provider, "openrouter")
self.assertEqual(cfg.api_name, "tencent/hy4-flash")
self.assertEqual(cfg.input_price_usd, Decimal("0.000000035"))
self.assertEqual(cfg.output_price_usd, Decimal("0.0000001405"))
self.assertTrue(cfg.supports_temperature)
self.assertEqual(cfg, get_model_config("tencent/hy4-flash"))

def test_kimi_k3_1_pro_resolves(self):
cfg = get_model_config("kimi-k3.1-pro")
self.assertEqual(cfg.provider, "moonshot")
Expand Down Expand Up @@ -1405,6 +1414,13 @@ def test_hy3_cost(self):
396_000_000_000_000,
)

def test_hy4_flash_cost(self):
# 1000*0.000000035 + 500*0.0000001405 = 0.000035 + 0.00007025 = 0.00010525 USD
self.assertEqual(
self._calc("hy4-flash", 1000, 500),
105_250_000_000_000,
)

def test_abliterated_large_v2_cost(self):
# 1000*0.000003 + 500*0.000005 = 0.003 + 0.0025 = 0.0055 USD
self.assertEqual(
Expand Down
Loading