BerriAI/litellm · error · HTTPException
Project tpm_limit ( ) exceeds team's tpm_limit ( )
Error message
Project tpm_limit ({data.tpm_limit}) exceeds team's tpm_limit ({team_object.tpm_limit}) What it means
Rate-limit guard in _check_team_project_limits: a project's tpm_limit may not exceed its team's tpm_limit when the team has one set; otherwise HTTP 400 with both values. Keeps per-minute token throughput capped at the parent team's envelope.
Solutions
- Lower the project tpm_limit to <= the team's
- Raise the team's tpm_limit first, then retry
- Omit the project tpm_limit to inherit the team's limit
Example fix
# before
team tpm_limit: 10000
project payload: {"tpm_limit": 100000}
# after
team tpm_limit: 100000 (raised via /team/update)
project payload: {"tpm_limit": 100000} Defensive patterns
Strategy: validation
Validate before calling
team = await get(f"/team/info?team_id={data['team_id']}")
team_tpm = team["team_info"].get("tpm_limit")
if team_tpm is not None and data.get("tpm_limit") is not None and data["tpm_limit"] > team_tpm:
raise ValueError(f"project tpm_limit must be <= team tpm_limit ({team_tpm})") Try / catch
try:
await post("/project/new", json=data)
except HTTPStatusError as e:
if e.response.status_code == 400 and "tpm_limit" in e.response.text:
data["tpm_limit"] = min(data["tpm_limit"], team_tpm)
retry()
raise Prevention
- Cap project rate limits by the team's configured tpm_limit
- Raise team limits before scaling project throughput
When it happens
Trigger: POST/PUT project with tpm_limit 100000 when the team's tpm_limit is 10000.
Common situations: Scaling a project's throughput without scaling the team's; templates assuming unlimited team limits.
Related errors
- Project rpm_limit ( ) exceeds team's rpm_limit ( )
- Model ' ' not in team's allowed models. Team allowed…
- Project max_budget ( ) exceeds team's max_budget ( ). Team
- max_budget cannot be negative. Received
- project_id is required
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/2b3e38184f2b6f92.
Report an issue: GitHub.
Appendix: source
Thrown at enterprise/litellm_enterprise/proxy/management_endpoints/project_endpoints.py:191
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(
status_code=400,
detail={
"error": f"Project rpm_limit ({data.rpm_limit}) exceeds team's rpm_limit ({team_object.rpm_limit}). Team: {team_object.team_id}"
},
)
async def _create_budget_for_project(
data: NewProjectRequest,View on GitHub (pinned to 77b7c6c40c)