BerriAI/litellm · error · HTTPException

Specify list of organization id's to query. Passed in={data.

Error message

Specify list of organization id's to query. Passed in={data.organizations}

What it means

The deprecated POST /organization/info endpoint fires this when the caller submits a body whose organizations list is empty: there is nothing to look up, so a 400 is raised to force the caller to pass at least one organization id. The input at fault is data.organizations == [].

Source

Thrown at litellm/proxy/management_endpoints/organization_endpoints.py:1127

@router.post(
    "/organization/info",
    tags=["organization management"],
    dependencies=[Depends(user_api_key_auth)],
)
async def deprecated_info_organization(
    data: OrganizationRequest,
    user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
):
    """
    DEPRECATED: Use GET /organization/info instead
    """
    from litellm.proxy.proxy_server import prisma_client

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

    if len(data.organizations) == 0:
        raise HTTPException(
            status_code=400,
            detail={"error": f"Specify list of organization id's to query. Passed in={data.organizations}"},
        )

    # Verify caller has access to each requested organization
    for org_id in data.organizations:
        await _verify_org_access(
            organization_id=org_id,
            user_api_key_dict=user_api_key_dict,
            prisma_client=prisma_client,
        )

    response: Final = await _table(OrganizationRepository(prisma_client)).find_many(
        where={"organization_id": {"in": data.organizations}},
        include={"litellm_budget_table": True},
    )

    return response

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Pass a non-empty list of organization ids in the request.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/organization_endpoints.py:1127 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/c1dd4a602fe23df0. Report an issue: GitHub.