{"record":{"id":"f59a1824f1731bff","repo":"BerriAI/litellm","slug":"only-a-proxy-admin-can-remove-a-team-s-max-budget","errorCode":null,"errorMessage":"Only a proxy admin can remove a team's max_budget. Team's current max_budget={existing_team_max_budget}.","messagePattern":"Only a proxy admin can remove a team's max_budget\\. Team's current max_budget=(.+?)\\.","errorType":"http","errorClass":"HTTPException","httpStatus":403,"severity":"error","filePath":"litellm/proxy/management_endpoints/team_endpoints.py","lineNumber":1121,"sourceCode":"    existing_team_max_budget: float | None,\n) -> None:\n    \"\"\"\n    Restrict who can grow a standalone team's spend ceiling on /team/update.\n\n    A team admin (already authorized via _verify_team_access) may keep or lower\n    the team budget, but only a proxy admin may grow it - by raising max_budget\n    above the team's current value or by removing the cap (setting it to None).\n    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],","sourceCodeStart":1103,"sourceCodeEnd":1139,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/team_endpoints.py#L1103-L1139","documentation":"Budget-growth guard on /team/update: a team admin (authorized but non-proxy-admin) explicitly sets max_budget to None on a team that has a finite cap — removing the spend ceiling. Only proxy admins may do that, so it is refused with 403 naming the current budget.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/team_endpoints.py:1121 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a PROXY_ADMIN key to remove 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-14T00:17:10.932Z"}