litellm/tests/unit/enterprise/proxy
Mateo Wang 86720945b4
fix(batches): leave unmanaged batch billing to a cost poller that bills it (#55632)
* 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
2026-12-04 13:40:45 -08:00
..
auth feat(auth): decide key and JWT authentication in a Rust core (#51374) 2026-11-17 14:07:47 +09:00
guardrails Return configured guardrail native findings (#49217) (#49460) 2026-10-31 23:37:45 +00:00
hooks fix(batches): leave unmanaged batch billing to a cost poller that bills it (#55632) 2026-12-04 13:40:45 -08:00
management_endpoints fix(projects): /project/update no longer 500s on a shared budget with list budget_limits (#56316) 2026-12-04 20:07:01 +00:00
__init__.py
test_afile_retrieve_returns_unified_id.py refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00
test_audit_logging_endpoints.py refactor(auth_cache): type auth cache keys and keep the cache always native (#51130) 2026-11-21 17:20:30 +09:00
test_batch_retrieve_input_file_id.py refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
test_batch_retrieve_registers_missing_output_file_id.py fix(proxy): save file details for every batch output file so they list and retrieve (#41761) 2026-10-08 18:51:45 -07:00
test_batch_retrieve_returns_unified_input_file_id.py
test_batch_update_db_managed_output_file_id.py refactor(auth_cache): type auth cache keys and keep the cache always native (#51130) 2026-11-21 17:20:30 +09:00
test_deleted_file_returns_403_not_404.py refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00
test_enterprise_routes.py
test_file_deletion_blocking.py fix(batches): stop unbillable batches from blocking file deletes and new-batch polling (#48752) 2026-10-28 12:19:36 -07:00
test_liteadmin.py feat(enterprise): bundle LiteAdmin Slack with native gateway login (#44444) 2026-10-03 17:28:18 -07:00
test_managed_files_access_check.py refactor(router): move router callers onto the entry points and invert the proxy imports (#48847) 2026-10-29 17:26:33 +00:00
test_managed_files_hook.py fix(managed files): keep one downstream copy per litellm_proxy deployment that covers every target it serves (#54181) 2026-11-25 06:07:13 +00:00