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
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ Server configuration:
### Supported Providers

Model name prefixes determine routing:
- **OpenAI**: gpt-6-astra, gpt-4.1, gpt-5, gpt-5-mini, gpt-5.2, gpt-5.6-sol/terra/luna, o4-mini; image generation: gpt-image-2
- **OpenAI**: gpt-6-astra, gpt-4.1, gpt-5, gpt-5-mini, gpt-5.2, gpt-5.6-sol/terra/luna, o4-mini; image generation: gpt-image-2.5-flare, gpt-image-2.5-sunburst, gpt-image-2
- **Anthropic**: claude-sonnet-4-0/4-5/4-6, claude-sonnet-5, claude-haiku-4-5, claude-opus-4-5/4-6/4-7/4-8, claude-opus-5, claude-fable-5, claude-fable-5-1, claude-3-7-sonnet, claude-3-5-haiku
- **Google**: gemini-3.8-flash, gemini-3.7-flash, gemini-3.6-flash, gemini-3.5-flash-lite, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.5-pro, gemini-3-pro-preview, gemini-3-flash-preview, gemini-3.1-pro-preview, gemini-3.5-flash; image generation: gemini-2.5-flash-image, gemini-3.1-flash-image
- **xAI**: grok-2, grok-3, grok-3-mini, grok-4, grok-4.3, grok-4.5, grok-4.6, grok-4-fast, grok-4-1-fast; 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, deepseek-v4-pro, 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): hermes-4-405b, hermes-4-70b, hy3
- **Z.ai** (Model API, OpenAI-compatible): image generation: glm-image (glm-5.2 chat is routed through BytePlus ModelArk, see ByteDance above)

Image generation via OpenAI (gpt-image-2), xAI (grok-2-image, grok-imagine-image-2.0), ByteDance
Image generation via OpenAI (gpt-image-2.5-flare, gpt-image-2.5-sunburst, gpt-image-2), xAI (grok-2-image, grok-imagine-image-2.0), ByteDance
(seedream-4.0, seedream-5.0-lite, seedance-4.5, seedance-5.0), and Z.ai (glm-image) is served
through a provider `/images/generations` endpoint rather than the chat path (see
`image_generation.py`), but is surfaced on `/v1/chat/completions` exactly like
Expand Down
47 changes: 47 additions & 0 deletions tee_gateway/model_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,48 @@ class SupportedModel(Enum):
image_aspect_ratios=_GPT_IMAGE_ASPECT_SIZES,
image_aspect_ratio_param="size",
)
# GPT-Image-2.5 Flare — OpenAI's fastest model for high-quality, everyday
# image generation (GA 2026-09-08), positioned as the general-purpose
# successor to gpt-image-2 (50% lower latency, better reference-photo
# fidelity). Same /images/generations + /images/edits endpoints,
# b64-only output (response_format omitted, as with gpt-image-2), and
# per OpenAI's model page "token rates align with GPT Image 2" — text
# $5/$1.25(cached) per MTok, image input $8/$2(cached) per MTok, image
# output $30 per MTok — so the same flat per-image approximation as
# gpt-image-2 applies.
GPT_IMAGE_2_5_FLARE = ModelConfig(
provider="openai",
api_name="gpt-image-2.5-flare",
input_price_usd=Decimal("0"),
output_price_usd=Decimal("0"),
image_generation=True,
per_image_price_usd=Decimal("0.05"),
image_response_format=None,
image_supports_reference=True,
image_edit_endpoint="/images/edits",
image_extra_params={"quality": "medium"},
image_aspect_ratios=_GPT_IMAGE_ASPECT_SIZES,
image_aspect_ratio_param="size",
)
# GPT-Image-2.5 Sunburst — OpenAI's most capable image model, favoring
# editing precision over latency for premium/production workflows (GA
# 2026-09-08, same day as Flare). Only reachable via /images/generations
# and /images/edits (not chat/Responses/Batch), same request shaping and
# token rates as Flare/gpt-image-2.
GPT_IMAGE_2_5_SUNBURST = ModelConfig(
provider="openai",
api_name="gpt-image-2.5-sunburst",
input_price_usd=Decimal("0"),
output_price_usd=Decimal("0"),
image_generation=True,
per_image_price_usd=Decimal("0.05"),
image_response_format=None,
image_supports_reference=True,
image_edit_endpoint="/images/edits",
image_extra_params={"quality": "medium"},
image_aspect_ratios=_GPT_IMAGE_ASPECT_SIZES,
image_aspect_ratio_param="size",
)

# ── Anthropic ───────────────────────────────────────────────────────
CLAUDE_SONNET_4_5 = ModelConfig(
Expand Down Expand Up @@ -842,6 +884,11 @@ class SupportedModel(Enum):
"gpt-5.6-luna": SupportedModel.GPT_5_6_LUNA,
"gpt-6-astra": SupportedModel.GPT_6_ASTRA,
"gpt-image-2": SupportedModel.GPT_IMAGE_2,
"gpt-image-2.5": SupportedModel.GPT_IMAGE_2_5_FLARE,
"gpt-image-2.5-flare": SupportedModel.GPT_IMAGE_2_5_FLARE,
"gpt-image-2.5-flare-2026-09-08": SupportedModel.GPT_IMAGE_2_5_FLARE,
"gpt-image-2.5-sunburst": SupportedModel.GPT_IMAGE_2_5_SUNBURST,
"gpt-image-2.5-sunburst-2026-09-08": SupportedModel.GPT_IMAGE_2_5_SUNBURST,
# Anthropic
"claude-sonnet-4-5": SupportedModel.CLAUDE_SONNET_4_5,
"claude-sonnet-4-6": SupportedModel.CLAUDE_SONNET_4_6,
Expand Down
20 changes: 20 additions & 0 deletions tests/test_pricing.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,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_image_2_5_flare_resolves(self):
cfg = get_model_config("gpt-image-2.5-flare")
self.assertEqual(cfg.provider, "openai")
self.assertEqual(cfg.api_name, "gpt-image-2.5-flare")
self.assertTrue(cfg.image_generation)
self.assertEqual(cfg.per_image_price_usd, Decimal("0.05"))

def test_gpt_image_2_5_bare_alias_resolves_to_flare(self):
self.assertEqual(
get_model_config("gpt-image-2.5"),
get_model_config("gpt-image-2.5-flare"),
)

def test_gpt_image_2_5_sunburst_resolves(self):
cfg = get_model_config("gpt-image-2.5-sunburst")
self.assertEqual(cfg.provider, "openai")
self.assertEqual(cfg.api_name, "gpt-image-2.5-sunburst")
self.assertTrue(cfg.image_generation)
self.assertEqual(cfg.per_image_price_usd, Decimal("0.05"))

# ── Google ──────────────────────────────────────────────────────────────

def test_gemini_2_5_flash_resolves(self):
Expand Down
Loading