{"record":{"id":"d8d28af6cba38532","repo":"BerriAI/litellm","slug":"required-param-param-not-in-data","errorCode":null,"errorMessage":"Required param {param} not in data","messagePattern":"Required param (.+?) not in data","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/management_endpoints/key_management_endpoints.py","lineNumber":391,"sourceCode":"            detail=f\"Team member role {team_member_object.role} not in allowed_team_member_roles={team_key_generation['allowed_team_member_roles']}\",\n        )\n\n    TeamMemberPermissionChecks.does_team_member_have_permissions_for_endpoint(\n        team_member_object=team_member_object,\n        team_table=team_table,\n        route=route,\n    )\n    return True\n\n\ndef _key_generation_required_param_check(data: GenerateKeyRequest, required_params: list[str] | None):\n    if required_params is None:\n        return True\n\n    data_dict: Final = data.model_dump(exclude_unset=True)\n    for param in required_params:\n        if param not in data_dict:\n            raise HTTPException(\n                status_code=400,\n                detail=f\"Required param {param} not in data\",\n            )\n    return True\n\n\ndef _team_key_generation_check(\n    team_table: LiteLLM_TeamTableCachedObj,\n    user_api_key_dict: UserAPIKeyAuth,\n    data: GenerateKeyRequest,\n    route: KeyManagementRoutes,\n):\n    if user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN.value:\n        return True\n    if litellm.key_generation_settings is not None and \"team_key_generation\" in litellm.key_generation_settings:\n        _team_key_generation = litellm.key_generation_settings[\"team_key_generation\"]\n    else:\n        _team_key_generation = TeamUIKeyGenerationConfig(","sourceCodeStart":373,"sourceCodeEnd":409,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/key_management_endpoints.py#L373-L409","documentation":"Error \"Required param {param} not in data\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/key_management_endpoints.py:391 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include the missing required parameter in the request body.","Check the endpoint documentation for the full list of required parameters."],"exampleFix":null,"handlingStrategy":null,"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-14T05:17:10.506Z"}