{"record":{"id":"aff0ebcda9526601","repo":"BerriAI/litellm","slug":"only-a-proxy-admin-can-raise-a-team-s-max-budget","errorCode":null,"errorMessage":"Only a proxy admin can raise a team's max_budget. Team's current max_budget={existing_team_max_budget}, requested={data.max_budget}.","messagePattern":"Only a proxy admin can raise a team's max_budget\\. Team's current max_budget=(.+?), requested=(.+?)\\.","errorType":"http","errorClass":"HTTPException","httpStatus":403,"severity":"error","filePath":"litellm/proxy/management_endpoints/team_endpoints.py","lineNumber":1129,"sourceCode":"    Setting a finite budget on a team that has no cap is a restriction and is\n    allowed. Org-scoped teams are governed by _check_org_team_limits().\n    \"\"\"\n    if user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN:\n        return\n    if existing_team_max_budget is None:\n        return\n\n    budget_explicitly_set: Final = \"max_budget\" in (getattr(data, \"model_fields_set\", None) or set())\n    if budget_explicitly_set and data.max_budget is None:\n        raise HTTPException(\n            status_code=403,\n            detail={\n                \"error\": f\"Only a proxy admin can remove a team's max_budget. Team's current max_budget={existing_team_max_budget}.\"\n            },\n        )\n\n    if data.max_budget is not None and data.max_budget > existing_team_max_budget:\n        raise HTTPException(\n            status_code=403,\n            detail={\n                \"error\": f\"Only a proxy admin can raise a team's max_budget. Team's current max_budget={existing_team_max_budget}, requested={data.max_budget}.\"\n            },\n        )\n\n\ndef _should_auto_add_team_creator(\n    user_api_key_dict: UserAPIKeyAuth,\n    general_settings: Mapping[str, object],\n) -> bool:\n    if user_api_key_dict.user_id is None:\n        return False\n    if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN:\n        return True\n    return general_settings.get(\"disable_auto_add_proxy_admin_to_teams\") is not True\n\n","sourceCodeStart":1111,"sourceCodeEnd":1147,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/team_endpoints.py#L1111-L1147","documentation":"Companion guard: a non-proxy-admin team admin requests max_budget higher than the team's existing cap — growth of the spend ceiling. Lowering or keeping the budget is allowed; raising it returns 403 with current and requested values.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/team_endpoints.py:1129 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a PROXY_ADMIN key to raise a team's max_budget."],"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"}