feat(openai): add xAI Grok Imagine Image 2.0 image model support

- Added `grok-imagine-image-2.0` as a first-class xAI image base model across validation, canonicalization, and routing checks.
- Registered the model in built-in model definitions so it appears in model metadata.
- Updated image model allowlists and request validation error messaging to include the new model.
- Marked the new model as hidden in client visibility override handling.
This commit is contained in:
Luis Pater
2026-08-13 14:37:29 +08:00
parent 6f2cea9484
commit db35b91e2a
8 changed files with 68 additions and 10 deletions

View File

@@ -1855,6 +1855,7 @@ func TestModelsWithClientVersionReturnsCodexCatalog(t *testing.T) {
{ID: "grok-imagine-image-quality", Object: "model", OwnedBy: "xai", Type: "openai"},
{ID: "gpt-image-2", Object: "model", OwnedBy: "openai", Type: "openai"},
{ID: "grok-imagine-image", Object: "model", OwnedBy: "xai", Type: "openai"},
{ID: "grok-imagine-image-2.0", Object: "model", OwnedBy: "xai", Type: "openai"},
{ID: "grok-imagine-video", Object: "model", OwnedBy: "xai", Type: "openai"},
{ID: "grok-imagine-video-1.5", Object: "model", OwnedBy: "xai", Type: "openai"},
{ID: "grok-imagine-video-1.5-preview", Object: "model", OwnedBy: "xai", Type: "openai"},
@@ -1955,6 +1956,7 @@ func TestModelsWithClientVersionReturnsCodexCatalog(t *testing.T) {
"grok-imagine-image-quality": false,
"gpt-image-2": false,
"grok-imagine-image": false,
"grok-imagine-image-2.0": false,
"grok-imagine-video": false,
"grok-imagine-video-1.5": false,
"grok-imagine-video-1.5-preview": false,