BerriAI/litellm · error · HTTPException
organization_id is required
Error message
organization_id is required
What it means
Input validation in the organization update endpoint (/organization/update). The request was deserialized into LiteLLM_OrganizationTableUpdate, but the resulting update payload carries no organization_id, so there is no organization row to apply the changes to. Fires when a client omits organization_id in the update body (it cannot be inferred from the API key). Include the organization_id of an existing organization.
Source
Thrown at litellm/proxy/management_endpoints/organization_endpoints.py:657
data: Final = LiteLLM_OrganizationTableUpdate(**raw_data_with_flat_budget_fields)
# Validate budget values are not negative
if data.max_budget is not None and (not math.isfinite(data.max_budget) or data.max_budget < 0):
raise HTTPException(
status_code=400,
detail={"error": f"max_budget must be a non-negative finite number. Received: {data.max_budget}"},
)
if data.soft_budget is not None and (not math.isfinite(data.soft_budget) or data.soft_budget < 0):
raise HTTPException(
status_code=400,
detail={"error": f"soft_budget must be a non-negative finite number. Received: {data.soft_budget}"},
)
if data.updated_by is None:
data.updated_by = user_api_key_dict.user_id
if data.organization_id is None:
raise HTTPException(
status_code=400,
detail={"error": "organization_id is required"},
)
# IDOR guard: only proxy admins / org admins of THIS org may update
# it. Without this, any authenticated key holder could rewrite
# another organization's metadata, budgets, and object permissions.
await _verify_org_access(
organization_id=data.organization_id,
user_api_key_dict=user_api_key_dict,
prisma_client=prisma_client,
)
existing_organization_row: Final = await OrganizationRepository(prisma_client).table.find_unique(
where={"organization_id": data.organization_id},
)
if existing_organization_row is None:View on GitHub (pinned to 77b7c6c40c)
Solutions
- Include organization_id in the request.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/organization_endpoints.py:657 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/3dd67a921c1742e7.
Report an issue: GitHub.