Skip to content

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]

fix team_member_add

Ishaan Jaff03c65c889a64
diff --git a/litellm/proxy/management_endpoints/team_endpoints.py b/litellm/proxy/management_endpoints/team_endpoints.py
index d3c2e3e839b..614f37f4449 100644
--- a/litellm/proxy/management_endpoints/team_endpoints.py
+++ b/litellm/proxy/management_endpoints/team_endpoints.py
@@ -479,7 +479,8 @@ async def team_member_add(
## CHECK IF USER IS PROXY ADMIN OR TEAM ADMIN
if (
- user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN.value
+ hasattr(user_api_key_dict, "user_role")
+ and user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN.value
and not _is_user_team_admin(
user_api_key_dict=user_api_key_dict, team_obj=complete_team_data
)