BerriAI/litellm · error · HTTPException

Only proxy admins can add a user_id that does not exist yet:

Error message

Only proxy admins can add a user_id that does not exist yet: {}{}. Add the member by user_email to invite a new user, or ask a proxy admin to create the user first.

What it means

Error "Only proxy admins can add a user_id that does not exist yet: {}{}. Add the member by user_email to invite a new user, or ask a proxy admin to create the user first." thrown in BerriAI/litellm.

Source

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

    Team and org admins keep the ability to add users that already exist and to
    invite new ones by user_email, where the user_id is allocated server-side.
    """
    if user_api_key_dict.user_role in (
        LitellmUserRoles.PROXY_ADMIN,
        LitellmUserRoles.PROXY_ADMIN.value,
    ):
        return

    unknown_user_ids: Final = tuple(
        member.user_id for member in members if member.user_id is not None and member.user_id not in existing_user_ids
    )
    if not unknown_user_ids:
        return

    listed: Final = ", ".join(unknown_user_ids[:_MAX_REPORTED_UNKNOWN_USER_IDS])
    remaining: Final = len(unknown_user_ids) - _MAX_REPORTED_UNKNOWN_USER_IDS
    raise HTTPException(
        status_code=403,
        detail={  # mutable-ok: HTTPException detail must be a plain mapping to keep this route's {"error": ...} response shape
            "error": (
                "Only proxy admins can add a user_id that does not exist yet: {}{}. "
                "Add the member by user_email to invite a new user, or ask a proxy admin "
                "to create the user first.".format(listed, f" and {remaining} more" if remaining > 0 else "")
            )
        },
    )


def _members_audit_value(members: Sequence[Member]) -> str:
    """Serialize a team's member list for an audit-log value.

    The audit-log columns hold a JSON object, so the member list is nested
    under a key rather than serialized as a top-level array.
    """
    return safe_dumps(

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Add the member by user_email to invite a new user, or ask a proxy admin to create the user first.

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/team_endpoints.py:2836 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/8715b82a3b7b4828. Report an issue: GitHub.