AIToday
Large Language ModelsAI Safety & AlignmentOpen-Source AIHacker NewsPublished: Aug 19, 2026, 22:00 JST

LLM-Shield-Proxy: Zero-Egress PII Redaction in 55MB RAM

LLM-Shield-Proxy: Zero-Egress PII Redaction in 55MB RAM

3 Key Points

  1. What happened

    An open-source reverse proxy for Large Language Models has been released that intercepts API requests, redacts Personally Identifiable Information (PII) and secrets before they leave your infrastructure, and re-hydrates Server-Sent Event (SSE) responses with minimal latency. The proxy runs locally within a corporate VPC, requires less than 60MB of RAM in standard mode, and works with OpenAI-compatible APIs without requiring code changes—you only need to change your SDK's base_url endpoint.

  2. Why it matters

    Enterprises using cloud LLM providers (OpenAI, Anthropic, Google, DeepSeek, Mistral) face a compliance dilemma: sending sensitive data to external APIs violates SOC 2, HIPAA, and GDPR rules, yet existing local PII-detection tools (Microsoft Presidio, spaCy) consume 1GB+ of RAM and add 50–150ms latency per request, breaking real-time chat. LLM-Shield-Proxy solves this by running deterministic pattern matching and optional neural entity extraction (BERT-NER via ONNX) entirely within your VPC, keeping sensitive prompts and responses inside your corporate boundary with no persistent storage.

  3. What to watch

    The proxy offers two redaction modes—Synthetic Swapping (default, substitutes PII with realistic placeholder names to preserve LLM token efficiency) and Structural Tagging (bracketed labels for audit trails). It supports custom regex injection via a YAML file using the re2 C++ engine for ReDoS immunity. A quantized ONNX NER model can be added for conversational entity detection (>95% F1 recall) by installing the [ner] extra, adding 45–65MB RAM; enterprises can plug in domain-specific models (BioBERT for healthcare, Legal-BERT for contracts) by pointing ONNX_MODEL_PATH.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

The problem LLM-Shield-Proxy addresses is a fundamental tension in enterprise AI adoption: organizations sending requests to external LLM providers (OpenAI, Anthropic, Google, DeepSeek, Mistral) must comply with SOC 2, HIPAA, and GDPR regulations that prohibit unmasked PII egress, yet the existing open-source solutions for local PII detection—chiefly Microsoft Presidio and spaCy—carry heavy memory and latency penalties (1GB+ RAM, 50–150ms per request) that are incompatible with real-time streaming chat interfaces.

LLM-Shield-Proxy reduces this to a solved problem by operating a three-tier detection architecture entirely within a corporate VPC. Tier 1 uses regex to catch structured PII (SSNs, email addresses, IP/MAC addresses) and high-entropy secrets (API keys, hex tokens) with deterministic accuracy. Tier 2 applies Shannon entropy scoring to identify cryptographic tokens by statistical signature alone. For organizations requiring higher recall on conversational PII (patient names, organization names buried in free text), Tier 3 optionally layers in a quantized BERT-NER model via ONNX runtime, claiming >95% F1 recall on benchmark datasets while staying under 65MB additional RAM—roughly one-tenth the footprint of Presidio or spaCy.

The architectural innovation is that the proxy operates as a drop-in reverse proxy requiring zero code changes, no external API calls, no persistent storage, and submicrosecond latency overhead. Because it natively implements the OpenAI API schema, an existing application routing requests to OpenAI need only change its endpoint URL; the proxy transparently intercepts, redacts deterministically, re-synthesizes streaming packets (using either realistic placeholder names or bracketed tags), and forwards the masked payload upstream. This "zero-egress" model keeps sensitive prompts and responses within the corporate boundary at all times.

FAQ
Do I need to change my application code to use it?
No. Because LLM-Shield-Proxy natively mimics the OpenAI API specification, you only need to change the base_url in your SDK from https://api.openai.com/v1 to http://localhost:8000/v1 (or your proxy address). The proxy intercepts the request, redacts it, and forwards it upstream—no SDK rewrite required.
Can I detect custom PII formats like internal employee IDs?
Yes. You can inject custom regex rules via a custom_regex.yaml file mounted into the proxy and pointed to via CUSTOM_REGEX_PATH. The proxy compiles all patterns using the google-re2 C++ engine, which guarantees O(N) execution time and immunity against ReDoS (Regular Expression Denial of Service) attacks regardless of regex complexity.
Does the proxy support streaming responses?
Yes. The proxy is specifically designed to redact and re-hydrate Server-Sent Event (SSE) streams delta-by-delta with microsecond latency (less than 6 microseconds overhead reported), addressing a gap in legacy proxies that buffer entire responses before scanning, causing multi-second UI latency stalls.

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleDebate Training Cuts Reward Hacking in AI Alignment Research