BerriAI/litellm · error · ValueError
IBM Guardrails auth token is required. Set IBM_GUARDRAILS_AU
Error message
IBM Guardrails auth token is required. Set IBM_GUARDRAILS_AUTH_TOKEN environment variable or pass auth_token parameter.
What it means
Error "IBM Guardrails auth token is required. Set IBM_GUARDRAILS_AUTH_TOKEN environment variable or pass auth_token parameter." thrown in BerriAI/litellm.
Source
Thrown at litellm/proxy/guardrails/guardrail_hooks/ibm_guardrails/ibm_detector.py:58
base_url: str | None = None,
detector_id: str | None = None,
is_detector_server: bool = True,
detector_params: dict[str, Any] | None = None,
extra_headers: dict[str, str] | None = None,
score_threshold: float | None = None,
block_on_detection: bool = True,
verify_ssl: bool = True,
**kwargs,
):
self.async_handler = get_async_httpx_client(
llm_provider=httpxSpecialProvider.GuardrailCallback,
params={"ssl_verify": verify_ssl},
)
# Set API configuration
self.auth_token = auth_token or os.getenv("IBM_GUARDRAILS_AUTH_TOKEN")
if not self.auth_token:
raise ValueError(
"IBM Guardrails auth token is required. Set IBM_GUARDRAILS_AUTH_TOKEN environment variable or pass auth_token parameter."
)
self.base_url = base_url
if not self.base_url:
raise ValueError("IBM Guardrails base_url is required. Pass base_url parameter.")
self.detector_id = detector_id
if not self.detector_id:
raise ValueError("IBM Guardrails detector_id is required. Pass detector_id parameter.")
self.is_detector_server = is_detector_server
self.detector_params = detector_params or {}
self.extra_headers = extra_headers or {}
self.score_threshold = score_threshold
self.block_on_detection = block_on_detection
self.verify_ssl = verify_ssl
View on GitHub (pinned to 77b7c6c40c)
Solutions
- Export IBM_GUARDRAILS_AUTH_TOKEN in the proxy environment.
- Alternatively pass auth_token in the guardrail's litellm_params.
- Verify the token is valid and has access to the IBM detector service.
When it happens
Trigger: Thrown at litellm/proxy/guardrails/guardrail_hooks/ibm_guardrails/ibm_detector.py:58 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/628afcd446273c01.
Report an issue: GitHub.