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
docs(router): name both affinity TTL knobs in the _claim_pin docstring (#40663)
Anmol Jaiswaldfab4794ecd4
diff --git a/litellm/router_utils/pre_call_checks/deployment_affinity_check.py b/litellm/router_utils/pre_call_checks/deployment_affinity_check.pyindex 6f3ea8eb78a..c7eb46046ef 100644--- a/litellm/router_utils/pre_call_checks/deployment_affinity_check.py+++ b/litellm/router_utils/pre_call_checks/deployment_affinity_check.py@@ -349,7 +349,9 @@ class DeploymentAffinityCheck(CustomLogger):first write instead of the last. Re-claiming with the stored value refreshes itsTTL, the same keepalive the complexity router's model pin documents: an activesession must not lose its pin mid-conversation just because it outlives the- original write, so `session_affinity_ttl_seconds` bounds idle time, not total+ original write, so the affinity TTL (the Router's+ `deployment_affinity_ttl_seconds`, or a pre-routing hook's per-request+ `session_affinity_ttl_seconds` override) bounds idle time, not totalsession length. On Redis one Lua script does the get-or-set-or-refreshatomically (same registration seam the rate limiters use) and the in-memorytier is synchronized to the winner; without Redis, and whenever Redis is