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
fix(team): surface budget_reset_at on /team/info and cloned member budgets
Ryan Crabbeac453c958ed4
diff --git a/litellm/proxy/_types.py b/litellm/proxy/_types.pyindex 84a9c4b7931..f11b29103be 100644--- a/litellm/proxy/_types.py+++ b/litellm/proxy/_types.py@@ -3907,7 +3907,7 @@ class OrganizationMemberUpdateResponse(MemberUpdateResponse):class TeamInfoResponseObjectTeamTable(LiteLLM_TeamTable):- team_member_budget_table: Optional[LiteLLM_BudgetTable] = None+ team_member_budget_table: Optional[LiteLLM_BudgetTableFull] = None# Resources inherited from access groups (separate from direct assignments)access_group_models: Optional[List[str]] = Noneaccess_group_mcp_server_ids: Optional[List[str]] = Nonediff --git a/litellm/proxy/management_helpers/utils.py b/litellm/proxy/management_helpers/utils.pyindex 5cf53ae06f5..f2d6e9612ff 100644--- a/litellm/proxy/management_helpers/utils.py+++ b/litellm/proxy/management_helpers/utils.py@@ -9,6 +9,7 @@ from fastapi import HTTPException, Requestimport litellmfrom litellm._logging import verbose_loggerfrom litellm._uuid import uuid+from litellm.proxy.common_utils.timezone_utils import get_budget_reset_timefrom litellm.proxy._types import ( # key request types; user request types; team request types; customer request typesBudgetNewRequest,DeleteCustomerRequest,@@ -192,6 +193,13 @@ async def _clone_team_default_budget_for_member(continuecloned_data[field] = value+ # Start the member's budget window at clone time, not the pool's reset+ # timestamp — otherwise a member joining mid-cycle inherits a stale reset.+ if cloned_data.get("budget_duration"):+ cloned_data["budget_reset_at"] = get_budget_reset_time(+ cloned_data["budget_duration"]+ )+new_budget = await prisma_client.db.litellm_budgettable.create(data=cloned_data)return new_budget.budget_id