Skip to content
Merged
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 @@ -157,7 +157,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): ergo-1.0 (pinned to Amazon Bedrock), 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 | ergo-1.0, 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
20 changes: 20 additions & 0 deletions tee_gateway/model_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1228,6 +1228,22 @@ class SupportedModel(Enum):
input_price_usd=Decimal("0.000003"),
output_price_usd=Decimal("0.000006"),
)
# Amazon Ergo 1.0 — open-weight agentic reasoning MoE (1.1T total / 55B
# active), released 2026-12-01, 1M context, 131K max output, text only.
# Pinned to Amazon Bedrock's global endpoint ($1.00 in / $3.00 out per
# MTok, openrouter.ai/api/v1/models/amazon/ergo-1.0/endpoints); the bare
# "amazon-bedrock" slug would also match the pricier us endpoint
# ($1.10 / $3.30), which this rate would under-bill. Bedrock's endpoint
# lists neither temperature nor top_p among its supported parameters, so
# supports_temperature=False rather than relying on OpenRouter to drop it.
ERGO_1_0 = ModelConfig(
provider="openrouter",
api_name="amazon/ergo-1.0",
input_price_usd=Decimal("0.000001"),
output_price_usd=Decimal("0.000003"),
supports_temperature=False,
openrouter_provider="amazon-bedrock/global",
)
# DeepSeek V4 Pro 0813, routed through OpenRouter, pinned to Together
# ($1.32 in / $3.96 out per MTok).
DEEPSEEK_V4_PRO = ModelConfig(
Expand Down Expand Up @@ -1626,6 +1642,10 @@ class SupportedModel(Enum):
"aion-3.5": SupportedModel.AION_3_5,
"aion-3-5": SupportedModel.AION_3_5,
"aion-labs/aion-3.5": SupportedModel.AION_3_5,
"ergo-1.0": SupportedModel.ERGO_1_0,
"ergo-1-0": SupportedModel.ERGO_1_0,
"ergo": SupportedModel.ERGO_1_0,
"amazon/ergo-1.0": SupportedModel.ERGO_1_0,
"deepseek-v4-pro": SupportedModel.DEEPSEEK_V4_PRO,
"deepseek-v4-pro-0813": SupportedModel.DEEPSEEK_V4_PRO,
"deepseek/deepseek-v4-pro-0813": SupportedModel.DEEPSEEK_V4_PRO,
Expand Down
17 changes: 17 additions & 0 deletions tee_gateway/test/test_tee_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,7 @@ def setUpClass(cls) -> None:
google_api_key="test-google-key",
xai_api_key="test-xai-key",
moonshot_api_key="test-moonshot-key",
openrouter_api_key="test-openrouter-key",
)
)

Expand Down Expand Up @@ -1062,6 +1063,22 @@ def tearDownClass(cls) -> None:
set_provider_config(cls._saved_config)
get_chat_model_cached.cache_clear()

def test_ergo_1_0_pinned_to_bedrock_global(self):
# The bare "amazon-bedrock" slug would also match its pricier us
# endpoint, which the registry rate would under-bill.
model = get_chat_model_cached("ergo-1.0", 0.0, 1024)
self.assertEqual(model.model_name, "amazon/ergo-1.0")
self.assertIsNone(model.temperature)
self.assertEqual(
model.extra_body,
{
"provider": {
"order": ["amazon-bedrock/global"],
"allow_fallbacks": False,
}
},
)

def test_deepseek_v4_pro_pinned_to_together(self):
model = get_chat_model_cached("deepseek-v4-pro", 0.0, 1024)
self.assertEqual(model.model_name, "deepseek/deepseek-v4-pro-0813")
Expand Down
18 changes: 18 additions & 0 deletions tests/test_pricing.py
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,18 @@ 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_ergo_1_0_resolves(self):
cfg = get_model_config("ergo-1.0")
self.assertEqual(cfg.provider, "openrouter")
self.assertEqual(cfg.api_name, "amazon/ergo-1.0")
self.assertEqual(cfg.openrouter_provider, "amazon-bedrock/global")
self.assertEqual(cfg.input_price_usd, Decimal("0.000001"))
self.assertEqual(cfg.output_price_usd, Decimal("0.000003"))
self.assertFalse(cfg.supports_temperature)
for alias in ("ergo-1-0", "ergo", "amazon/ergo-1.0"):
with self.subTest(alias=alias):
self.assertEqual(cfg, get_model_config(alias))

def test_hy4_preview_resolves(self):
cfg = get_model_config("hy4-preview")
self.assertEqual(cfg.provider, "openrouter")
Expand Down Expand Up @@ -1433,6 +1445,12 @@ def test_aion_3_5_cost(self):
6_000_000_000_000_000,
)

def test_ergo_1_0_cost(self):
cost = self._calc("ergo-1.0", 1000, 500)
self.assertEqual(cost, _expected_cost_opg("ergo-1.0", 1000, 500))
# 1000*0.000001 + 500*0.000003 = 0.001 + 0.0015 = 0.0025 USD
self.assertEqual(cost, 2_500_000_000_000_000)

def test_hy4_preview_cost(self):
self.assertEqual(
self._calc("hy4-preview", 1000, 500),
Expand Down
Loading