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): annotate user request metadata and check_user_info validators (#45808)
nate-berria859d844edab
diff --git a/litellm/proxy/_types.py b/litellm/proxy/_types.pyindex 64bb4157f4a..f60f0ddce8d 100644--- a/litellm/proxy/_types.py+++ b/litellm/proxy/_types.py@@ -1905,7 +1905,7 @@ class UpdateUserRequestNoUserIDorEmail(GenerateRequestBase): # shared with Bulk# repr=False keeps the plaintext out of management-endpoint alerts, which str() the request modelpassword: str | None = Field(default=None, repr=False)spend: float | None = None- metadata: dict | None = None+ metadata: dict[object, object] | None = Noneuser_alias: str | None = Noneuser_role: (Literal[@@ -1927,7 +1927,7 @@ class UpdateUserRequest(UpdateUserRequestNoUserIDorEmail):@model_validator(mode="before")@classmethod- def check_user_info(cls, values):+ 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@@ -4588,7 +4588,7 @@ class MemberDeleteRequest(LiteLLMPydanticObjectBase):@model_validator(mode="before")@classmethod- def check_user_info(cls, values):+ 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