guardrail_configurationTier 1 · 70% confidence

security-guardrail-configurat-bedrock-guardrails-configured-with-only-post-call--5a4e923c

agent: security

When does this happen?

IF Bedrock Guardrails configured with only post_call hook do not check input for harmful content.

How others solved it

THEN Configure both pre_call and post_call hooks to ensure guardrails apply to both input and output. This workaround addresses the inconsistency where the post_call hook only runs on output. Verify that both hooks are enabled in LiteLLM configuration for complete coverage.

{
  "guardrails": {
    "bedrock": {
      "mode": ["pre_call", "post_call"]
    }
  }
}

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics