{"record":{"id":"182555993e691a34","repo":"BerriAI/litellm","slug":"response-modified-by-pipeline","errorCode":null,"errorMessage":"Response modified by pipeline","messagePattern":"Response modified by pipeline","errorType":"exception","errorClass":"ModifyResponseException","httpStatus":null,"severity":"error","filePath":"litellm/proxy/utils.py","lineNumber":1353,"sourceCode":"                    \"outcome\": sr.outcome,\n                    \"action\": sr.action_taken,\n                }\n                for sr in result.step_results\n            ]\n            error_detail: Final = {\n                \"error\": {\n                    \"message\": f\"Content blocked by guardrail pipeline '{policy_name}'\",\n                    \"type\": \"guardrail_pipeline_error\",\n                    \"pipeline_context\": {\n                        \"policy\": policy_name,\n                        \"step_results\": step_results_serializable,\n                    },\n                }\n            }\n            raise HTTPException(status_code=400, detail=error_detail)\n\n        if result.terminal_action == \"modify_response\":\n            raise ModifyResponseException(\n                message=result.modify_response_message or \"Response modified by pipeline\",\n                model=data.get(\"model\", \"unknown\"),\n                request_data=data,\n                guardrail_name=f\"pipeline:{policy_name}\",\n                detection_info=None,\n            )\n\n        return data\n\n    # The actual implementation of the function\n    @overload\n    async def pre_call_hook(\n        self,\n        user_api_key_dict: UserAPIKeyAuth,\n        data: None,\n        call_type: CallTypesLiteral,\n    ) -> None:\n        pass","sourceCodeStart":1335,"sourceCodeEnd":1371,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/utils.py#L1335-L1371","documentation":"Sentinel error meaning a guardrail pipeline step transformed the response (e.g. masked or redacted content) rather than blocking it. Unlike the blocked-content error, the request succeeded; the body/error signals that the returned content was modified by the policy named in pipeline_context.","triggerScenarios":"Thrown at litellm/proxy/utils.py:1353 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The response was altered by a guardrail/pipeline policy; review the pipeline configuration or accept the modified response."],"exampleFix":null,"handlingStrategy":"validation","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"}