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): register the Redis timeout deployments through /model/new
Kerry Lu2e4461ec4587
diff --git a/tests/e2e/gateway/redis_timeout_ci_config.yml b/tests/e2e/gateway/redis_timeout_ci_config.ymlindex 375a51f6127..9bcf65162d6 100644--- a/tests/e2e/gateway/redis_timeout_ci_config.yml+++ b/tests/e2e/gateway/redis_timeout_ci_config.yml@@ -17,15 +17,3 @@ router_settings:fallbacks:- redis-timeout-primary:- redis-timeout-backup--model_list:- - model_name: redis-timeout-primary- litellm_params:- model: openai/gpt-5-mini- api_key: sk-redis-timeout-primary-not-used- api_base: http://127.0.0.1:1- - model_name: redis-timeout-backup- litellm_params:- model: openai/gpt-5-mini- api_key: sk-redis-timeout-backup-not-used- mock_response: "ok"diff --git a/tests/e2e/router/test_redis_timeout_e2e.py b/tests/e2e/router/test_redis_timeout_e2e.pyindex e99bd2fbe80..58d10f1d8ea 100644--- a/tests/e2e/router/test_redis_timeout_e2e.py+++ b/tests/e2e/router/test_redis_timeout_e2e.py@@ -4,8 +4,8 @@ Runs only against a proxy booted from tests/e2e/gateway/redis_timeout_ci_config.points cache_params at a real Redis with socket_timeout 0.001. The test holds that Redis inCLIENT PAUSE WRITE for its duration, so every write the proxy sends, the spend counter incrementincluded, hangs past the timeout, and it proves the degradation was real from the breaker metrics on /metrics: fresh timeouts, a breaker transition,-or an already-open breaker rejecting every call, which is the state a customer's worker sits in. Each request fails its primary deployment, whose api_base is a closed-port, retries, falls back to the backup and succeeds, so it carries retry breadcrumbs; its cost+or an already-open breaker rejecting every call, which is the state a customer's worker sits in. The test registers two deployments through /model/new: a primary whose api_base is a closed port+and a backup that answers with a mock. Each request fails the primary, retries, falls back and succeeds, so it carries retry breadcrumbs; its costtracking then fails on the spend counter increment and stringifies the request metadata into afailed-tracking alert. On v1.100.0 that string doubled per request until the worker hung(LIT-6780). Deselected unless E2E_REDIS_TIMEOUT is set, since it needs that dedicated proxy.@@ -26,7 +26,7 @@ from complexity_router_client import ComplexityRouterClientfrom e2e_config import unique_markerfrom e2e_http import NoBody, Result, Successfrom lifecycle import ResourceManager-from models import ChatBody, ChatMessage, ChatResponse, KeyGenerateBody+from models import ChatBody, ChatMessage, ChatResponse, KeyGenerateBody, LiteLLMParamsBodyfrom proxy_client import ProxyClientfrom pydantic import BaseModel@@ -34,6 +34,8 @@ pytestmark = [pytest.mark.e2e, pytest.mark.redis_timeout]PRIMARY_MODEL: Final = "redis-timeout-primary"BACKUP_MODEL: Final = "redis-timeout-backup"+BACKING_MODEL: Final = "openai/gpt-5-mini"+CLOSED_PORT_API_BASE: Final = "http://127.0.0.1:1"REQUESTS: Final = 20MAX_SECONDS_PER_REQUEST: Final = 10.0MAX_LATENCY_GROWTH_RATIO: Final = 3.0@@ -134,6 +136,18 @@ class TestRedisTimeout:self, client: ComplexityRouterClient, resources: ResourceManager, endpoint: Endpoint, paused_redis: None) -> None:proxy = client.proxy+ primary_id = proxy.create_model(+ PRIMARY_MODEL,+ LiteLLMParamsBody(+ model=BACKING_MODEL, api_key="sk-redis-timeout-primary-not-used", api_base=CLOSED_PORT_API_BASE+ ),+ )+ resources.defer(lambda: proxy.delete_model(primary_id))+ backup_id = proxy.create_model(+ BACKUP_MODEL,+ LiteLLMParamsBody(model=BACKING_MODEL, api_key="sk-redis-timeout-backup-not-used", mock_response="ok"),+ )+ resources.defer(lambda: proxy.delete_model(backup_id))timeouts_before = _metric(proxy, TIMEOUT_FAILURES_RE)transitions_before = _metric(proxy, BREAKER_TRANSITIONS_RE)key = proxy.generate_key(