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
updates in memory custom guardrail liteLLM params
=66202d0ab735
diff --git a/litellm/integrations/custom_guardrail.py b/litellm/integrations/custom_guardrail.pyindex 40d2137a7f1..e4d16160357 100644--- a/litellm/integrations/custom_guardrail.py+++ b/litellm/integrations/custom_guardrail.py@@ -487,7 +487,8 @@ class CustomGuardrail(CustomLogger):"""Update the guardrails litellm params in memory"""- pass+ for key, value in vars(litellm_params).items():+ setattr(self, key, value)def log_guardrail_information(func):diff --git a/litellm/proxy/guardrails/guardrail_hooks/presidio.py b/litellm/proxy/guardrails/guardrail_hooks/presidio.pyindex 9feaa28004e..3e40f33d167 100644--- a/litellm/proxy/guardrails/guardrail_hooks/presidio.py+++ b/litellm/proxy/guardrails/guardrail_hooks/presidio.py@@ -675,5 +675,6 @@ class _OPTIONAL_PresidioPIIMasking(CustomGuardrail):"""Update the guardrails litellm params in memory"""+ super().update_in_memory_litellm_params(litellm_params)if litellm_params.pii_entities_config:self.pii_entities_config = litellm_params.pii_entities_config