Drop-in Faraday middleware that detects and tokenizes PII (emails, SSNs, credit cards, phone numbers, custom patterns) in outgoing LLM requests, then rehydrates tokens back in responses. Works with OpenAI, Anthropic, Gemini, RubyLLM, langchainrb, and any Faraday-based HTTP client. Includes StreamRehydrator for SSE streaming use cases.
Required Ruby Version
>= 3.1
Authors
Jibran Usman
Versions
- 0.1.0 June 03, 2026 (9.5 KB)