{"record":{"id":"9597ecf3d87457e1","repo":"BerriAI/litellm","slug":"allocated-rpm-limit-model-specific-rpm-limit-get-9597ec","errorCode":null,"errorMessage":"Allocated RPM limit={model_specific_rpm_limit.get(model, 0)} + Team RPM limit={rpm_limit} is greater than {entity_type} RPM limit={entity_rpm_limit}","messagePattern":"Allocated RPM limit=(.+?) \\+ Team RPM limit=(.+?) is greater than (.+?) RPM limit=(.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/management_endpoints/team_endpoints.py","lineNumber":794,"sourceCode":"    if model_rpm_limit is None and model_tpm_limit is None:\n        return\n\n    # get total model specific tpm/rpm limit\n    model_specific_rpm_limit: Final[dict[str, int]] = {}\n    model_specific_tpm_limit: Final[dict[str, int]] = {}\n\n    for team in teams:\n        if team.metadata and team.metadata.get(\"model_rpm_limit\", None) is not None:\n            for model, rpm_limit in team.metadata.get(\"model_rpm_limit\", {}).items():\n                model_specific_rpm_limit[model] = model_specific_rpm_limit.get(model, 0) + rpm_limit\n        if team.metadata and team.metadata.get(\"model_tpm_limit\", None) is not None:\n            for model, tpm_limit in team.metadata.get(\"model_tpm_limit\", {}).items():\n                model_specific_tpm_limit[model] = model_specific_tpm_limit.get(model, 0) + tpm_limit\n\n    if model_rpm_limit is not None:\n        for model, rpm_limit in model_rpm_limit.items():\n            if entity_rpm_limit is not None and model_specific_rpm_limit.get(model, 0) + rpm_limit > entity_rpm_limit:\n                raise HTTPException(\n                    status_code=400,\n                    detail=f\"Allocated RPM limit={model_specific_rpm_limit.get(model, 0)} + Team RPM limit={rpm_limit} is greater than {entity_type} RPM limit={entity_rpm_limit}\",\n                )\n            elif entity_model_rpm_limit_dict:\n                entity_model_specific_rpm_limit = entity_model_rpm_limit_dict.get(model)\n                if (\n                    entity_model_specific_rpm_limit\n                    and model_specific_rpm_limit.get(model, 0) + rpm_limit > entity_model_specific_rpm_limit\n                ):\n                    raise HTTPException(\n                        status_code=400,\n                        detail=f\"Allocated RPM limit={model_specific_rpm_limit.get(model, 0)} + Team RPM limit={rpm_limit} is greater than {entity_type} RPM limit={entity_model_specific_rpm_limit}\",\n                    )\n\n    if model_tpm_limit is not None:\n        for model, tpm_limit in model_tpm_limit.items():\n            if entity_tpm_limit is not None and model_specific_tpm_limit.get(model, 0) + tpm_limit > entity_tpm_limit:\n                raise HTTPException(","sourceCodeStart":776,"sourceCodeEnd":812,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/team_endpoints.py#L776-L812","documentation":"Model-level RPM over-allocation check when creating/updating a team under a parent entity: summing the per-model rpm limits already allocated to sibling teams plus the new team's request exceeds the entity's RPM ceiling, so a 400 blocks the allocation. At-fault input is model_rpm_limit pushing the total over the parent's limit.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/team_endpoints.py:794 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Lower the model-specific or team RPM limit so the sum does not exceed the entity RPM limit."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}