{"record":{"id":"62870a2ba3e93d9a","repo":"BerriAI/litellm","slug":"team-tpm-limit-data-tpm-limit-exceeds-organiza","errorCode":null,"errorMessage":"Team tpm_limit ({data.tpm_limit}) exceeds organization's tpm_limit ({org_table.litellm_budget_table.tpm_limit}). Organization: {org_table.organization_id}","messagePattern":"Team tpm_limit \\((.+?)\\) exceeds organization's tpm_limit \\((.+?)\\)\\. Organization: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/management_endpoints/team_endpoints.py","lineNumber":973,"sourceCode":"            pass\n        else:\n            for m in data.models:\n                if m not in org_table.models:\n                    raise HTTPException(\n                        status_code=400,\n                        detail={\n                            \"error\": f\"Model '{m}' not in organization's allowed models. Organization allowed models={org_table.models}. Organization: {org_table.organization_id}\"\n                        },\n                    )\n\n    # Validate team TPM/RPM against organization's TPM/RPM limits (direct comparison)\n    if (\n        data.tpm_limit is not None\n        and org_table.litellm_budget_table is not None\n        and org_table.litellm_budget_table.tpm_limit is not None\n        and data.tpm_limit > org_table.litellm_budget_table.tpm_limit\n    ):\n        raise HTTPException(\n            status_code=400,\n            detail={\n                \"error\": f\"Team tpm_limit ({data.tpm_limit}) exceeds organization's tpm_limit ({org_table.litellm_budget_table.tpm_limit}). Organization: {org_table.organization_id}\"\n            },\n        )\n\n    if (\n        data.rpm_limit is not None\n        and org_table.litellm_budget_table is not None\n        and org_table.litellm_budget_table.rpm_limit is not None\n        and data.rpm_limit > org_table.litellm_budget_table.rpm_limit\n    ):\n        raise HTTPException(\n            status_code=400,\n            detail={\n                \"error\": f\"Team rpm_limit ({data.rpm_limit}) exceeds organization's rpm_limit ({org_table.litellm_budget_table.rpm_limit}). Organization: {org_table.organization_id}\"\n            },\n        )","sourceCodeStart":955,"sourceCodeEnd":991,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/team_endpoints.py#L955-L991","documentation":"Direct TPM comparison: the team's requested tpm_limit alone exceeds the organization's tpm_limit (independent of sibling allocation), so the org limits validator raises 400 naming both values and the org id.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/team_endpoints.py:973 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the team tpm_limit at or below the organization's tpm_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-14T05:17:10.506Z"}