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] Resolve mypy errors in key_management_endpoints.py
yuneng-jiangc2b8ba8b1ba0
diff --git a/litellm/proxy/_types.py b/litellm/proxy/_types.pyindex 9e86680e355..f5568757a22 100644--- a/litellm/proxy/_types.py+++ b/litellm/proxy/_types.py@@ -2955,7 +2955,7 @@ class LiteLLM_ErrorLogs(LiteLLMPydanticObjectBase):endTime: Union[str, datetime, None]-AUDIT_ACTIONS = Literal["created", "updated", "deleted", "blocked", "rotated"]+AUDIT_ACTIONS = Literal["created", "updated", "deleted", "blocked", "unblocked", "rotated"]class LiteLLM_AuditLogs(LiteLLMPydanticObjectBase):diff --git a/litellm/proxy/management_endpoints/key_management_endpoints.py b/litellm/proxy/management_endpoints/key_management_endpoints.pyindex 7be1a5a5e0c..5e573d0bbe2 100644--- a/litellm/proxy/management_endpoints/key_management_endpoints.py+++ b/litellm/proxy/management_endpoints/key_management_endpoints.py@@ -2150,6 +2150,8 @@ async def update_key_fn()_data = {**non_default_values, "token": key}+ if prisma_client is None:+ raise Exception("Not connected to DB!")response = await prisma_client.update_data(token=key, data=_data)# Delete - key from cache, since it's been updated!