mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-18 17:29:47 +00:00
Implements optional idempotency for batch creation using `idem_tok` parameter: * **Core idempotency**: Same token + parameters returns existing batch * **Conflict detection**: Same token + different parameters raises HTTP 409 ConflictError * **Metadata order independence**: Different key ordering doesn't affect idempotency **API changes:** - Add optional `idem_tok` parameter to `create_batch()` method - Enhanced API documentation with idempotency extensions **Implementation:** - Reference provider supports idempotent batch creation - ConflictError for proper HTTP 409 status code mapping - Comprehensive parameter validation **Testing:** - Unit tests: focused tests covering core scenarios with parametrized conflict detection - Integration tests: tests validating real OpenAI client behavior This enables client-side retry safety and prevents duplicate batch creation when using the same idempotency token, following REST API |
||
|---|---|---|
| .. | ||
| advanced_apis | ||
| apis | ||
| building_applications | ||
| concepts | ||
| contributing | ||
| deploying | ||
| distributions | ||
| getting_started | ||
| providers | ||
| references | ||
| conf.py | ||
| index.md | ||