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
latency fix _cache_key_object (#7676)
Ishaan Jaffaf08a0caedf3
diff --git a/litellm/proxy/auth/user_api_key_auth.py b/litellm/proxy/auth/user_api_key_auth.pyindex 38dc7b46731..0c3a87be32f 100644--- a/litellm/proxy/auth/user_api_key_auth.py+++ b/litellm/proxy/auth/user_api_key_auth.py@@ -744,11 +744,13 @@ async def user_api_key_auth( # noqa: PLR0915route=route,start_time=start_time,)- await _cache_key_object(- hashed_token=hash_token(master_key),- user_api_key_obj=_user_api_key_obj,- user_api_key_cache=user_api_key_cache,- proxy_logging_obj=proxy_logging_obj,+ asyncio.create_task(+ _cache_key_object(+ hashed_token=hash_token(master_key),+ user_api_key_obj=_user_api_key_obj,+ user_api_key_cache=user_api_key_cache,+ proxy_logging_obj=proxy_logging_obj,+ ))return _user_api_key_obj