From 1788560aef6e428763a15ac3a33a2390b60309e4 Mon Sep 17 00:00:00 2001 From: mubashir1osmani Date: Thu, 16 Jul 2026 17:11:57 -0700 Subject: [PATCH] refactor(team): derive bulk update response fields from budget patch map Drop the duplicate frozenset allowlist and reuse _MEMBER_BUDGET_PATCH_FIELDS so successful_updates stays in sync with the budget fields the write path applies --- .../proxy/management_endpoints/team_endpoints.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/litellm/proxy/management_endpoints/team_endpoints.py b/litellm/proxy/management_endpoints/team_endpoints.py index 342c356561a..2d1bde52ba1 100644 --- a/litellm/proxy/management_endpoints/team_endpoints.py +++ b/litellm/proxy/management_endpoints/team_endpoints.py @@ -3074,17 +3074,6 @@ async def _apply_team_member_update( ) -_BULK_MEMBER_RESPONSE_FIELDS = frozenset( - { - "max_budget_in_team", - "tpm_limit", - "rpm_limit", - "budget_duration", - "allowed_models", - } -) - - def _successful_member_update_response( *, team_id: str, @@ -3095,7 +3084,7 @@ def _successful_member_update_response( return TeamMemberUpdateResponse( team_id=team_id, user_id=user_id, - **{field: getattr(update_fields, field) for field in _BULK_MEMBER_RESPONSE_FIELDS if field in fields_set}, + **{field: getattr(update_fields, field) for field in _MEMBER_BUDGET_PATCH_FIELDS if field in fields_set}, )