mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-05 01:59:27 +00:00
* fix(batches): leave unmanaged batch billing to a cost poller that bills it
With track_unmanaged_batch_cost on, GET /v1/batches/{raw_id} now defers the
batch's cost to the CheckBatchCost poller whenever the poller can route that
batch, so the creator is billed instead of whichever key polls. The poller also
marks a finished unmanaged batch it will never cost as processed, so it stops
reloading the row every cycle.
* fix(batches): keep an unmanaged batch with the cost poller until it bills it
* fix(batches): show an ended unmanaged batch's status in the batch list while the cost poller still bills it
The retrieve hook skipped the whole row write for a cancelled, expired or failed
unmanaged batch the poller owns, so GET /v1/batches kept the old status until the
next poll. It now writes file_object and keeps only the status column the poll
query filters on
* fix(batches): set aside an unmanaged batch the cost poller never bills, whatever its saved status
* fix(batches): leave unmanaged batch rows unwritten while cost tracking is off
With track_unmanaged_batch_cost off, both poll queries now select only rows whose unified_object_id starts with the base64 of the managed id prefix, so the poller no longer loads or retires unmanaged batch rows. Turning the flag on later picks those rows up and bills them
The persisted retire now covers only rows that can never be costed. That is a managed id with no model id and, with the flag on, an unmanaged row whose input file names no model
* fix(batches): leave an old unfinished unmanaged batch and one whose own deployment left the router to the status check
|
||
|---|---|---|
| .. | ||
| auth | ||
| guardrails | ||
| hooks | ||
| management_endpoints | ||
| __init__.py | ||
| test_afile_retrieve_returns_unified_id.py | ||
| test_audit_logging_endpoints.py | ||
| test_batch_retrieve_input_file_id.py | ||
| test_batch_retrieve_registers_missing_output_file_id.py | ||
| test_batch_retrieve_returns_unified_input_file_id.py | ||
| test_batch_update_db_managed_output_file_id.py | ||
| test_deleted_file_returns_403_not_404.py | ||
| test_enterprise_routes.py | ||
| test_file_deletion_blocking.py | ||
| test_liteadmin.py | ||
| test_managed_files_access_check.py | ||
| test_managed_files_hook.py | ||