{"record":{"id":"6f4920060a50eb05","repo":"BerriAI/litellm","slug":"team-max-budget-data-max-budget-exceeds-organi","errorCode":null,"errorMessage":"Team max_budget ({data.max_budget}) exceeds organization's max_budget ({org_table.litellm_budget_table.max_budget}). Organization: {org_table.organization_id}","messagePattern":"Team max_budget \\((.+?)\\) exceeds organization's max_budget \\((.+?)\\)\\. Organization: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/management_endpoints/team_endpoints.py","lineNumber":944,"sourceCode":"    org_table: LiteLLM_OrganizationTable,\n    data: NewTeamRequest | UpdateTeamRequest,\n    prisma_client: PrismaClient,\n) -> None:\n    \"\"\"\n    Check organization team limits including:\n    - Team budget vs organization's max_budget\n    - Team models vs organization's allowed models\n    - Guaranteed throughput limits (tpm/rpm) if applicable\n    \"\"\"\n\n    # Validate team budget against organization's max_budget\n    if (\n        data.max_budget is not None\n        and org_table.litellm_budget_table is not None\n        and org_table.litellm_budget_table.max_budget is not None\n        and data.max_budget > org_table.litellm_budget_table.max_budget\n    ):\n        raise HTTPException(\n            status_code=400,\n            detail={\n                \"error\": f\"Team max_budget ({data.max_budget}) exceeds organization's max_budget ({org_table.litellm_budget_table.max_budget}). Organization: {org_table.organization_id}\"\n            },\n        )\n\n    # Validate team models against organization's allowed models\n    if data.models is not None and len(org_table.models) > 0:\n        # If organization has 'all-proxy-models', skip validation as it allows all models\n        if SpecialModelNames.all_proxy_models.value in org_table.models:\n            pass\n        else:\n            for m in data.models:\n                if m not in org_table.models:\n                    raise HTTPException(\n                        status_code=400,\n                        detail={\n                            \"error\": f\"Model '{m}' not in organization's allowed models. Organization allowed models={org_table.models}. Organization: {org_table.organization_id}\"","sourceCodeStart":926,"sourceCodeEnd":962,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/team_endpoints.py#L926-L962","documentation":"Org-scoped team budget guard: the team's requested max_budget is greater than the organization's own max_budget, so the child would outspend its parent; refused with 400 naming both budgets and the organization id.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/team_endpoints.py:944 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the team max_budget at or below the organization's max_budget, or raise the org budget first."],"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"}