{"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":200,"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: dict[str, object] = data.model_dump(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":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/enterprise/litellm_enterprise/proxy/management_endpoints/project_endpoints.py#L182-L218","documentation":"Rate-limit guard in _check_team_project_limits: a project's rpm_limit may not exceed its team's rpm_limit when the team has one set; otherwise HTTP 400 with both values. Same envelope pattern as the tpm check directly above it.","triggerScenarios":"POST/PUT project with rpm_limit 5000 when the team's rpm_limit is 1000.","commonSituations":"Bursty workloads moved under a project without raising the team cap; copy-pasted project configs from teams with looser limits.","solutions":["Lower the project rpm_limit to <= the team's","Raise the team's rpm_limit first, then retry","Omit the project rpm_limit to inherit the team's limit"],"exampleFix":"# before\nteam rpm_limit: 1000\nproject payload: {\"rpm_limit\": 5000}\n\n# after\nteam rpm_limit: 5000 (raised via /team/update)\nproject payload: {\"rpm_limit\": 5000}","handlingStrategy":"validation","validationCode":"team = await get(f\"/team/info?team_id={data['team_id']}\")\nteam_rpm = team[\"team_info\"].get(\"rpm_limit\")\nif team_rpm is not None and data.get(\"rpm_limit\") is not None and data[\"rpm_limit\"] > team_rpm:\n    raise ValueError(f\"project rpm_limit must be <= team rpm_limit ({team_rpm})\")","typeGuard":null,"tryCatchPattern":"try:\n    await post(\"/project/new\", json=data)\nexcept HTTPStatusError as e:\n    if e.response.status_code == 400 and \"rpm_limit\" in e.response.text:\n        data[\"rpm_limit\"] = min(data[\"rpm_limit\"], team_rpm)\n        retry()\n    raise","preventionTips":["Cap project rate limits by the team's configured rpm_limit","Review team envelopes whenever onboarding bursty workloads under projects"],"tags":["litellm","projects","teams","rate-limits","validation","http-400"],"backgroundTag":"quota-exceeds-parent-limit","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}