litellm/tests/test_litellm/proxy/openai_files_endpoint
Marty Sullivan ec52858865 fix(batches): only hand accounting to the poller once it can mark batches done
The handoff asked whether the poller was running, when what matters is whether it
will actually account for the batch. Those differ on a schema without the
batch_processed column: the poller cannot filter on it, so it falls back to a
query that excludes complete and completed rows, and it cannot set it either. A
caller retrieving a provider-completed batch before the poller saw it therefore
suppressed inline accounting, then marked the row complete, and the fallback query
could never find it again. Nobody accounted for that batch, so its cost escaped
the caller's budget entirely.

The poller now publishes batch_processed_support_confirmed, set only once a
filtered query has actually succeeded, and the handoff requires it. Defaulting to
unconfirmed keeps accounting on the retrieve path in exactly the cases the poller
would drop the batch, including the window before the poller's first cycle. All
four combinations account exactly once: unconfirmed leaves the retrieve
accounting and setting the marker, whether or not the column exists, and
confirmed is only reachable when the column is present, where the poller accounts
and sets it.

A scheduler that hands back something other than a bound method leaves no poller
to interrogate, which reads as unconfirmed rather than as working.
2026-08-14 01:46:56 -04:00
..
test_files_common_utils.py fix(batches): only hand accounting to the poller once it can mark batches done 2026-08-14 01:46:56 -04:00
test_files_endpoint.py fix(proxy/batches): stop forwarding custom_llm_provider twice in list and cancel (#32813) 2026-08-13 12:50:32 -07:00
test_storage_backend_service.py fix(proxy): skip prisma-dependent hooks when no database is attached 2026-08-08 01:44:56 -07:00