BerriAI/litellm · error · HTTPException
max budget higher than user max. User max budget={user_obj.m
Error message
max budget higher than user max. User max budget={user_obj.max_budget}. User role={user_api_key_dict.user_role} What it means
Standalone-team wallet guard on /team/new: a non-admin creator's requested team max_budget exceeds their own user max_budget, which would let the user mint a team richer than themselves; refused with 400 naming the user's budget and role.
Source
Thrown at litellm/proxy/management_endpoints/team_endpoints.py:1056
caller's own limits, so a non-admin user cannot mint a brand-new team that
is richer than themselves.
Only used by /team/new for standalone teams (organization_id is None).
/team/update does NOT call this — an existing team's admin is already
authorized via _verify_team_access() and is not gated by their personal
wallet. Org-scoped teams use _check_org_team_limits() instead.
"""
# Validate team budget against user's max_budget
if data.max_budget is not None and user_api_key_dict.user_id is not None:
user_obj: Final = await get_user_object(
user_id=user_api_key_dict.user_id,
prisma_client=prisma_client,
user_api_key_cache=user_api_key_cache,
user_id_upsert=False,
)
if user_obj is not None and user_obj.max_budget is not None and data.max_budget > user_obj.max_budget:
raise HTTPException(
status_code=400,
detail={
"error": f"max budget higher than user max. User max budget={user_obj.max_budget}. User role={user_api_key_dict.user_role}"
},
)
# Validate team models against user's allowed models
if data.models is not None and len(user_api_key_dict.models) > 0:
for m in data.models:
if m not in user_api_key_dict.models:
raise HTTPException(
status_code=400,
detail={
"error": f"Model not in allowed user models. User allowed models={user_api_key_dict.models}. User id={user_api_key_dict.user_id}"
},
)
# Validate team TPM/RPM against user's TPM/RPM limitsView on GitHub (pinned to 77b7c6c40c)
Solutions
- Set max_budget at or below your user's max budget.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/team_endpoints.py:1056 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/25cd761fbc5e1489.
Report an issue: GitHub.