Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: xai-org/xai-sdk-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.8.2
Choose a base ref
...
head repository: xai-org/xai-sdk-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.9.0
Choose a head ref
  • 4 commits
  • 26 files changed
  • 2 contributors

Commits on Mar 17, 2026

  1. feat: add image/video batch support and input_file_id (#112)

    Adds batch API support for image and video generation.
    
    - `image.prepare()` / `video.prepare()` to create batch requests
    - `input_file_id` param on `batch.create()` for JSONL file uploads
    - Typed `image_response` / `video_response` properties on batch results
    - Deduplicates request building via `_make_generate_request` in image
    module
    double-di authored Mar 17, 2026
    Configuration menu
    Copy the full SHA
    618e998 View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2026

  1. Fix unknown status handling in polling loops (#113)

    Fix unknown status handling in polling loops
    - Replace ValueError with warnings.warn for unknown statuses in video
    and collections polling
    - Continue polling instead of crashing when encountering unrecognized
    statuses
    - Add tests for unknown status warning behavior in sync and async video
    clients
    - Update warning messages to be more descriptive
    
    Improve TimeoutError messages with operation context
    - Add optional  parameter to  for descriptive timeout errors
    - Pass context strings from all polling callers (collections, video,
    chat)
    - Round timeout duration to 1 decimal place in error message
    - Update timeout test assertion to check for contextual message
    Omar-V2 authored Mar 18, 2026
    Configuration menu
    Copy the full SHA
    3668037 View commit details
    Browse the repository at this point in the history
  2. Use model type aliases in image and video method signatures (#114)

    - 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
    Omar-V2 authored Mar 18, 2026
    Configuration menu
    Copy the full SHA
    2d4fd45 View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2026

  1. Prepare to release v1.9.0 of the xAI Python SDK (#116)

    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)
    Omar-V2 authored Mar 19, 2026
    Configuration menu
    Copy the full SHA
    c1599fd View commit details
    Browse the repository at this point in the history
Loading