litellm/tests/batches_tests
Mateo Wang 6a9f542f81
test: stabilize batch VCR coverage and stop live upload/network leaks (#29477)
* test: stabilize batch VCR coverage

* test: replay bedrock batch s3 uploads

* test: stop batch tests leaking live uploads

* test: keep bedrock batch workflow off live s3

* test: mock bedrock batch workflow network

* test: accept realtime guardrail refusal wording

* test: update gemini thought signature model

* test: quiet logging worker atexit flush

* test: address Greptile review on batch VCR fixes

Handle content= bodies in the bedrock batch post stub so payload
extraction does not raise a TypeError when a request omits json and
data. Restore litellm list state faithfully by preserving None instead
of coercing it to an empty list, so callbacks that start as None are not
turned into [] after a test. Set logging.raiseExceptions inside the try
block in the atexit flush so the finally always restores the previous
value.

* test: scope atexit logging suppression to the drain loop

Wrap only the queue drain loop in LoggingWorker._flush_on_exit with the
logging.raiseExceptions toggle so the process-wide global is suppressed for
the smallest possible window, keeping other threads' logging error reporting
intact outside the loop.

* test: cover atexit flush error-swallow branch in LoggingWorker

The _flush_on_exit drain loop was wrapped in a try/finally to scope the
logging.raiseExceptions toggle, which reindented the existing edge-case
branches into the diff and dropped patch coverage below target. Add a
regression test that enqueues a coroutine which raises during the atexit
flush and asserts the failure is swallowed while later queued events are
still drained, exercising the silent-failure path directly.
2026-06-02 16:11:52 -07:00
..
batch_job_results_furniture.jsonl (feat) Add cost tracking for /batches requests OpenAI (#7384) 2024-12-23 17:47:26 -08:00
bedrock_batch_completions.jsonl test fix us.anthropic.claude-haiku-4-5-20251001-v1:0 (#24931) 2026-04-01 11:01:03 -07:00
conftest.py test: stabilize batch VCR coverage and stop live upload/network leaks (#29477) 2026-06-02 16:11:52 -07:00
openai_batch_completions.jsonl (feat) Add cost tracking for /batches requests OpenAI (#7384) 2024-12-23 17:47:26 -08:00
pathrise-convert-1606954137718.json use pathrise-convert-1606954137718 2025-01-05 14:14:43 -08:00
test_batch_custom_pricing.py feat(openai): apply regional-processing cost uplift for EU/US data residency (#28626) 2026-05-25 20:36:14 -07:00
test_batch_rate_limits.py test: stabilize batch VCR coverage and stop live upload/network leaks (#29477) 2026-06-02 16:11:52 -07:00
test_batches_logging_unit_tests.py chore(ci): modernize model references in tests and configs (#27856) 2026-05-15 15:44:28 -07:00
test_bedrock_files_and_batches.py test: stabilize batch VCR coverage and stop live upload/network leaks (#29477) 2026-06-02 16:11:52 -07:00
test_fine_tuning_api.py [Fix] Fine-Tuning Test: Bump Off Deprecated gpt-3.5-turbo-0125 2026-05-07 14:41:58 -07:00
test_hosted_vllm_batches_and_files.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_manus_files_all_methods.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_openai_batches_and_files.py test: stabilize batch VCR coverage and stop live upload/network leaks (#29477) 2026-06-02 16:11:52 -07:00
vertex_batch_completions.jsonl (feat) Add cost tracking for /batches requests OpenAI (#7384) 2024-12-23 17:47:26 -08:00