From e22eeab464d1929a2fe3dc34fbc19b3408d50683 Mon Sep 17 00:00:00 2001 From: abrekhov Date: Mon, 24 Aug 2026 10:33:51 +0000 Subject: [PATCH] refactor(guardrails): accept AIDR mappings --- .../guardrail_hooks/crowdstrike_aidr/crowdstrike_aidr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/guardrails/guardrail_hooks/crowdstrike_aidr/crowdstrike_aidr.py b/litellm/proxy/guardrails/guardrail_hooks/crowdstrike_aidr/crowdstrike_aidr.py index 38e192ebe3d..698769b5fd6 100644 --- a/litellm/proxy/guardrails/guardrail_hooks/crowdstrike_aidr/crowdstrike_aidr.py +++ b/litellm/proxy/guardrails/guardrail_hooks/crowdstrike_aidr/crowdstrike_aidr.py @@ -274,7 +274,7 @@ class CrowdStrikeAIDRHandler(CustomGuardrail): ) async def _call_crowdstrike_aidr_guard( - self, payload: dict[str, Any], hook_name: str + self, payload: Mapping[str, Any], hook_name: str ) -> _GuardChatCompletionsResult: """ Makes the API call to the CrowdStrike AIDR AI Guard endpoint. @@ -364,7 +364,7 @@ class CrowdStrikeAIDRHandler(CustomGuardrail): tail: Final = guard_output.messages[-num_assistant_messages:] if num_assistant_messages > 0 else [] return [_extract_text_from_message(msg) for msg in tail] - async def _call_or_fail_open(self, payload: dict[str, Any], hook_name: str) -> _GuardChatCompletionsResult: + async def _call_or_fail_open(self, payload: Mapping[str, Any], hook_name: str) -> _GuardChatCompletionsResult: try: return await self._call_crowdstrike_aidr_guard(payload, hook_name) except HTTPException: