fix(proxy): add model_max_budget to NewTeamRequest and UpdateTeamRequest

model_max_budget (per-model budget dict) was missing from both
NewTeamRequest and UpdateTeamRequest. Sending the field via
POST /team/new or POST /team/update silently discarded it because
Pydantic strips undeclared fields before serialization. The column
exists in LiteLLM_TeamTable and is JSON-serialized by jsonify_object,
so adding the field to both request types is sufficient.

Fixes #28188
This commit is contained in:
PRABHU KIRAN VANDRANKI 2026-05-18 21:15:13 -04:00
parent a72414a061
commit 1853f961b0

View file

@ -1819,6 +1819,7 @@ class TeamBase(LiteLLMPydanticObjectBase):
class NewTeamRequest(TeamBase):
model_aliases: Optional[dict] = None
model_max_budget: Optional[dict] = None
tags: Optional[list] = None
guardrails: Optional[List[str]] = None
policies: Optional[List[str]] = None
@ -1906,6 +1907,7 @@ class UpdateTeamRequest(LiteLLMPydanticObjectBase):
allowed_vector_store_indexes: Optional[List[AllowedVectorStoreIndexItem]] = None
enforced_batch_output_expires_after: Optional[dict] = None
enforced_file_expires_after: Optional[dict] = None
model_max_budget: Optional[dict] = None
router_settings: Optional[dict] = None
access_group_ids: Optional[List[str]] = None
budget_limits: Optional[List[BudgetLimitEntry]] = (