{"record":{"id":"dfdc3b677a33d7ab","repo":"BerriAI/litellm","slug":"available-team-self-join-cannot-set-per-member-bud","errorCode":null,"errorMessage":"Available-team self-join cannot set per-member budget or model controls (max_budget_in_team, budget_duration, allowed_models); these are admin-only.","messagePattern":"Available-team self-join cannot set per-member budget or model controls \\(max_budget_in_team, budget_duration, allowed_models\\); these are admin-only\\.","errorType":"http","errorClass":"HTTPException","httpStatus":403,"severity":"error","filePath":"litellm/proxy/management_endpoints/team_endpoints.py","lineNumber":2517,"sourceCode":"        team_id=complete_team_data.team_id,\n        user_api_key_dict=user_api_key_dict,\n    ):\n        raise HTTPException(\n            status_code=403,\n            detail={\n                \"error\": \"Call not allowed. User not proxy admin OR team admin. route={}, team_id={}\".format(\n                    \"/team/member_add\",\n                    complete_team_data.team_id,\n                )\n            },\n        )\n\n    # Available-team self-join grants only the ability to join; per-member\n    # budget and model controls stay admin-only.  Reject them here so a\n    # self-joining non-admin cannot set their own cap, reset window, or model\n    # scope via the bypass.\n    if data.max_budget_in_team is not None or data.budget_duration is not None or data.allowed_models is not None:\n        raise HTTPException(\n            status_code=403,\n            detail={\n                \"error\": (\n                    \"Available-team self-join cannot set per-member budget or \"\n                    \"model controls (max_budget_in_team, budget_duration, \"\n                    \"allowed_models); these are admin-only.\"\n                )\n            },\n        )\n\n    # Available-team self-join: caller may add only themselves, only as a\n    # standard user.  Enforce that here so the bypass cannot be used as a\n    # privilege-escalation or cross-user-injection primitive.\n    members: Final = data.member if isinstance(data.member, list) else [data.member]\n    caller_user_id: Final = getattr(user_api_key_dict, \"user_id\", None)\n    for member in members:\n        if getattr(member, \"role\", \"user\") != \"user\":\n            raise HTTPException(","sourceCodeStart":2499,"sourceCodeEnd":2535,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/team_endpoints.py#L2499-L2535","documentation":"Error \"Available-team self-join cannot set per-member budget or model controls (max_budget_in_team, budget_duration, allowed_models); these are admin-only.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/team_endpoints.py:2517 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Omit max_budget_in_team, budget_duration, and allowed_models when self-joining; ask a team admin to set them."],"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-14T00:17:10.932Z"}