{"record":{"id":"ee7057de1800112f","repo":"BerriAI/litellm","slug":"bedrock-guardrail-throttle-retries-exhausted","errorCode":null,"errorMessage":"Bedrock guardrail throttle retries exhausted","messagePattern":"Bedrock guardrail throttle retries exhausted","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py","lineNumber":1084,"sourceCode":"                return await self._post_apply_guardrail_content(\n                    content=content,\n                    base_request_data=base_request_data,\n                    credentials=credentials,\n                    aws_region_name=aws_region_name,\n                    api_key=api_key,\n                    request_data=request_data,\n                    event_type=event_type,\n                    start_time=start_time,\n                )\n            except HTTPException as exc:\n                if (\n                    exc.status_code != 429\n                    or self._is_input_too_large_error(exc.detail)\n                    or attempt >= _BEDROCK_APPLY_GUARDRAIL_MAX_THROTTLE_RETRIES\n                ):\n                    raise\n                await asyncio.sleep(_BEDROCK_APPLY_GUARDRAIL_BASE_BACKOFF_SECONDS * (2**attempt))\n        raise HTTPException(status_code=500, detail=\"Bedrock guardrail throttle retries exhausted\")\n\n    async def _post_apply_guardrail_content(\n        self,\n        content: Sequence[BedrockContentItem],\n        base_request_data: Mapping[str, Any],\n        credentials: \"Credentials\",\n        aws_region_name: str,\n        api_key: str | None,\n        request_data: dict | None,  # mutable-ok: proxy request body dict, mutated by the logging helper\n        event_type: GuardrailEventHooks,\n        start_time: \"datetime\",\n    ) -> BedrockGuardrailResponse:\n        \"\"\"Make exactly one signed ApplyGuardrail HTTP call for `content` and\n        parse the result. Raises HTTPException on a guardrail block or any\n        non-200 response (including 429, handled by the retry wrapper above).\n\n        AWS also reports some failures inside a 200 body, tagging ``Output.__type``\n        with an Exception marker. Those deliberately do NOT raise: the request proceeds,","sourceCodeStart":1066,"sourceCodeEnd":1102,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py#L1066-L1102","documentation":"Error \"Bedrock guardrail throttle retries exhausted\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py:1084 when the library encounters an invalid state.","commonSituations":"Bedrock throttled the guardrail calls repeatedly and retries were exhausted.","solutions":["Retry later; Bedrock throttling is transient.","Reduce request rate or request a Bedrock quota increase."],"exampleFix":"Add backoff between guardrail calls or raise the Bedrock TPS quota in AWS.","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"}