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
Trim verbose comments and docstrings
Michael Riad Zaky04687ba48e70
diff --git a/litellm/proxy/auth/auth_checks.py b/litellm/proxy/auth/auth_checks.pyindex ebf83c22262..4d19fb2e352 100644--- a/litellm/proxy/auth/auth_checks.py+++ b/litellm/proxy/auth/auth_checks.py@@ -3289,9 +3289,6 @@ async def _check_team_member_budget(# Per-member override wins; otherwise fall back to the team-level# default configured via team.metadata["team_member_budget_id"].- # A per-member row whose max_budget is NULL is *not* an override -- # it can result from cloning a team default that itself had no cap- # at member-add time. Treat it as "no override" and fall through.team_member_budget: Optional[float] = Noneif (team_membership is not Nonediff --git a/tests/test_litellm/proxy/auth/test_auth_checks.py b/tests/test_litellm/proxy/auth/test_auth_checks.pyindex e7a3e4bcacb..841b45cef82 100644--- a/tests/test_litellm/proxy/auth/test_auth_checks.py+++ b/tests/test_litellm/proxy/auth/test_auth_checks.py@@ -2340,14 +2340,7 @@ async def test_team_member_budget_check_per_member_override_wins_over_team_defau@pytest.mark.asyncioasync def test_team_member_budget_check_null_clone_falls_back_to_team_default():- """A per-member budget row with max_budget=NULL is not an explicit- no-cap override - it can be the result of cloning a team default that- had no value at member-add time. Enforcement must fall through to the- team default and apply that cap.-- Pre-fix: NULL on the clone short-circuited the comparison block- (team_member_budget = None -> if not None: skipped) so the user- spent unbounded against an apparent $65/$X cap."""+ """Per-member NULL max_budget falls through to the team default cap."""from litellm.caching.dual_cache import DualCachefrom litellm.proxy._types import LiteLLM_BudgetTable, LiteLLM_TeamMembershipfrom litellm.proxy.utils import ProxyLogging@@ -2415,10 +2408,7 @@ async def test_team_member_budget_check_null_clone_falls_back_to_team_default():@pytest.mark.asyncioasync def test_team_member_budget_check_null_clone_with_null_default_skips_enforcement():- """Sanity check: when both the per-member clone AND the team default- have max_budget=NULL, enforcement still skips (the team genuinely has- no cap configured). Confirms the NULL-fall-through is defensive, not- overzealous."""+ """When per-member and team default are both NULL, enforcement still skips."""from litellm.caching.dual_cache import DualCachefrom litellm.proxy._types import LiteLLM_BudgetTable, LiteLLM_TeamMembershipfrom litellm.proxy.utils import ProxyLogging