{"record":{"id":"d89567bdd0856c2e","repo":"BerriAI/litellm","slug":"blocked-by-xecguard-grounding-rules-rules-str","errorCode":null,"errorMessage":"Blocked by XecGuard grounding: rules=[{rules_str}] trace_id={trace_id} rationale={rationale}","messagePattern":"Blocked by XecGuard grounding: rules=\\[(.+?)\\] trace_id=(.+?) rationale=(.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/guardrails/guardrail_hooks/xecguard/xecguard.py","lineNumber":185,"sourceCode":"        if scan_result.get(\"decision\") == \"UNSAFE\":\n            raise HTTPException(\n                status_code=400,\n                detail={\n                    \"error\": self._format_scan_block_message(scan_result),\n                    \"guardrail_name\": self.guardrail_name or \"xecguard\",\n                    \"xecguard_response\": scan_result,\n                },\n            )\n\n        if input_type == \"response\":\n            documents: Final = self._extract_grounding_documents(request_data)\n            if documents:\n                grounding_result: Final = await self._call_grounding(\n                    messages=messages,\n                    documents=documents,\n                )\n                if grounding_result is not None and grounding_result.get(\"decision\") == \"UNSAFE\":\n                    raise HTTPException(\n                        status_code=400,\n                        detail={\n                            \"error\": self._format_grounding_block_message(grounding_result),\n                            \"guardrail_name\": self.guardrail_name or \"xecguard\",\n                            \"xecguard_response\": grounding_result,\n                        },\n                    )\n\n        return inputs\n\n    async def async_logging_hook(\n        self,\n        kwargs: dict,\n        result: Any,\n        call_type: str,\n    ) -> tuple[dict, Any]:\n        \"\"\"Observe-only scan for logging_only mode.\n","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/guardrails/guardrail_hooks/xecguard/xecguard.py#L167-L203","documentation":"Error \"Blocked by XecGuard grounding: rules=[{rules_str}] trace_id={trace_id} rationale={rationale}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/guardrails/guardrail_hooks/xecguard/xecguard.py:185 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Review the grounding rules listed and adjust the request or data sources.","Use the trace_id to inspect the grounding decision in XecGuard."],"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-14T00:17:10.932Z"}