Skip to content

Use model type aliases in image and video method signatures#114

Merged
Omar-V2 merged 1 commit intomainfrom
use-model-literals-for-imagine-endpoints
Mar 18, 2026
Merged

Use model type aliases in image and video method signatures#114
Omar-V2 merged 1 commit intomainfrom
use-model-literals-for-imagine-endpoints

Conversation

@Omar-V2
Copy link
Collaborator

@Omar-V2 Omar-V2 commented Mar 18, 2026

  • Add Union[ImageGenerationModel, str] to all image client methods (sample, sample_batch, prepare)
  • Add Union[VideoGenerationModel, str] to all video client methods (generate, start, prepare)
  • Enables IDE autocomplete for model names, matching existing ChatModel pattern

- Add Union[ImageGenerationModel, str] to all image client methods (sample, sample_batch, prepare)
 - Add Union[VideoGenerationModel, str] to all video client methods (generate, start, prepare)
 - Update base  in both image.py and video.py
 - Enables IDE autocomplete for model names, matching existing ChatModel pattern
@Omar-V2 Omar-V2 requested a review from a team as a code owner March 18, 2026 02:04
@Omar-V2 Omar-V2 merged commit 2d4fd45 into main Mar 18, 2026
7 checks passed
@Omar-V2 Omar-V2 deleted the use-model-literals-for-imagine-endpoints branch March 18, 2026 02:08
double-di pushed a commit that referenced this pull request Mar 19, 2026
Prepare to release `v1.9.0` of the xAI Python SDK which includes
- Support for image and video generation in batch requests (#112)
- Support for using JSONL files in batch requests (#112)
- Bug fix that prevents crashing on unknown statuses for polling in long
running requests such as video generation and document indexing (#113)
- Use of model literals for video and image models for IDE autocomplete
(#114)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants