{"record":{"id":"a6c4f7d301a5b797","repo":"BerriAI/litellm","slug":"tpm-limit-higher-than-user-max-user-tpm-limit-us","errorCode":null,"errorMessage":"tpm limit higher than user max. User tpm limit={user_api_key_dict.tpm_limit}. User role={user_api_key_dict.user_role}","messagePattern":"tpm limit higher than user max\\. User tpm limit=(.+?)\\. User role=(.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/management_endpoints/team_endpoints.py","lineNumber":1080,"sourceCode":"\n    # Validate team models against user's allowed models\n    if data.models is not None and len(user_api_key_dict.models) > 0:\n        for m in data.models:\n            if m not in user_api_key_dict.models:\n                raise HTTPException(\n                    status_code=400,\n                    detail={\n                        \"error\": f\"Model not in allowed user models. User allowed models={user_api_key_dict.models}. User id={user_api_key_dict.user_id}\"\n                    },\n                )\n\n    # Validate team TPM/RPM against user's TPM/RPM limits\n    if (\n        data.tpm_limit is not None\n        and user_api_key_dict.tpm_limit is not None\n        and data.tpm_limit > user_api_key_dict.tpm_limit\n    ):\n        raise HTTPException(\n            status_code=400,\n            detail={\n                \"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}\"\n            },\n        )\n\n    if (\n        data.rpm_limit is not None\n        and user_api_key_dict.rpm_limit is not None\n        and data.rpm_limit > user_api_key_dict.rpm_limit\n    ):\n        raise HTTPException(\n            status_code=400,\n            detail={\n                \"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}\"\n            },\n        )\n","sourceCodeStart":1062,"sourceCodeEnd":1098,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/team_endpoints.py#L1062-L1098","documentation":"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.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/team_endpoints.py:1080 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set tpm_limit at or below your user'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-14T00:17:10.932Z"}