Skip to content

fix: tighten file upload consistency#144

Open
MukundaKatta wants to merge 1 commit into
xai-org:mainfrom
MukundaKatta:codex/xai-sdk-file-upload-consistency
Open

fix: tighten file upload consistency#144
MukundaKatta wants to merge 1 commit into
xai-org:mainfrom
MukundaKatta:codex/xai-sdk-file-upload-consistency

Conversation

@MukundaKatta
Copy link
Copy Markdown

Summary

  • Align async file upload telemetry with sync upload by emitting file.name instead of file.filename
  • Validate sync and async batch_upload reject batch_size < 1 before creating workers/semaphores
  • Add sync and async regression tests for invalid batch sizes and update the async telemetry assertion

Tests

  • uv run pytest tests/aio/files_test.py -q
  • uv run pytest tests/sync/files_test.py tests/aio/files_test.py -q
  • uv run ruff check src/xai_sdk/sync/files.py src/xai_sdk/aio/files.py tests/sync/files_test.py tests/aio/files_test.py

@MukundaKatta MukundaKatta requested a review from a team as a code owner May 15, 2026 14:53
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.

1 participant