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 error

Ishaan Jaffa28ac57233f1
diff --git a/enterprise/enterprise_hooks/aporia_ai.py b/enterprise/enterprise_hooks/aporia_ai.py
index d258f002338..2b427bea5ce 100644
--- a/enterprise/enterprise_hooks/aporia_ai.py
+++ b/enterprise/enterprise_hooks/aporia_ai.py
@@ -163,7 +163,7 @@ class AporiaGuardrail(CustomGuardrail):
pass
- async def async_moderation_hook( ### 👈 KEY CHANGE ###
+ async def async_moderation_hook(
self,
data: dict,
user_api_key_dict: UserAPIKeyAuth,
@@ -173,6 +173,7 @@ class AporiaGuardrail(CustomGuardrail):
"image_generation",
"moderation",
"audio_transcription",
+ "responses",
],
):
from litellm.proxy.common_utils.callback_utils import (
diff --git a/enterprise/enterprise_hooks/openai_moderation.py b/enterprise/enterprise_hooks/openai_moderation.py
index 47506a00c42..1db932c853e 100644
--- a/enterprise/enterprise_hooks/openai_moderation.py
+++ b/enterprise/enterprise_hooks/openai_moderation.py
@@ -31,7 +31,7 @@ class _ENTERPRISE_OpenAI_Moderation(CustomLogger):
#### CALL HOOKS - proxy only ####
- async def async_moderation_hook( ### 👈 KEY CHANGE ###
+ async def async_moderation_hook(
self,
data: dict,
user_api_key_dict: UserAPIKeyAuth,
@@ -41,6 +41,7 @@ class _ENTERPRISE_OpenAI_Moderation(CustomLogger):
"image_generation",
"moderation",
"audio_transcription",
+ "responses",
],
):
text = ""
diff --git a/litellm/proxy/guardrails/guardrail_hooks/aporia_ai.py b/litellm/proxy/guardrails/guardrail_hooks/aporia_ai.py
index 4e37b4eb849..3c39b90b0a5 100644
--- a/litellm/proxy/guardrails/guardrail_hooks/aporia_ai.py
+++ b/litellm/proxy/guardrails/guardrail_hooks/aporia_ai.py
@@ -178,7 +178,7 @@ class AporiaGuardrail(CustomGuardrail):
pass
@log_guardrail_information
- async def async_moderation_hook( ### 👈 KEY CHANGE ###
+ async def async_moderation_hook(
self,
data: dict,
user_api_key_dict: UserAPIKeyAuth,
@@ -188,6 +188,7 @@ class AporiaGuardrail(CustomGuardrail):
"image_generation",
"moderation",
"audio_transcription",
+ "responses",
],
):
from litellm.proxy.common_utils.callback_utils import (
diff --git a/litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py b/litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py
index 53ab08999e9..7686fba7cf6 100644
--- a/litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py
+++ b/litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py
@@ -240,7 +240,7 @@ class BedrockGuardrail(CustomGuardrail, BaseAWSLLM):
)
@log_guardrail_information
- async def async_moderation_hook( ### 👈 KEY CHANGE ###
+ async def async_moderation_hook(
self,
data: dict,
user_api_key_dict: UserAPIKeyAuth,
@@ -250,6 +250,7 @@ class BedrockGuardrail(CustomGuardrail, BaseAWSLLM):
"image_generation",
"moderation",
"audio_transcription",
+ "responses",
],
):
from litellm.proxy.common_utils.callback_utils import (
diff --git a/litellm/proxy/guardrails/guardrail_hooks/lakera_ai.py b/litellm/proxy/guardrails/guardrail_hooks/lakera_ai.py
index f55b78b0a92..5d3b8be3341 100644
--- a/litellm/proxy/guardrails/guardrail_hooks/lakera_ai.py
+++ b/litellm/proxy/guardrails/guardrail_hooks/lakera_ai.py
@@ -134,6 +134,7 @@ class lakeraAI_Moderation(CustomGuardrail):
"audio_transcription",
"pass_through_endpoint",
"rerank",
+ "responses",
],
):
if (
@@ -335,7 +336,7 @@ class lakeraAI_Moderation(CustomGuardrail):
)
@log_guardrail_information
- async def async_moderation_hook( ### 👈 KEY CHANGE ###
+ async def async_moderation_hook(
self,
data: dict,
user_api_key_dict: UserAPIKeyAuth,
@@ -345,6 +346,7 @@ class lakeraAI_Moderation(CustomGuardrail):
"image_generation",
"moderation",
"audio_transcription",
+ "responses",
],
):
if self.event_hook is None: