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]

CR

Tomer Bin32dedbe55139
diff --git a/litellm/proxy/guardrails/guardrail_hooks/aim.py b/litellm/proxy/guardrails/guardrail_hooks/aim.py
index 033b4ca4fb3..920d9161497 100644
--- a/litellm/proxy/guardrails/guardrail_hooks/aim.py
+++ b/litellm/proxy/guardrails/guardrail_hooks/aim.py
@@ -30,6 +30,7 @@ from litellm.types.utils import (
ModelResponseStream,
)
+
class AimGuardrailMissingSecrets(Exception):
pass
@@ -120,9 +121,9 @@ class AimGuardrail(CustomGuardrail):
{"x-aim-user-email": user_email} if user_email else {}
)
response = await self.async_handler.post(
- f"{self.api_base}/detect",
+ f"{self.api_base}/detect/output",
headers=headers,
- json={"user_prompt": output},
+ json={"output": output, "messages": request_data.get("messages", [])},
)
response.raise_for_status()
res = response.json()