|
1 | 1 | # Changelog |
2 | 2 |
|
3 | 3 | ## [Unreleased] |
| 4 | + |
| 5 | +## [v1.6.0](https://github.com/xai-org/xai-sdk-python/releases/tag/v1.6.0) - 2026-01-27 |
| 6 | +### Added |
| 7 | +- **Batch API**: Added new `client.batch` sub-client for interacting with the Batch API: |
| 8 | + - Ability to create, manage, and retrieve batch jobs |
| 9 | + - Integration with existing chat objects when adding requests to a batch |
| 10 | + - New optional `batch_request_id` field in `chat.create` method |
| 11 | +- **Developer Role**: Added `developer` role support for chat messages with `developer()` utility function |
| 12 | +- **Tool Call ID Field**: Added `tool_call_id` field and argument to `tool_result` utility function for explicit tool call identification |
| 13 | +- **User Location for Web Search**: Added user-location support to `web_search()` server-side tool with new location-related arguments |
| 14 | + |
| 15 | +### Changed |
| 16 | +- **Telemetry Improvements**: |
| 17 | + - Updated chat spans to be compliant with latest OpenTelemetry `gen_ai` semantic conventions |
| 18 | + - Now emits `xai` under `gen_ai.provider.name` field instead of `gen_ai.system` |
| 19 | + - Added `server.address` attribute set to `api.x.ai` |
| 20 | + - Added instrumentation for Files API methods (`upload`, `delete`) |
| 21 | + - Added instrumentation for Collections API methods (`create`, `update`, `delete`, `upload_document`, `add_existing_document`, `remove_document`, `update_document`) |
| 22 | + |
| 23 | +## [v1.5.0](https://github.com/xai-org/xai-sdk-python/releases/tag/v1.5.0) - 2025-12-04 |
| 24 | +### Added |
| 25 | +- **Server-Side Tool Output Utilities**: Added utility functions to retrieve server-side tool call outputs from responses |
| 26 | +- **Collections API Enhancements**: |
| 27 | + - Added `field_definitions` parameter to `collections.create()` enabling custom document metadata schemas with validation constraints (`required`, `unique`, `inject_into_chunk`) |
| 28 | + - Added `metric_space` parameter to `collections.create()` supporting HNSW distance metrics (`cosine`, `euclidean`, `inner_product`) |
| 29 | + - Added `filter` parameter to `collections.list()` with support for filtering by `collection_name`, `created_at`, and `documents_count` |
| 30 | + - Added `wait_for_indexing` parameter to document upload with customizable `poll_interval` and `timeout` |
| 31 | + - Added `instructions` and `retrieval_mode` parameters to `collections.search()` |
| 32 | + - Implemented dict-based `TypedDict` interfaces as ergonomic alternatives to protobuf objects |
| 33 | +- **Inline Citations**: Added property methods for convenient access to inline citations on responses for both streaming and unary responses |
| 34 | + - Added `end_index` field for `InlineCitation` |
| 35 | +- **Verbose Streaming**: Added `verbose_streaming` to include options for streaming responses |
| 36 | + |
| 37 | +### Changed |
| 38 | +- Renamed built-in document search tool to "attachment search" for clarity |
| 39 | +- Collections `upload_document` now streams bytes via the Files `UploadFile` endpoint, then attaches the resulting file to the collection |
| 40 | + |
| 41 | +### Removed |
| 42 | +- **Breaking Change**: The `content_type` parameter was removed from the public `collections.upload_document` function |
| 43 | + |
| 44 | +## [v1.4.1](https://github.com/xai-org/xai-sdk-python/releases/tag/v1.4.1) - 2025-11-26 |
4 | 45 | ### Added |
5 | 46 | - **Tool Call Status Tracking**: Added status field to tool call entries in chat response outputs for tracking tool execution progress |
6 | 47 | - Tool call messages now include a status field indicating the current state of the tool call |
7 | 48 | - Multiple entries for the same tool call can now represent different stages (in progress, success, failure) |
8 | 49 | - Enables real-time tracking of server-side tool execution lifecycle |
9 | 50 | - **Batch File Upload**: Added `batch_upload` method to both sync and async file clients for concurrent uploads of multiple files with progress tracking |
| 51 | +- **Max Turns Parameter**: Added `max_turns` parameter to `chat.create` for configuring the maximum number of agentic turns when using server-side tools |
| 52 | +- **Include Field**: Added `include` field to chat requests allowing users to specify optional outputs to be returned (e.g., tool output, inline citations) |
| 53 | +- **Inline Citations**: Added `InlineCitation` support for agentic search outputs |
| 54 | +- **Model Literals**: Introduced `Model` literals for type-safe model specification and editor autocomplete support |
10 | 55 |
|
11 | 56 | ### Changed |
12 | | -- Updates or modifications to existing features. |
13 | | - |
14 | | -### Fixed |
15 | | -- Bug fixes. |
16 | | - |
17 | | -### Removed |
18 | | -- Features or functionalities that have been removed. |
| 57 | +- Reorganized existing literals into the `types` folder for better organization |
| 58 | +- Updated gRPC metadata to include the language (Python) alongside SDK version |
19 | 59 |
|
20 | 60 | ## [v1.4.0](https://github.com/xai-org/xai-sdk-python/releases/tag/v1.4.0) - 2025-11-07 |
21 | 61 | ### Added |
|
0 commit comments