BerriAI/litellm · error · HTTPException
Parameter '{llm_enrichment['parameter']}' is required
Error message
Parameter '{llm_enrichment['parameter']}' is required What it means
The template's llm_enrichment spec declares a required parameter, but the request body did not supply it. Raised as 400 from _validate_enrichment_request; at-fault input is the missing llm_enrichment parameter in the enrichment request.
Source
Thrown at litellm/proxy/management_endpoints/policy_endpoints/endpoints.py:701
templates: Final = _load_policy_templates_from_local_backup()
template: Final = next((t for t in templates if t.get("id") == data.template_id), None)
if template is None:
raise HTTPException(status_code=404, detail=f"Template '{data.template_id}' not found")
llm_enrichment: Final = template.get("llm_enrichment")
if llm_enrichment is None:
raise HTTPException(status_code=400, detail="Template does not support LLM enrichment")
# Validate competitors list size if provided
if data.competitors and len(data.competitors) > MAX_COMPETITOR_NAMES:
raise HTTPException(
status_code=400,
detail=f"competitors list exceeds maximum of {MAX_COMPETITOR_NAMES}",
)
brand_name: Final = data.parameters.get(llm_enrichment["parameter"], "")
if not brand_name:
raise HTTPException(
status_code=400,
detail=f"Parameter '{llm_enrichment['parameter']}' is required",
)
return template, llm_enrichment, brand_name
@router.post(
"/policy/templates/enrich",
tags=["policy management"],
dependencies=[Depends(user_api_key_auth)],
)
@management_endpoint_wrapper
async def enrich_policy_template(
data: EnrichTemplateRequest,
request: Request,
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
) -> dict:View on GitHub (pinned to 77b7c6c40c)
Solutions
- Provide the required parameter indicated in the message.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/policy_endpoints/endpoints.py:701 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/ae2c6608386012ee.
Report an issue: GitHub.