BerriAI/litellm · error · HTTPException
Bedrock guardrail throttle retries exhausted
Error message
Bedrock guardrail throttle retries exhausted
What it means
Error "Bedrock guardrail throttle retries exhausted" thrown in BerriAI/litellm.
Source
Thrown at litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py:1084
return await self._post_apply_guardrail_content(
content=content,
base_request_data=base_request_data,
credentials=credentials,
aws_region_name=aws_region_name,
api_key=api_key,
request_data=request_data,
event_type=event_type,
start_time=start_time,
)
except HTTPException as exc:
if (
exc.status_code != 429
or self._is_input_too_large_error(exc.detail)
or attempt >= _BEDROCK_APPLY_GUARDRAIL_MAX_THROTTLE_RETRIES
):
raise
await asyncio.sleep(_BEDROCK_APPLY_GUARDRAIL_BASE_BACKOFF_SECONDS * (2**attempt))
raise HTTPException(status_code=500, detail="Bedrock guardrail throttle retries exhausted")
async def _post_apply_guardrail_content(
self,
content: Sequence[BedrockContentItem],
base_request_data: Mapping[str, Any],
credentials: "Credentials",
aws_region_name: str,
api_key: str | None,
request_data: dict | None, # mutable-ok: proxy request body dict, mutated by the logging helper
event_type: GuardrailEventHooks,
start_time: "datetime",
) -> BedrockGuardrailResponse:
"""Make exactly one signed ApplyGuardrail HTTP call for `content` and
parse the result. Raises HTTPException on a guardrail block or any
non-200 response (including 429, handled by the retry wrapper above).
AWS also reports some failures inside a 200 body, tagging ``Output.__type``
with an Exception marker. Those deliberately do NOT raise: the request proceeds,View on GitHub (pinned to 77b7c6c40c)
Solutions
- Retry later; Bedrock throttling is transient.
- Reduce request rate or request a Bedrock quota increase.
Example fix
Add backoff between guardrail calls or raise the Bedrock TPS quota in AWS.
When it happens
Trigger: Thrown at litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py:1084 when the library encounters an invalid state.
Common situations: Bedrock throttled the guardrail calls repeatedly and retries were exhausted.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/ee7057de1800112f.
Report an issue: GitHub.