Detection runs inside, reasoning runs outside#
The step that has to see real data — detection — runs on your infrastructure. Salus's self-hosted PII model handles free text, while deterministic validators handle structured identifiers (national IDs, IBANs, phone numbers, account numbers) on a fast path. Optional vision models detect sensitive content in files, screenshots, and images. None of this calls out.
The external model only ever performs step 3's job: reasoning and writing, over tokens.
Deterministic tokens preserve context#
Tokens are typed and deterministic: the same phone number produces the same PHONE_8f3a within a configured scope (tenant, user, app, or conversation). The model can therefore track who did what across a long document or conversation — the relationships between entities survive, which is why answer quality stays high. Tokenization covers this mechanism in depth.
Streaming responses are restored live#
Modern AI responses stream token by token, and a restore step that waited for the full response would freeze every chat window. Salus restores inline as the stream arrives, using a small hold-back window — just enough to catch a token split across stream chunks. The stream stays live; the user sees restored values appear in real time.
When something fails#
Every failure mode has a declared behavior, configured per data class. The defaults are conservative: if detection is unavailable, requests carrying sensitive-marked classes are blocked; if the vault is unreachable, a response marked for restore is held rather than delivered with tokens in it. The principle: fail closed by default, per-class configurable — and open never means raw.