fix(proxy/team): return 400 not 422 when bulk member update exceeds the 500-user cap

BulkTeamMemberUpdateRequest carried Field(max_length=500) on user_ids, so an
over-cap batch was rejected by FastAPI request-body validation with 422 before
the handler ran. The handler already enforces the same cap with an explicit
400, and it is the only check that also covers the all_members_in_team=True
path, where user_ids is built from the team and the Field constraint cannot
apply. Drop the redundant Field constraint so the handler is the single source
of truth and both paths return 400.
This commit is contained in:
mubashir1osmani 2026-07-16 19:35:20 -07:00
parent 2addb261a5
commit e8f749c424

View file

@ -3759,7 +3759,7 @@ class TeamMemberBulkUpdateFields(LiteLLMPydanticObjectBase):
class BulkTeamMemberUpdateRequest(LiteLLMPydanticObjectBase):
user_ids: list[str] | None = Field(default=None, max_length=BULK_TEAM_MEMBER_UPDATE_MAX_USER_IDS)
user_ids: list[str] | None = Field(default=None)
all_members_in_team: bool = False
update_fields: TeamMemberBulkUpdateFields