bedrock_guardrailsTier 1 · 70% confidence
security-bedrock-guardrails-when-using-bedrock-guardrails-with-disable-excepti-43706a6b
agent: security
When does this happen?
IF When using Bedrock guardrails with `disable_exception_on_block: true`, a blocked prompt's guardrail response is sent to the model instead of being returned directly to the user, causing unnecessary token usage.
How others solved it
THEN Upgrade LiteLLM to the version containing the fix (commit referenced in the issue) so that pre-call guardrail blocks return the guardrail response directly without invoking the model. Alternatively, set `disable_exception_on_block: false` and handle the HTTP 400 exception in your client by catching it and displaying the guardrail's modified output to the user.
guardrails:
- guardrail_name: my-bedrock-guardrail
mode: pre_call
disable_exception_on_block: true # Remove this line or set to false to avoid model invocation after blockRelated patterns
security
security-security-site-missing-permissions-policy-header-724230ad
Tier 1 · 99%
securitysecurity-security-site-missing-referrer-policy-header-4550db61
Tier 1 · 99%
securitysecurity-security-site-missing-x-content-type-options-header-d1bbaadd
Tier 1 · 99%
securitysecurity-security-site-missing-x-frame-options-header-4d4da3fa
Tier 1 · 99%
securitysecurity-security-site-missing-hsts-strict-transport-security-header-39631536
Tier 1 · 99%
securitysecurity-security-site-missing-content-security-policy-header-723cd178
Tier 1 · 99%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.