BerriAI/litellm · error · HTTPException

Unable to add user - {data.member}, to team - {data.team_id}

Error message

Unable to add user - {data.member}, to team - {data.team_id}, for reason - {e}

What it means

Error "Unable to add user - {data.member}, to team - {data.team_id}, for reason - {e}" thrown in BerriAI/litellm.

Source

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

    team_default_member_models: Final = getattr(complete_team_data, "default_team_member_models", None)
    if member_allowed_models is None and team_default_member_models:
        member_allowed_models = team_default_member_models

    if isinstance(data.member, Member):
        try:
            updated_user, updated_tm = await add_new_member(
                new_member=data.member,
                max_budget_in_team=data.max_budget_in_team,
                prisma_client=prisma_client,
                user_api_key_dict=user_api_key_dict,
                litellm_proxy_admin_name=litellm_proxy_admin_name,
                team_id=data.team_id,
                default_team_budget_id=default_team_budget_id,
                allowed_models=member_allowed_models,
                budget_duration=data.budget_duration,
            )
        except Exception as e:
            raise HTTPException(
                status_code=500,
                detail={"error": f"Unable to add user - {data.member}, to team - {data.team_id}, for reason - {e}"},
            )
        updated_users.append(updated_user)
        if updated_tm is not None:
            updated_team_memberships.append(updated_tm)
    elif isinstance(data.member, list):
        for m in data.member:
            try:
                updated_user, updated_tm = await add_new_member(
                    new_member=m,
                    max_budget_in_team=data.max_budget_in_team,
                    prisma_client=prisma_client,
                    user_api_key_dict=user_api_key_dict,
                    litellm_proxy_admin_name=litellm_proxy_admin_name,
                    team_id=data.team_id,
                    default_team_budget_id=default_team_budget_id,
                    allowed_models=member_allowed_models,

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Check the embedded reason in the error; verify the member (user_id/user_email) and team_id are valid, then retry.

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/team_endpoints.py:2592 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/20ac5da135eba018. Report an issue: GitHub.