{"record":{"id":"f90a1ff15a22860b","repo":"BerriAI/litellm","slug":"project-rpm-limit-data-rpm-limit-exceeds-team","errorCode":null,"errorMessage":"Project rpm_limit ({data.rpm_limit}) exceeds team's rpm_limit ({team_object.rpm_limit})","messagePattern":"Project rpm_limit \\((.+?)\\) exceeds team's rpm_limit \\((.+?)\\)","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"enterprise/litellm_enterprise/proxy/management_endpoints/project_endpoints.py","lineNumber":175,"sourceCode":"        raise HTTPException(\n            status_code=400,\n            detail={\n                \"error\": f\"Project max_budget ({data.max_budget}) exceeds team's max_budget ({team_object.max_budget}). Team: {team_object.team_id}\"\n            },\n        )\n\n    # --- Validate project tpm_limit <= team tpm_limit ---\n    if data.tpm_limit is not None and team_object.tpm_limit is not None and data.tpm_limit > team_object.tpm_limit:\n        raise HTTPException(\n            status_code=400,\n            detail={\n                \"error\": f\"Project tpm_limit ({data.tpm_limit}) exceeds team's tpm_limit ({team_object.tpm_limit}). Team: {team_object.team_id}\"\n            },\n        )\n\n    # --- Validate project rpm_limit <= team rpm_limit ---\n    if data.rpm_limit is not None and team_object.rpm_limit is not None and data.rpm_limit > team_object.rpm_limit:\n        raise HTTPException(\n            status_code=400,\n            detail={\n                \"error\": f\"Project rpm_limit ({data.rpm_limit}) exceeds team's rpm_limit ({team_object.rpm_limit}). Team: {team_object.team_id}\"\n            },\n        )\n\n\nasync def _create_budget_for_project(\n    data: NewProjectRequest,\n    user_id: str | None,\n    litellm_proxy_admin_name: str,\n    prisma_client: PrismaClient,\n) -> str:\n    \"\"\"Create a budget for the project and return budget_id.\"\"\"\n    budget_params = LiteLLM_BudgetTable.model_fields.keys()\n    _json_data: Mapping[str, object] = data.json(exclude_none=True)\n    _budget_data = {k: v for k, v in _json_data.items() if k in budget_params}\n    budget_row = LiteLLM_BudgetTable.model_validate(_budget_data)","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/enterprise/litellm_enterprise/proxy/management_endpoints/project_endpoints.py#L157-L193","documentation":"A project's rpm_limit (requests-per-minute rate limit) must not exceed its parent team's rpm_limit. When both values are set and the project's is larger, LiteLLM returns HTTP 400 from _check_team_project_limits. This keeps project-level rate limits inside the team's throttling envelope.","triggerScenarios":"POST /project/new or PUT /project/update where data.rpm_limit > team_object.rpm_limit and both are non-null, e.g. team rpm_limit=100 and project rpm_limit=1000. Either side being None skips the check.","commonSituations":"Raising a project's request throughput without raising the team cap, or duplicating a project config from a high-limit team into a low-limit team.","solutions":["Set the project's rpm_limit to at most the team's rpm_limit","Increase the team's rpm_limit first (PUT /team/update), then retry","Omit rpm_limit from the project payload to inherit team throttling"],"exampleFix":"// before\nteam.rpm_limit = 100\nproject payload: {\"rpm_limit\": 1000}\n// after\nteam.rpm_limit = 2000\nproject payload: {\"rpm_limit\": 1000}","handlingStrategy":"validation","validationCode":"team = await client.get(f'/team/info?team_id={payload[\"team_id\"]}')\nteam_rpm = team.teams[0].rpm_limit\nif payload.get('rpm_limit') is not None and team_rpm is not None and payload['rpm_limit'] > team_rpm:\n    payload['rpm_limit'] = team_rpm  # cap at team limit, or raise team first","typeGuard":"const withinTeamRpm = (p, team) =>\n  p.rpm_limit == null || team.rpm_limit == null || p.rpm_limit <= team.rpm_limit;","tryCatchPattern":null,"preventionTips":["Validate rpm/tpm against team info before submitting project payloads","Automate limit changes top-down: team first, then projects"],"tags":["litellm","rate-limit","rpm","team","validation","enterprise","http-400"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}