BerriAI/litellm · error · HTTPException

Available-team self-join cannot assign 'admin' role. Only pr

Error message

Available-team self-join cannot assign 'admin' role. Only proxy/team/org admins can add admins to a team.

What it means

Error "Available-team self-join cannot assign 'admin' role. Only proxy/team/org admins can add admins to a team." thrown in BerriAI/litellm.

Source

Thrown at litellm/proxy/management_endpoints/team_endpoints.py:2535

        raise HTTPException(
            status_code=403,
            detail={
                "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."
                )
            },
        )

    # Available-team self-join: caller may add only themselves, only as a
    # standard user.  Enforce that here so the bypass cannot be used as a
    # privilege-escalation or cross-user-injection primitive.
    members: Final = data.member if isinstance(data.member, list) else [data.member]
    caller_user_id: Final = getattr(user_api_key_dict, "user_id", None)
    for member in members:
        if getattr(member, "role", "user") != "user":
            raise HTTPException(
                status_code=403,
                detail={
                    "error": (
                        "Available-team self-join cannot assign 'admin' role. "
                        "Only proxy/team/org admins can add admins to a team."
                    )
                },
            )
        member_user_id = getattr(member, "user_id", None)
        if not caller_user_id or not member_user_id or member_user_id != caller_user_id:
            raise HTTPException(
                status_code=403,
                detail={
                    "error": (
                        "Available-team self-join can only add the caller "
                        "(user_id must match the authenticated user's user_id)."
                    )
                },

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Self-join with the default 'user' role; ask a proxy/team/org admin to grant the admin role.

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/team_endpoints.py:2535 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/de45b28822bdaf57. Report an issue: GitHub.