mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-15 23:31:29 +00:00
The bedrock guardrail e2e test could never pass on stage. Two reasons. It sent a bomb-making prompt expecting "stock hate/violence filters" to block, but the guardrail the suite points at (wk4ijrsk7ska, "husky") has no contentPolicy at all; it denies the topic and words "bread"/"cake" plus profanity. ApplyGuardrail returns action=NONE for the old prompt, so the request passes and the test reports "default-on guardrail did not block". Send a prompt the configured policy actually denies instead. It also registered the guardrail with aws_access_key_id / aws_secret_access_key / aws_region_name set to "os.environ/..." strings. Those env vars are deliberately absent from the gateway (static AWS keys hijack RDS IAM auth), and guardrail litellm_params do not expand os.environ/ indirection, so the literal string reached boto and failed with "Invalid AWS region format: 'os.environ/AWS_REGION'". Drop all three and let the gateway sign ApplyGuardrail with its own pod-identity role, which is how the standard stack is meant to reach Bedrock. Verified against the live stage proxy: registering the guardrail with only identifier/version and sending the new prompt returns 400 "Violated guardrail policy", satisfying both assertions. |
||
|---|---|---|
| .. | ||
| conftest.py | ||
| guardrails_client.py | ||
| test_apply_guardrail_e2e.py | ||
| test_bedrock_guardrail_e2e.py | ||
| test_block_code_execution_guardrail_e2e.py | ||
| test_openai_moderation_guardrail_e2e.py | ||
| test_presidio_guardrail_e2e.py | ||
| test_team_disable_global_guardrail_e2e.py | ||