Merge pull request #18634 from BerriAI/litellm_refactor_bedrock_guardrail

refactor: remove redundant Bedrock guardrail block handling
This commit is contained in:
YutaSaito 2026-01-05 14:12:21 +09:00 committed by GitHub
commit ff6fd0c7f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1304,11 +1304,6 @@ class BedrockGuardrail(CustomGuardrail, BaseAWSLLM):
request_data=request_data,
)
if bedrock_response.get("action") == "BLOCKED":
raise Exception(
f"Content blocked by Bedrock guardrail: {bedrock_response.get('reason', 'Unknown reason')}"
)
# Apply any masking that was applied by the guardrail
output_list = bedrock_response.get("output")