BerriAI/litellm · error · ValueError
IBM Guardrails base_url is required. Pass base_url parameter
Error message
IBM Guardrails base_url is required. Pass base_url parameter.
What it means
Error "IBM Guardrails base_url is required. Pass base_url parameter." thrown in BerriAI/litellm.
Source
Thrown at litellm/proxy/guardrails/guardrail_hooks/ibm_guardrails/ibm_detector.py:64
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
# Construct API URL based on server type
if self.is_detector_server:
self.api_url = f"{self.base_url}/api/v1/text/contents"
else:
self.api_url = f"{self.base_url}/api/v2/text/detection/content"
View on GitHub (pinned to 77b7c6c40c)
Solutions
- Pass base_url in the guardrail's litellm_params pointing at your IBM Guardrails detector endpoint.
- Confirm the URL scheme (https) and host are reachable from the proxy.
When it happens
Trigger: Thrown at litellm/proxy/guardrails/guardrail_hooks/ibm_guardrails/ibm_detector.py:64 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/57140c5de1989a1f.
Report an issue: GitHub.