mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 14:39:31 -05:00
[PR #21889] [CLOSED] feat: add Zaps Privacy Filter for OpenAI connections #41955
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/21889
Author: @argosautomation
Created: 2/26/2026
Status: ❌ Closed
Base:
main← Head:feat/zaps-privacy-filter📝 Commits (1)
98848e7feat: add Zaps Privacy Filter for OpenAI connections📊 Changes
3 files changed (+68 additions, -9 deletions)
View changed files
📝
backend/open_webui/config.py(+12 -0)📝
backend/open_webui/routers/openai.py(+36 -9)📝
src/lib/components/admin/Settings/Connections.svelte(+20 -0)📄 Description
Summary
Adds a Privacy Filter toggle to the OpenAI connection settings that routes all OpenAI-compatible requests through a Zaps.ai privacy gateway for automatic PII redaction and rehydration.
When enabled, all outgoing requests to OpenAI providers are transparently redirected to the configured Zaps URL. Zaps handles PII scrubbing before forwarding to the actual upstream provider, and rehydrates PII in responses.
Changes
Backend
config.py: AddedENABLE_ZAPS_PRIVACY_FILTERandZAPS_API_BASE_URLpersistent configurationsrouters/openai.py: Addedget_target_url()helper that conditionally redirects URLs when the filter is enabled. Applied to all OpenAI endpoints (chat completions, embeddings, models, responses, proxy)Frontend
Connections.svelte: Added "Privacy Filter (Zaps)" toggle under the OpenAI API section with descriptive textConfiguration
ENABLE_ZAPS_PRIVACY_FILTERfalseZAPS_API_BASE_URLhttp://localhost:3000Both are also configurable through the admin UI.
How It Works
get_target_url()🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.