{"record":{"id":"3dd67a921c1742e7","repo":"BerriAI/litellm","slug":"organization-id-is-required","errorCode":null,"errorMessage":"organization_id is required","messagePattern":"organization_id is required","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/management_endpoints/organization_endpoints.py","lineNumber":657,"sourceCode":"    data: Final = LiteLLM_OrganizationTableUpdate(**raw_data_with_flat_budget_fields)\n\n    # Validate budget values are not negative\n    if data.max_budget is not None and (not math.isfinite(data.max_budget) or data.max_budget < 0):\n        raise HTTPException(\n            status_code=400,\n            detail={\"error\": f\"max_budget must be a non-negative finite number. Received: {data.max_budget}\"},\n        )\n    if data.soft_budget is not None and (not math.isfinite(data.soft_budget) or data.soft_budget < 0):\n        raise HTTPException(\n            status_code=400,\n            detail={\"error\": f\"soft_budget must be a non-negative finite number. Received: {data.soft_budget}\"},\n        )\n\n    if data.updated_by is None:\n        data.updated_by = user_api_key_dict.user_id\n\n    if data.organization_id is None:\n        raise HTTPException(\n            status_code=400,\n            detail={\"error\": \"organization_id is required\"},\n        )\n\n    # IDOR guard: only proxy admins / org admins of THIS org may update\n    # it. Without this, any authenticated key holder could rewrite\n    # another organization's metadata, budgets, and object permissions.\n    await _verify_org_access(\n        organization_id=data.organization_id,\n        user_api_key_dict=user_api_key_dict,\n        prisma_client=prisma_client,\n    )\n\n    existing_organization_row: Final = await OrganizationRepository(prisma_client).table.find_unique(\n        where={\"organization_id\": data.organization_id},\n    )\n\n    if existing_organization_row is None:","sourceCodeStart":639,"sourceCodeEnd":675,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/organization_endpoints.py#L639-L675","documentation":"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.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/organization_endpoints.py:657 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include organization_id in the request."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}