BerriAI/litellm · error · HTTPException
Error in Pangea Guardrail
Error message
Error in Pangea Guardrail
What it means
Error "Error in Pangea Guardrail" thrown in BerriAI/litellm.
Source
Thrown at litellm/proxy/guardrails/guardrail_hooks/pangea/pangea.py:210
self,
user_api_key_dict: UserAPIKeyAuth,
cache: DualCache,
data: dict,
call_type: str,
):
event_type: Final = GuardrailEventHooks.pre_call
if self.should_run_guardrail(data=data, event_type=event_type) is not True:
verbose_proxy_logger.debug(
"Pangea Guardrail (async_pre_call_hook): Guardrail is disabled %s.", self.guardrail_name
)
return data
try:
return await self._async_pre_call_hook(user_api_key_dict, cache, data, call_type)
except HTTPException:
raise
except Exception as e:
raise HTTPException(
status_code=500,
detail={
"error": "Error in Pangea Guardrail",
"guardrail_name": self.guardrail_name,
"exceptions": str(e),
},
) from e
async def _async_post_call_success_hook(
self,
data: dict,
user_api_key_dict: UserAPIKeyAuth,
# This union isn't actually correct -- it can get other response types depending on the API called
response: LLMResponseTypes,
):
if isinstance(response, TextCompletionResponse):
# Assume the earlier call type as well
input_messages = _TextCompletionRequest(data).get_messages()View on GitHub (pinned to 77b7c6c40c)
Solutions
- Check the proxy logs for the underlying Pangea API error.
- Verify PANGEA_API_KEY and the Pangea service configuration are correct.
- Confirm network connectivity to the Pangea API endpoint.
When it happens
Trigger: Thrown at litellm/proxy/guardrails/guardrail_hooks/pangea/pangea.py:210 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/285b024b4a7a9cff.
Report an issue: GitHub.