Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

test(batches): pin the poller against retiring zero-count completed batches

mateo-berrib0d485568b6d
diff --git a/tests/proxy_unit_tests/test_check_batch_cost.py b/tests/proxy_unit_tests/test_check_batch_cost.py
index a1864c5e480..b4fe9347581 100644
--- a/tests/proxy_unit_tests/test_check_batch_cost.py
+++ b/tests/proxy_unit_tests/test_check_batch_cost.py
@@ -1113,8 +1113,12 @@ class TestCheckBatchCost:
@pytest.mark.asyncio
@pytest.mark.parametrize(
"request_counts",
- [MagicMock(completed=7, failed=0, total=7), None],
- ids=["lagging_output_id", "unknown_counts"],
+ [
+ MagicMock(completed=7, failed=0, total=7),
+ None,
+ MagicMock(completed=0, failed=0, total=0),
+ ],
+ ids=["lagging_output_id", "unknown_counts", "synthesized_zero_counts"],
)
async def test_completed_with_lagging_output_file_left_for_next_cycle(
self,