feat: add prepare_extension() for batch video extension#141
Open
feat: add prepare_extension() for batch video extension#141
Conversation
71f8766 to
bd254a7
Compare
Add prepare_extension() method to both async and sync video clients for preparing video extension requests for the Batch API. Also updates README and CHANGELOG with batch video extension docs.
…ADME - Regenerate batch proto files to include video_extension_request field (oneof field 5) in BatchRequest message - Add status filter to ListBatchRequestMetadataRequest - Revert README batch video extension section (no other batch request types are documented in the README)
46a7274 to
274f3dd
Compare
The regenerated batch_pb2.py used flat proto paths (batch.proto, chat.proto) from the proxy proto structure, but the SDK expects namespaced paths (xai/api/v1/batch.proto). This caused AttributeError on import because batch_pb2 tried to access chat_types_pb2 and chat_bidi_v2_pb2 from chat_pb2, which don't exist in the SDK. Fixed by patching the serialized descriptor to use xai/api/v1/ paths and removing the spurious chat_types/chat_bidi_v2 imports from both batch_pb2.py and batch_pb2.pyi.
bijoybangladeshmsd-cyber
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
prepare_extension()method to both async and sync video clients for preparing video extension requests for the Batch API.This enables users to prepare
/video/extendrequests for batch processing via:client.video.prepare_extension()(async)client.video.prepare_extension()(sync)Changes
src/xai_sdk/aio/video.py: Addedprepare_extension()to async video clientsrc/xai_sdk/sync/video.py: Addedprepare_extension()to sync video clientsrc/xai_sdk/proto/v{5,6}/batch_pb2*: Regenerated batch proto withvideo_extension_requestoneof fieldCHANGELOG.md: Added entry under[Unreleased]