[PR #21890] [CLOSED] feat: add Zaps Privacy Filter for OpenAI connections #65182

Closed
opened 2026-05-06 10:57:15 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/21890
Author: @argosautomation
Created: 2/26/2026
Status: Closed

Base: devHead: feat/zaps-privacy-filter-v2


📝 Commits (1)

  • 01bf7dc feat: add Zaps Privacy Filter for OpenAI connections

📊 Changes

3 files changed (+57 additions, -5 deletions)

View changed files

📝 backend/open_webui/config.py (+12 -0)
📝 backend/open_webui/routers/openai.py (+25 -5)
📝 src/lib/components/admin/Settings/Connections.svelte (+20 -0)

📄 Description

Pull Request Checklist

  • Target branch: Targets the dev branch.
  • Description: See below.
  • Changelog: See below.
  • Testing: Manually verified toggle state persistence and URL interception logic.
  • Code review: Self-reviewed.

Changelog Entry

Description

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.

Added

  • ENABLE_ZAPS_PRIVACY_FILTER and ZAPS_API_BASE_URL persistent configuration options
  • get_target_url() helper in routers/openai.py for conditional URL routing
  • "Privacy Filter (Zaps)" toggle in admin Connections settings UI

Changed

  • All OpenAI endpoint URL assignments wrapped with get_target_url() for interception
  • Config GET/POST endpoints include Zaps settings
  • OpenAIConfigForm includes ENABLE_ZAPS_PRIVACY_FILTER

Configuration

Setting Env Var Default
Enable Privacy Filter ENABLE_ZAPS_PRIVACY_FILTER false
Zaps API Base URL ZAPS_API_BASE_URL http://localhost:3000

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/21890 **Author:** [@argosautomation](https://github.com/argosautomation) **Created:** 2/26/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `feat/zaps-privacy-filter-v2` --- ### 📝 Commits (1) - [`01bf7dc`](https://github.com/open-webui/open-webui/commit/01bf7dcb0baa4bffa4cd5e70207d1d7d0ef87f98) feat: add Zaps Privacy Filter for OpenAI connections ### 📊 Changes **3 files changed** (+57 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/config.py` (+12 -0) 📝 `backend/open_webui/routers/openai.py` (+25 -5) 📝 `src/lib/components/admin/Settings/Connections.svelte` (+20 -0) </details> ### 📄 Description # Pull Request Checklist - [x] **Target branch:** Targets the `dev` branch. - [x] **Description:** See below. - [x] **Changelog:** See below. - [x] **Testing:** Manually verified toggle state persistence and URL interception logic. - [x] **Code review:** Self-reviewed. # Changelog Entry ### Description Adds a **Privacy Filter** toggle to the OpenAI connection settings that routes all OpenAI-compatible requests through a [Zaps.ai](https://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. ### Added - `ENABLE_ZAPS_PRIVACY_FILTER` and `ZAPS_API_BASE_URL` persistent configuration options - `get_target_url()` helper in `routers/openai.py` for conditional URL routing - "Privacy Filter (Zaps)" toggle in admin Connections settings UI ### Changed - All OpenAI endpoint URL assignments wrapped with `get_target_url()` for interception - Config GET/POST endpoints include Zaps settings - `OpenAIConfigForm` includes `ENABLE_ZAPS_PRIVACY_FILTER` ### Configuration | Setting | Env Var | Default | |---|---|---| | Enable Privacy Filter | `ENABLE_ZAPS_PRIVACY_FILTER` | `false` | | Zaps API Base URL | `ZAPS_API_BASE_URL` | `http://localhost:3000` | --- ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-06 10:57:15 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#65182