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
refactor(types): move MemberDeleteRequest into litellm.types.proxy.management_endpoints.team_endpoints (#45814)
nate-berri2011004d0adf
diff --git a/litellm/proxy/_types.py b/litellm/proxy/_types.pyindex f43ce4dc211..4abb93454c7 100644--- a/litellm/proxy/_types.py+++ b/litellm/proxy/_types.py@@ -4370,16 +4370,9 @@ class OrganizationAddMemberResponse(LiteLLMPydanticObjectBase):updated_organization_memberships: list[LiteLLM_OrganizationMembershipTable]-class MemberDeleteRequest(LiteLLMPydanticObjectBase):- user_id: str | None = None- user_email: str | None = None-- @model_validator(mode="before")- @classmethod- def check_user_info(cls, values: Mapping[str, object]) -> Mapping[str, object]:- if values.get("user_id") is None and values.get("user_email") is None:- raise ValueError("Either user id or user email must be provided")- return values+from litellm.types.proxy.management_endpoints.team_endpoints import ( # noqa: E402 # re-export after the definitions above+ MemberDeleteRequest as MemberDeleteRequest, # noqa: PLC0414 # public re-export+)class MemberUpdateResponse(LiteLLMPydanticObjectBase):diff --git a/litellm/types/proxy/management_endpoints/team_endpoints.py b/litellm/types/proxy/management_endpoints/team_endpoints.pyindex 796bcae37bc..065205dcad8 100644--- a/litellm/types/proxy/management_endpoints/team_endpoints.py+++ b/litellm/types/proxy/management_endpoints/team_endpoints.py@@ -1,16 +1,15 @@+from collections.abc import Mappingfrom typing import Any, Final, Literalfrom pydantic import ConfigDict, Field, field_validator, model_validatorfrom litellm.models.team import LiteLLM_DeletedTeamTable, LiteLLM_TeamTable, Memberfrom litellm.models.team_membership import LiteLLM_TeamMembership-from litellm.proxy._types import (- KeyManagementRoutes,- MemberDeleteRequest,-)from litellm.proxy.common_utils.timezone_utils import budget_duration_errorfrom litellm.types.llms.base import LiteLLMBaseModel+from litellm.types.proxy.auth.user_roles import KeyManagementRoutesfrom litellm.types.proxy.management_endpoints.management_v1 import ResourceResponse+from litellm.types.utils import LiteLLMPydanticObjectBaseTeamIdSearchMatch = Literal["exact", "prefix"]@@ -19,6 +18,18 @@ MAX_BULK_TEAM_MEMBER_DELETES: Final = 500MAX_BULK_TEAM_MEMBER_BUDGET_UPDATES: Final = 500+class MemberDeleteRequest(LiteLLMPydanticObjectBase):+ user_id: str | None = None+ user_email: str | None = None++ @model_validator(mode="before")+ @classmethod+ def check_user_info(cls, values: Mapping[str, object]) -> Mapping[str, object]:+ if values.get("user_id") is None and values.get("user_email") is None:+ raise ValueError("Either user id or user email must be provided")+ return values++class GetTeamMemberPermissionsRequest(LiteLLMBaseModel):"""Request to get the team member permissions for a team"""