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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix: update PresidioAnalyzeRequest type to support Union entities
Arshdeep Singhcb14bb341d4c
diff --git a/litellm/proxy/guardrails/guardrail_hooks/presidio.py b/litellm/proxy/guardrails/guardrail_hooks/presidio.pyindex d2ec0471e78..e3f114c746f 100644--- a/litellm/proxy/guardrails/guardrail_hooks/presidio.py+++ b/litellm/proxy/guardrails/guardrail_hooks/presidio.py@@ -173,7 +173,7 @@ class _OPTIONAL_PresidioPIIMasking(CustomGuardrail):analyze_payload["ad_hoc_recognizers"] = self.ad_hoc_recognizersif self.pii_entities_config:- analyze_payload["entities"] = list(self.pii_entities_config.keys()) # type: ignore+ analyze_payload["entities"] = list(self.pii_entities_config.keys())########################################################################### End of adding config paramsdiff --git a/litellm/types/proxy/guardrails/guardrail_hooks/presidio.py b/litellm/types/proxy/guardrails/guardrail_hooks/presidio.pyindex 5e480db4826..89e0f39c438 100644--- a/litellm/types/proxy/guardrails/guardrail_hooks/presidio.py+++ b/litellm/types/proxy/guardrails/guardrail_hooks/presidio.py@@ -9,7 +9,7 @@ class PresidioAnalyzeRequest(TypedDict, total=False):text: strlanguage: Optional[str]ad_hoc_recognizers: Optional[List[str]]- entities: Optional[List[PiiEntityType]]+ entities: Optional[List[Union[PiiEntityType, str]]]class PresidioAnalyzeResponseItem(TypedDict, total=False):