Clean traces, untouched answers: masking PII in LiteLLM's logs without corrupting the response
+- 1One endpoint, scoped keys
- 2Route work to the right model
- 3Mask PII at the gateway
- 4Clean traces, untouched answers
- 🏆Prove it holds under load
Part 3 configured Presidio to mask prompts at logging time and deliberately stopped short of proving it. Nothing had been wired to a logging destination yet, so there was no trace to inspect.
This post wires one up, finds <PERSON> where it should be — and then finds the
customer's real email address sitting a few lines below it, in the model's reply.
