BerriAI/litellm · error · ValueError
If llm_api_check is set to True, llm_api_system_prompt must
Error message
If llm_api_check is set to True, llm_api_system_prompt must be provided
What it means
Model validator on the guardrails LLM-check config: llm_api_check is enabled but llm_api_system_prompt was not provided, so there is no rubric for the LLM-based request check and the config is rejected.
Source
Thrown at litellm/proxy/_types.py:942
vector_db_check: bool = False
llm_api_check: bool = False
llm_api_name: str | None = None
llm_api_system_prompt: str | None = None
llm_api_fail_call_string: str | None = None
reject_as_response: bool | None = Field(
default=False,
description="Return rejected request error message as a string to the user. Default behaviour is to raise an exception.",
)
@model_validator(mode="before")
@classmethod
def check_llm_api_params(cls, values):
llm_api_check: Final = values.get("llm_api_check")
if llm_api_check is True:
if "llm_api_name" not in values or not values["llm_api_name"]:
raise ValueError("If llm_api_check is set to True, llm_api_name must be provided")
if "llm_api_system_prompt" not in values or not values["llm_api_system_prompt"]:
raise ValueError("If llm_api_check is set to True, llm_api_system_prompt must be provided")
if "llm_api_fail_call_string" not in values or not values["llm_api_fail_call_string"]:
raise ValueError("If llm_api_check is set to True, llm_api_fail_call_string must be provided")
return values
######### Request Class Definition ######
class ProxyChatCompletionRequest(LiteLLMPydanticObjectBase):
"""
Pydantic model for chat completion requests that includes both OpenAI standard fields
and LiteLLM-specific parameters. This replaces the previous TypedDict version.
"""
# Required fields (from ChatCompletionRequest)
model: str
messages: list[AllMessageValues]
# Standard OpenAI completion parameters (all optional)
frequency_penalty: float | None = NoneView on GitHub (pinned to 77b7c6c40c)
Solutions
- Provide llm_api_system_prompt when llm_api_check is True, or disable the check.
Example fix
llm_api_system_prompt='You verify...'
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/_types.py:942 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/737638d008dd58be.
Report an issue: GitHub.