BerriAI/litellm · error · HTTPException
Must provide team_ids or set apply_to_all_teams=true
Error message
Must provide team_ids or set apply_to_all_teams=true
What it means
Error "Must provide team_ids or set apply_to_all_teams=true" thrown in BerriAI/litellm.
Source
Thrown at litellm/proxy/management_endpoints/team_endpoints.py:5586
from litellm.proxy.proxy_server import prisma_client
if prisma_client is None:
raise HTTPException(status_code=500, detail={"error": "No db connected"})
if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN.value:
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 {View on GitHub (pinned to 77b7c6c40c)
Solutions
- Provide a team_ids list, or set apply_to_all_teams=true.
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/team_endpoints.py:5586 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/67b482919af02dbd.
Report an issue: GitHub.