BerriAI/litellm · error · ValueError

IBM Guardrails detector_id is required. Pass detector_id par

Error message

IBM Guardrails detector_id is required. Pass detector_id parameter.

What it means

Error "IBM Guardrails detector_id is required. Pass detector_id parameter." thrown in BerriAI/litellm.

Source

Thrown at litellm/proxy/guardrails/guardrail_hooks/ibm_guardrails/ibm_detector.py:68

        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"

        self.guardrail_name = guardrail_name
        self.guardrail_provider = "ibm_guardrails"

        # store kwargs as optional_params

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Pass detector_id in the guardrail's litellm_params.
  2. Verify the detector_id exists in your IBM Guardrails deployment.

When it happens

Trigger: Thrown at litellm/proxy/guardrails/guardrail_hooks/ibm_guardrails/ibm_detector.py:68 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/0816831affb835cc. Report an issue: GitHub.