Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix linting

Ishaan Jaff5442611a0b65
diff --git a/litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py b/litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py
index 39b6fe9a25e..a16f7f1a0b2 100644
--- a/litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py
+++ b/litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py
@@ -306,8 +306,8 @@ class BedrockGuardrail(CustomGuardrail, BaseAWSLLM):
contextual_grounding_policy = assessment.get("contextualGroundingPolicy")
if contextual_grounding_policy:
grounding_filters = contextual_grounding_policy.get("filters", [])
- for filter_item in grounding_filters:
- if filter_item.get("action") == "BLOCKED":
+ for grounding_filter in grounding_filters:
+ if grounding_filter.get("action") == "BLOCKED":
return True
# If we got here, intervention occurred but no BLOCKED actions found