BerriAI/litellm · error · HTTPException
Cannot set both apply_to_all_teams=true and team_ids
Error message
Cannot set both apply_to_all_teams=true and team_ids
What it means
Error "Cannot set both apply_to_all_teams=true and team_ids" thrown in BerriAI/litellm.
Source
Thrown at litellm/proxy/management_endpoints/team_endpoints.py:5592
raise HTTPException(
status_code=403,
detail={"error": "Only proxy admins can bulk-update team permissions"},
)
if not data.permissions:
return {
"message": "No permissions provided",
"teams_updated": 0,
}
if not data.apply_to_all_teams and not data.team_ids:
raise HTTPException(
status_code=400,
detail={"error": "Must provide team_ids or set apply_to_all_teams=true"},
)
if data.apply_to_all_teams and data.team_ids:
raise HTTPException(
status_code=400,
detail={"error": "Cannot set both apply_to_all_teams=true and team_ids"},
)
permissions_to_add: Final = set(data.permissions)
if data.team_ids:
teams_updated = await _append_permissions_to_specific_teams(prisma_client, data.team_ids, permissions_to_add)
else:
teams_updated = await _append_permissions_to_all_teams(prisma_client, permissions_to_add)
return {
"message": "Team permissions updated successfully",
"teams_updated": teams_updated,
"permissions_appended": data.permissions,
}
View on GitHub (pinned to 77b7c6c40c)
Solutions
- Pass either apply_to_all_teams=true or an explicit team_ids list, not both.
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/team_endpoints.py:5592 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/d63398585ea7a918.
Report an issue: GitHub.