1. Two local models (~331.55 MB combined)
Stage 1 · Prompt injection guard
Horizon-Labs/prompt-injection-guard-small · 302.8 MB WASM q8 · Apache-2.0
Stage 2 · PII scrubber
Reuses ../bert-small-pii-detection/worker.js · onnx-community/bert-small-pii-detection-ONNX · 28.75 MB WASM q8 · Apache-2.0
2. Gateway decision & scrubbed prompt
Stage 1 · injection highlights
sentence windowsRun Stage 1 to mark injected sentences.
Stage 2 · PII spans
49 BIO labels- Run Stage 2 to list detected PII spans.
Safe prompt preview (what would be forwarded)
–Run both stages to build the scrubbed prompt.