mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
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:
parent
2addb261a5
commit
e8f749c424
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue