feat(api, xai): add xAI Grok video model support with API integration

- Introduced new xAI `grok-imagine-video` model for video generation with configurable options (e.g., duration, size, resolution).
- Implemented video-specific API endpoints (`/v1/videos`, `/v1/videos/generations`, `/v1/videos/edits`, `/v1/videos/extensions`), including request validation and model handling.
- Enhanced model registry with `xaiBuiltinVideoModelID` and metadata for video capabilities.
- Added unit tests to validate video model support, request structures, and API response handling.
- Extended `XAIExecutor` to integrate video generation and retrieval via runtime requests.
This commit is contained in:
Luis Pater
2026-05-17 02:53:50 +08:00
parent 2ff9e33e26
commit 53d1fd6c5c
9 changed files with 1130 additions and 2 deletions
+6
View File
@@ -66,4 +66,10 @@ func TestIsAIAPIPathIncludesImages(t *testing.T) {
if !isAIAPIPath("/v1/images/edits") {
t.Fatalf("expected /v1/images/edits to be treated as AI API path")
}
if !isAIAPIPath("/v1/videos") {
t.Fatalf("expected /v1/videos to be treated as AI API path")
}
if !isAIAPIPath("/v1/videos/video_123") {
t.Fatalf("expected /v1/videos/video_123 to be treated as AI API path")
}
}