BerriAI/litellm · error · HTTPException
tpm limit higher than user max. User tpm limit={user_api_key
Error message
tpm limit higher than user max. User tpm limit={user_api_key_dict.tpm_limit}. User role={user_api_key_dict.user_role} What it means
TPM self-limit guard: the caller requests a team tpm_limit above their own user tpm_limit, which would delegate more guaranteed throughput than they hold; refused with 400 naming the user's tpm limit and role.
Source
Thrown at litellm/proxy/management_endpoints/team_endpoints.py:1080
# 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 limits
if (
data.tpm_limit is not None
and user_api_key_dict.tpm_limit is not None
and data.tpm_limit > user_api_key_dict.tpm_limit
):
raise HTTPException(
status_code=400,
detail={
"error": f"tpm limit higher than user max. User tpm limit={user_api_key_dict.tpm_limit}. User role={user_api_key_dict.user_role}"
},
)
if (
data.rpm_limit is not None
and user_api_key_dict.rpm_limit is not None
and data.rpm_limit > user_api_key_dict.rpm_limit
):
raise HTTPException(
status_code=400,
detail={
"error": f"rpm limit higher than user max. User rpm limit={user_api_key_dict.rpm_limit}. User role={user_api_key_dict.user_role}"
},
)
View on GitHub (pinned to 77b7c6c40c)
Solutions
- Set tpm_limit at or below your user's tpm limit.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/team_endpoints.py:1080 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/a6c4f7d301a5b797.
Report an issue: GitHub.