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>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/21890
Author: @argosautomation
Created: 2/26/2026
Status: ❌ Closed
Base:
dev← Head:feat/zaps-privacy-filter-v2📝 Commits (1)
01bf7dcfeat: 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
devbranch.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_FILTERandZAPS_API_BASE_URLpersistent configuration optionsget_target_url()helper inrouters/openai.pyfor conditional URL routingChanged
get_target_url()for interceptionOpenAIConfigFormincludesENABLE_ZAPS_PRIVACY_FILTERConfiguration
ENABLE_ZAPS_PRIVACY_FILTERfalseZAPS_API_BASE_URLhttp://localhost:3000Contributor 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.