BerriAI/litellm · error · HTTPException

No user id passed in

Error message

No user id passed in

What it means

Error "No user id passed in" thrown in BerriAI/litellm.

Source

Thrown at litellm/proxy/management_endpoints/internal_user_endpoints.py:2234

    - user_ids: List[str] - The list of user id's to be deleted.
    """
    from litellm.proxy.management_endpoints.team_endpoints import (
        _cleanup_members_with_roles,
    )
    from litellm.proxy.management_helpers.audit_logs import (
        get_audit_log_changed_by,
    )
    from litellm.proxy.proxy_server import (
        create_audit_log_for_update,
        litellm_proxy_admin_name,
        prisma_client,
    )

    if prisma_client is None:
        raise HTTPException(status_code=500, detail={"error": "No db connected"})

    if data.user_ids is None:
        raise HTTPException(status_code=400, detail={"error": "No user id passed in"})

    # Per-target authorization: the route-level gate accepts this call when
    # the caller is PROXY_ADMIN or an ORG_ADMIN of *any* org named in
    # request_data["organization_id"]/["organizations"]. That gate does NOT
    # cross-check data.user_ids against the caller's scope, so without this
    # loop an org-admin of org-A could delete users in org-B by supplying
    # {"user_ids": [victim_in_org_B], "organization_id": "org-A"}.
    caller_is_proxy_admin: Final = user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN.value
    caller_admin_org_ids: set = set()
    if not caller_is_proxy_admin:
        caller_memberships: Final = (
            await _organization_membership_table(prisma_client).find_many(
                where={
                    "user_id": user_api_key_dict.user_id,
                    "user_role": LitellmUserRoles.ORG_ADMIN.value,
                }
            )
            if user_api_key_dict.user_id

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Include the user_id (or user_ids) parameter in the request body.
  2. Check the endpoint documentation for the required identifier field name.

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/internal_user_endpoints.py:2234 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/362c85121f8c8037. Report an issue: GitHub.