Masking
Overview
masking is a route-local plugin that detects personal data (emails, phone numbers, names, and other configured entity types) in the provider-bound request and replaces each occurrence with a deterministic placeholder, such as [EMAIL_ADDRESS_0], immediately before the request is encoded and sent to the model provider. The same value gets the same placeholder everywhere in one request; two different values get different placeholders.
It can also mask what your own rules find, such as an employee ID pattern or the account numbers a System One span question finds, each under a placeholder of its own.
What Problem Does It Solve?
Some routes send traffic to a model provider that should never see raw personal data — a third-party API, a lower-trust tier, or a route subject to a data-handling policy. The router can already detect PII and act on it by refusing a request or routing it to a safer model, but neither of those sends the request with the PII removed. masking rewrites the content in place so the provider only ever sees placeholders, without requiring every caller to redact input themselves.
Because every wire format (Chat Completions, Responses, Anthropic Messages) is decoded into one neutral request before plugins run, this happens identically regardless of which API a client used to reach the router.