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
test(e2e): name the tpm window deadline's latency margin
mateo-berri9f55925c31b6
diff --git a/tests/e2e/quota_management/ratelimit/test_rate_limit_e2e.py b/tests/e2e/quota_management/ratelimit/test_rate_limit_e2e.pyindex a6e35c5f3d5..c326f5019a3 100644--- a/tests/e2e/quota_management/ratelimit/test_rate_limit_e2e.py+++ b/tests/e2e/quota_management/ratelimit/test_rate_limit_e2e.py@@ -51,6 +51,7 @@ CHAT_MAX_TOKENS = 16RESERVATION_CHARS_PER_TOKEN = 4WINDOW_SECONDS = 60RESET_TOLERANCE_SECONDS = 5+LAST_CALL_LATENCY_MARGIN_SECONDS = 10@dataclass(frozen=True, slots=True)@@ -159,7 +160,7 @@ class TestKeyRateLimits:assert info.tpm_limit == TPM_LIMIT, f"/key/info reports tpm_limit {info.tpm_limit}, configured {TPM_LIMIT}"first = _first_ok(client, key)- window_deadline = first.sent_at + WINDOW_SECONDS - 10+ window_deadline = first.sent_at + WINDOW_SECONDS - LAST_CALL_LATENCY_MARGIN_SECONDSspent = _total_tokens(first.response)while spent < TPM_LIMIT: