BerriAI/litellm · error · HTTPException

rpm limit higher than user max. User rpm limit={user_api_key

Error message

rpm limit higher than user max. User rpm limit={user_api_key_dict.rpm_limit}. User role={user_api_key_dict.user_role}

What it means

Self-service team creation guard comparing the requested team limits against the calling key/user's own tpm/rpm allowance. Here the requested rpm_limit exceeds user_api_key_dict.rpm_limit, so a non-privileged caller is trying to mint a team with a higher rate budget than they themselves hold. Admins (or users without their own limits) are unaffected; the fix is to request a lower rpm_limit or have an admin create the team.

Source

Thrown at litellm/proxy/management_endpoints/team_endpoints.py:1092

    # 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}"
            },
        )


def _check_team_budget_update_authority(
    data: UpdateTeamRequest,
    user_api_key_dict: UserAPIKeyAuth,
    existing_team_max_budget: float | None,
) -> None:
    """
    Restrict who can grow a standalone team's spend ceiling on /team/update.

    A team admin (already authorized via _verify_team_access) may keep or lower
    the team budget, but only a proxy admin may grow it - by raising max_budget
    above the team's current value or by removing the cap (setting it to None).

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Set rpm_limit at or below your user's rpm limit.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/team_endpoints.py:1092 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/6c5ea2d90d3ef9ed. Report an issue: GitHub.