Data masking
Personal data and secrets are replaced with pseudonyms before the model sees them and put back in the answer.
Data masking reduces the personal data and secrets the model provider receives. The router finds full names, emails, phones, passports, individual INN and accounts, SNILS, bank cards, IP addresses, keys and tokens in a request and replaces each value with a pseudonym like [EMAIL_1]. The model answers with pseudonyms, and the router puts the original values back — in a regular answer, in a stream and in tool call arguments.
The owner or an admin of a Router space turns it on in the cabinet, on the «Data protection» page. No client code changes.
How it works
- A request reaches the router: "Reply to Anna at anna@example.com".
- The router replaces the values: "Reply to Anna at
[EMAIL_1]". One value gets one pseudonym, even when written differently. - The model gets only pseudonyms and answers with them. To keep the model from changing them, the router adds a short instruction at the start of the conversation (about 100 input tokens, billed as usual) — only when something in the request was masked.
- The router puts the values back and returns the answer: "Done, the mail for anna@example.com".
Numbering follows first appearance, so a conversation is masked the same way on every new turn and the provider's prompt cache keeps working.
Categories
| Category | What it finds |
|---|---|
| Full name | A full Russian name, a surname with initials, a first name and surname next to words like «ФИО», «клиент», «Уважаемый» |
| Email addresses | |
| Phone | Russian numbers with +7 or 8 and international ones with a country code |
| Russian passport | Series and number next to «паспорт», «серия» |
| Individual INN | 12 digits with a valid checksum next to «ИНН» |
| SNILS | A number with a valid checksum |
| Individual account | 20-digit accounts of individuals (40817, 40820, 423, 40802) |
| Bank card | Mir, Visa and Mastercard numbers with a valid checksum |
| IP address | IPv4 and IPv6, local addresses excepted |
| Secrets and keys | Cloud, LLM provider and Git platform keys and tokens, passwords in URLs and in .env |
A key can keep only some categories, for example «secrets only» for a coding agent's key. Whoever manages all keys of the space sets it.
Files and images
The router does not read images, audio or files. While masking is on, such requests do not go to Global models by default: when no fitting model is left, the router answers 400 with metadata.reason: "masking_files_blocked". Russia models get files as usual. The block can be turned off on the «Data protection» page.
Cost
While masking is on, each request carries a surcharge on its cost. The rate is shown in the cabinet on the «Data protection» page. The surcharge is a separate line in the call card, in Statistics and in the monthly contract report. Model list prices are without it.
Logs
In Logs the «Sensitive data» filter shows the requests where masking found something: any data, personal data only, secrets only or one category. The call card shows how many values of each category were replaced. The content log keeps the request and the answer with pseudonyms.
Errors
When masking cannot run, the router sends nothing to the model and charges nothing: 503 with metadata.reason: "guardrail_unavailable". The request can be retried.
Limits
- Detection is probabilistic: some values may go unnoticed.
- Lone first names ("Olya, hi"), foreign names and addresses are not masked yet.
- A value comes back in the spelling it first had. Grammatical cases of names are not corrected.
- Signed
reasoning_detailspass unchanged. - Masking is not anonymization: while the router holds the map of pseudonyms to values, the data stays personal. It reduces the data the model provider gets, but does not change its legal status or the operator's duties, cross-border transfer included.