{"record":{"id":"dc820368a4785541","repo":"BerriAI/litellm","slug":"cannot-move-team-to-organization-team-has-max-bud","errorCode":null,"errorMessage":"Cannot move team to organization. Team has max_budget {team.max_budget} that is greater than the organization's max_budget {organization.litellm_budget_table.max_budget}.","messagePattern":"Cannot move team to organization\\. Team has max_budget (.+?) that is greater than the organization's max_budget (.+?)\\.","errorType":"http","errorClass":"HTTPException","httpStatus":403,"severity":"error","filePath":"litellm/proxy/management_endpoints/team_endpoints.py","lineNumber":1813,"sourceCode":"                    \"error\": \"Cannot move team to organization. Team has access to all proxy models, but the organization does not.\"\n                },\n            )\n        else:\n            for model in team.models:\n                can_org_access_model(\n                    model=model,\n                    org_object=organization,\n                    llm_router=llm_router,\n                )\n\n    # Check if the team's budget is less than the org's max_budget\n    if (\n        team.max_budget\n        and organization.litellm_budget_table\n        and organization.litellm_budget_table.max_budget\n        and team.max_budget > organization.litellm_budget_table.max_budget\n    ):\n        raise HTTPException(\n            status_code=403,\n            detail={\n                \"error\": f\"Cannot move team to organization. Team has max_budget {team.max_budget} that is greater than the organization's max_budget {organization.litellm_budget_table.max_budget}.\"\n            },\n        )\n\n    # For non-proxy-admins, require all team members to already be org members.\n    # This prevents a team admin from moving their team into an arbitrary org and\n    # thereby injecting members into that org without org admin approval.\n    if not is_proxy_admin:\n        team_members: Final = [m.user_id for m in team.members_with_roles]\n        org_members: Final = [m.user_id for m in organization.members] if organization.members else []\n        not_in_org: Final = [\n            m for m in team_members if m not in org_members and m != SpecialProxyStrings.default_user_id.value\n        ]\n        if len(not_in_org) > 0:\n            raise HTTPException(\n                status_code=403,","sourceCodeStart":1795,"sourceCodeEnd":1831,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/team_endpoints.py#L1795-L1831","documentation":"Error \"Cannot move team to organization. Team has max_budget {team.max_budget} that is greater than the organization's max_budget {organization.litellm_budget_table.max_budget}.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/team_endpoints.py:1813 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Lower the team's max_budget to fit within the organization's max_budget before moving."],"exampleFix":null,"handlingStrategy":null,"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"}