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
Update litellm/proxy/utils.py
Harshit Jain2c654bd7dd34
diff --git a/litellm/proxy/utils.py b/litellm/proxy/utils.pyindex f7e32869a23..bb95b98da66 100644--- a/litellm/proxy/utils.py+++ b/litellm/proxy/utils.py@@ -2054,9 +2054,10 @@ async def _lookup_deprecated_key(# Check cache firstcached = _deprecated_key_cache.get(hashed_token)+ cached = _deprecated_key_cache.get(hashed_token)if cached is not None:- active_token_id, cache_expires_at_ts = cached- if now_ts < cache_expires_at_ts:+ active_token_id, cache_expires_at_ts, revoke_at_ts = cached+ if now_ts < cache_expires_at_ts and now_ts < revoke_at_ts:return active_token_idelse:_deprecated_key_cache.pop(hashed_token, None)