BerriAI/litellm · error · HTTPException
Project max_budget ( ) exceeds team's max_budget ( ). Team
Error message
Project max_budget ({data.max_budget}) exceeds team's max_budget ({team_object.max_budget}). Team: {team_object.team_id} What it means
Team-level budget guard in _check_team_project_limits: a project's max_budget may not exceed its team's max_budget when the team has one configured (teams store budget fields directly, unlike projects which use a BudgetTable relation). Violations return HTTP 400 with both values and the team id.
Solutions
- Lower the project max_budget to <= the team's max_budget
- Raise the team's max_budget first via team update, then retry the project request
- Omit the project max_budget to inherit the team's budgeting
Example fix
# before
team max_budget: 500
project payload: {"max_budget": 1000}
# after
team max_budget: 500
project payload: {"max_budget": 500} Defensive patterns
Strategy: validation
Validate before calling
team = await get(f"/team/info?team_id={data['team_id']}")
team_max = team["team_info"]["max_budget"]
if team_max is not None and data.get("max_budget") is not None and data["max_budget"] > team_max:
data["max_budget"] = team_max # or raise and raise the team budget first Try / catch
try:
await post("/project/new", json=data)
except HTTPStatusError as e:
if e.response.status_code == 400 and "exceeds team's max_budget" in e.response.text:
await raise_team_budget(data["team_id"], data["max_budget"])
retry()
raise Prevention
- Always read the parent team's limits before setting child project budgets
- Provision teams with headroom above intended project budgets
When it happens
Trigger: POST /project/new or /project/update with max_budget 1000 when the referenced team's max_budget is 500.
Common situations: Teams quota'd lower than project templates assume; budgets raised at project level without raising the parent team first.
Related errors
- max_budget cannot be negative. Received
- Model ' ' not in team's allowed models. Team allowed…
- Project rpm_limit ( ) exceeds team's rpm_limit ( )
- Project tpm_limit ( ) exceeds team's tpm_limit ( )
- soft_budget cannot be negative. Received
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/4669c52b52e3f950.
Report an issue: GitHub.
Appendix: source
Thrown at enterprise/litellm_enterprise/proxy/management_endpoints/project_endpoints.py:182
project_models = data.models
team_models: list[str] = team_object.models or []
if project_models and len(team_models) > 0:
# If team has 'all-proxy-models', skip validation as it allows all models
if SpecialModelNames.all_proxy_models.value not in team_models:
for m in project_models:
if m not in team_models:
raise HTTPException(
status_code=400,
detail={
"error": f"Model '{m}' not in team's allowed models. Team allowed models={team_models}. Team: {team_object.team_id}"
},
)
# --- Validate project max_budget <= team max_budget ---
# Team stores budget fields directly (max_budget, tpm_limit, rpm_limit)
# unlike Project which uses a separate LiteLLM_BudgetTable relation
if data.max_budget is not None and team_object.max_budget is not None and data.max_budget > team_object.max_budget:
raise HTTPException(
status_code=400,
detail={
"error": f"Project max_budget ({data.max_budget}) exceeds team's max_budget ({team_object.max_budget}). Team: {team_object.team_id}"
},
)
# --- Validate project tpm_limit <= team tpm_limit ---
if data.tpm_limit is not None and team_object.tpm_limit is not None and data.tpm_limit > team_object.tpm_limit:
raise HTTPException(
status_code=400,
detail={
"error": f"Project tpm_limit ({data.tpm_limit}) exceeds team's tpm_limit ({team_object.tpm_limit}). Team: {team_object.team_id}"
},
)
# --- Validate project rpm_limit <= team rpm_limit ---
if data.rpm_limit is not None and team_object.rpm_limit is not None and data.rpm_limit > team_object.rpm_limit:
raise HTTPException(View on GitHub (pinned to 77b7c6c40c)