{"record":{"id":"628afcd446273c01","repo":"BerriAI/litellm","slug":"ibm-guardrails-auth-token-is-required-set-ibm-gua","errorCode":null,"errorMessage":"IBM Guardrails auth token is required. Set IBM_GUARDRAILS_AUTH_TOKEN environment variable or pass auth_token parameter.","messagePattern":"IBM Guardrails auth token is required\\. Set IBM_GUARDRAILS_AUTH_TOKEN environment variable or pass auth_token parameter\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/proxy/guardrails/guardrail_hooks/ibm_guardrails/ibm_detector.py","lineNumber":58,"sourceCode":"        base_url: str | None = None,\n        detector_id: str | None = None,\n        is_detector_server: bool = True,\n        detector_params: dict[str, Any] | None = None,\n        extra_headers: dict[str, str] | None = None,\n        score_threshold: float | None = None,\n        block_on_detection: bool = True,\n        verify_ssl: bool = True,\n        **kwargs,\n    ):\n        self.async_handler = get_async_httpx_client(\n            llm_provider=httpxSpecialProvider.GuardrailCallback,\n            params={\"ssl_verify\": verify_ssl},\n        )\n\n        # Set API configuration\n        self.auth_token = auth_token or os.getenv(\"IBM_GUARDRAILS_AUTH_TOKEN\")\n        if not self.auth_token:\n            raise ValueError(\n                \"IBM Guardrails auth token is required. Set IBM_GUARDRAILS_AUTH_TOKEN environment variable or pass auth_token parameter.\"\n            )\n\n        self.base_url = base_url\n        if not self.base_url:\n            raise ValueError(\"IBM Guardrails base_url is required. Pass base_url parameter.\")\n\n        self.detector_id = detector_id\n        if not self.detector_id:\n            raise ValueError(\"IBM Guardrails detector_id is required. Pass detector_id parameter.\")\n\n        self.is_detector_server = is_detector_server\n        self.detector_params = detector_params or {}\n        self.extra_headers = extra_headers or {}\n        self.score_threshold = score_threshold\n        self.block_on_detection = block_on_detection\n        self.verify_ssl = verify_ssl\n","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/guardrails/guardrail_hooks/ibm_guardrails/ibm_detector.py#L40-L76","documentation":"Error \"IBM Guardrails auth token is required. Set IBM_GUARDRAILS_AUTH_TOKEN environment variable or pass auth_token parameter.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/guardrails/guardrail_hooks/ibm_guardrails/ibm_detector.py:58 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}