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
can_user_call_model (#10170)
Ishaan Jaff7c3df984da8e
diff --git a/litellm/proxy/auth/auth_checks.py b/litellm/proxy/auth/auth_checks.pyindex bf8fd2350e9..653455b2886 100644--- a/litellm/proxy/auth/auth_checks.py+++ b/litellm/proxy/auth/auth_checks.py@@ -88,7 +88,7 @@ async def common_checks(9. Check if request body is safe10. [OPTIONAL] Organization checks - is user_object.organization_id is set, run these checks"""- _model = request_body.get("model", None)+ _model: Optional[str] = cast(Optional[str], request_body.get("model", None))# 1. If team is blockedif team_object is not None and team_object.blocked is True:@@ -112,7 +112,7 @@ async def common_checks()## 2.1 If user can call model (if personal key)- if team_object is None and user_object is not None:+ if _model and team_object is None and user_object is not None:await can_user_call_model(model=_model,llm_router=llm_router,