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
fix premium user check for tags on keys (#5826)
Ishaan Jaff39e872c7ebb0
diff --git a/litellm/proxy/management_endpoints/key_management_endpoints.py b/litellm/proxy/management_endpoints/key_management_endpoints.pyindex dd5dc737791..d3c2c942f82 100644--- a/litellm/proxy/management_endpoints/key_management_endpoints.py+++ b/litellm/proxy/management_endpoints/key_management_endpoints.py@@ -209,9 +209,9 @@ async def generate_key_fn(if "tags" in data_json:from litellm.proxy.proxy_server import premium_user- if premium_user is not True:+ if premium_user is not True and data_json["tags"] is not None:raise ValueError(- f"Only premium users can add tags to teams. {CommonProxyErrors.not_premium_user.value}"+ f"Only premium users can add tags to keys. {CommonProxyErrors.not_premium_user.value}")if data_json["metadata"] is None: