BerriAI/litellm · error · GuardrailRaisedException

Blocked by policy

Error message

Blocked by policy

What it means

Error "Blocked by policy" thrown in BerriAI/litellm.

Source

Thrown at litellm/proxy/guardrails/guardrail_hooks/vigil_guard/vigil_guard.py:187

                    "Vigil Guard unrecognized decision for guardrail_name=%s source=%s: %r",
                    self.guardrail_name,
                    source,
                    decision,
                )
                if self.unreachable_fallback == "fail_open":
                    return self._build_output(
                        inputs,
                        result_texts + list(texts[index:]),
                        inputs.get("tool_calls"),
                    )
                raise GuardrailRaisedException(
                    guardrail_name=self.guardrail_name,
                    message="Vigil Guard returned an unrecognized decision.",
                    should_wrap_with_default_message=False,
                )

            if decision == "BLOCKED":
                raise GuardrailRaisedException(
                    guardrail_name=self.guardrail_name,
                    message=self._build_block_reason(analysis),
                    should_wrap_with_default_message=False,
                )

            if decision == "SANITIZED":
                result_texts.append(self._resolve_sanitized_text(text, analysis))
            else:
                result_texts.append(text)

        result_tool_calls = inputs.get("tool_calls")
        for tc_index, arguments in tool_call_args:
            try:
                analysis = await self._analyze(text=arguments, source=source, metadata=metadata)
            except (
                httpx.HTTPError,
                LiteLLMTimeout,
                JSONDecodeError,

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Modify the request to comply with the Vigil Guard policy.
  2. Review the Vigil Guard policy rules that produced the block.

When it happens

Trigger: Thrown at litellm/proxy/guardrails/guardrail_hooks/vigil_guard/vigil_guard.py:187 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/8c8204824a0eae11. Report an issue: GitHub.