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 linting

Michael Riad Zaky46336b1ac34c
diff --git a/litellm/proxy/auth/auth_checks.py b/litellm/proxy/auth/auth_checks.py
index 1c89b0bfc03..840f64cfede 100644
--- a/litellm/proxy/auth/auth_checks.py
+++ b/litellm/proxy/auth/auth_checks.py
@@ -3290,10 +3290,15 @@ 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"].
team_member_budget: Optional[float] = None
- if team_membership is not None and team_membership.litellm_budget_table is not None:
+ if (
+ team_membership is not None
+ and team_membership.litellm_budget_table is not None
+ ):
team_member_budget = team_membership.litellm_budget_table.max_budget
else:
- default_budget_id = (team_object.metadata or {}).get("team_member_budget_id")
+ default_budget_id = (team_object.metadata or {}).get(
+ "team_member_budget_id"
+ )
if isinstance(default_budget_id, str):
default_budget = await get_team_member_default_budget(
budget_id=default_budget_id,
diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py
index 546d8df14c9..dafc496ccc0 100644
--- a/litellm/proxy/proxy_server.py
+++ b/litellm/proxy/proxy_server.py
@@ -2009,9 +2009,7 @@ async def _init_and_increment_spend_counter(
key=counter_key, value=base_spend
)
- await spend_counter_cache.async_increment_cache(
- key=counter_key, value=increment
- )
+ await spend_counter_cache.async_increment_cache(key=counter_key, value=increment)
async def update_cache( # noqa: PLR0915