BerriAI/litellm · error · HTTPException

Allocated TPM limit={allocated_tpm} + Team TPM limit={data.t

Error message

Allocated TPM limit={allocated_tpm} + Team TPM limit={data.tpm_limit} is greater than {entity_type} TPM limit={entity_tpm_limit}

What it means

Whole-entity TPM check: sum of tpm_limit already allocated to sibling teams plus data.tpm_limit exceeds the organization's tpm_limit, so team creation/update under that org is refused with 400 to avoid overallocating guaranteed throughput.

Source

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

    entity_type: str,  # "organization"
) -> None:
    """
    Generic function to check if a team is allocating rpm/tpm limits.
    Raises an error if we're overallocating.
    """
    if teams is not None and len(teams) > 0:
        allocated_tpm = sum(team.tpm_limit for team in teams if team.tpm_limit is not None)
        allocated_rpm = sum(team.rpm_limit for team in teams if team.rpm_limit is not None)
    else:
        allocated_tpm = 0
        allocated_rpm = 0

    if (
        data.tpm_limit is not None
        and entity_tpm_limit is not None
        and data.tpm_limit + allocated_tpm > entity_tpm_limit
    ):
        raise HTTPException(
            status_code=400,
            detail=f"Allocated TPM limit={allocated_tpm} + Team TPM limit={data.tpm_limit} is greater than {entity_type} TPM limit={entity_tpm_limit}",
        )
    if (
        data.rpm_limit is not None
        and entity_rpm_limit is not None
        and data.rpm_limit + allocated_rpm > entity_rpm_limit
    ):
        raise HTTPException(
            status_code=400,
            detail=f"Allocated RPM limit={allocated_rpm} + Team RPM limit={data.rpm_limit} is greater than {entity_type} RPM limit={entity_rpm_limit}",
        )


def check_org_team_model_specific_limits(
    teams: list[LiteLLM_TeamTable],
    org_table: LiteLLM_OrganizationTable,
    data: NewTeamRequest | UpdateTeamRequest,

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Lower the team TPM limit so allocated + team TPM does not exceed the entity TPM limit.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/team_endpoints.py:851 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/9536d150d5e2e0ea. Report an issue: GitHub.