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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix(e2e): poll for both spend rows before asserting the cache-hit contract (#34968)
ryan-crabbe-berri01ffd1296b1f
diff --git a/tests/e2e/quota_management/spend_tracking/test_spend_tracking_e2e.py b/tests/e2e/quota_management/spend_tracking/test_spend_tracking_e2e.pyindex b6e33627a5e..6a0032981fd 100644--- a/tests/e2e/quota_management/spend_tracking/test_spend_tracking_e2e.py+++ b/tests/e2e/quota_management/spend_tracking/test_spend_tracking_e2e.py@@ -230,7 +230,9 @@ def test_cache_hit_is_zero_cost_and_suffixed(_ = unwrap(client.chat(scoped_key, "gemini-2.5-flash", prompt, max_tokens=16))rows = client.poll_logs_for_key(- scoped_key, predicate=lambda rs: any(r.cache_hit == "True" for r in rs)+ scoped_key,+ predicate=lambda rs: any(r.cache_hit == "True" for r in rs)+ and any(r.cache_hit != "True" for r in rs),)cache_row = _require_row(rows,