PII Masking
LiteLLM supports Microsoft Presidio for PII masking.
Step 1. Add env
export PRESIDIO_ANALYZER_API_BASE="http://localhost:5002"
export PRESIDIO_ANONYMIZER_API_BASE="http://localhost:5001"
Step 2. Set it as a callback in config.yaml
litellm_settings:
callbacks = ["presidio", ...] # e.g. ["presidio", custom_callbacks.proxy_handler_instance]
Start proxy
litellm --config /path/to/config.yaml
This will mask the input going to the llm provider