[PR #10165] [CLOSED] feat: Allow blocking and allowing domains in web search as per #9912 #10130 #45522

Closed
opened 2026-04-29 19:56:30 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/10165
Author: @nachogmd
Created: 2/17/2025
Status: Closed

Base: devHead: web_search_domains


📝 Commits (1)

  • c684715 Allow blocking and allowing domains in web search as per #9912

📊 Changes

22 files changed (+393 additions, -341 deletions)

View changed files

📝 backend/open_webui/config.py (+22 -0)
📝 backend/open_webui/main.py (+4 -2)
📝 backend/open_webui/retrieval/web/bing.py (+8 -12)
📝 backend/open_webui/retrieval/web/bocha.py (+9 -8)
📝 backend/open_webui/retrieval/web/brave.py (+8 -8)
📝 backend/open_webui/retrieval/web/duckduckgo.py (+6 -7)
📝 backend/open_webui/retrieval/web/exa.py (+9 -11)
📝 backend/open_webui/retrieval/web/google_pse.py (+10 -14)
📝 backend/open_webui/retrieval/web/jina_search.py (+9 -6)
📝 backend/open_webui/retrieval/web/kagi.py (+9 -10)
📝 backend/open_webui/retrieval/web/main.py (+32 -5)
📝 backend/open_webui/retrieval/web/mojeek.py (+8 -8)
📝 backend/open_webui/retrieval/web/searchapi.py (+9 -12)
📝 backend/open_webui/retrieval/web/searxng.py (+10 -15)
📝 backend/open_webui/retrieval/web/serpapi.py (+8 -12)
📝 backend/open_webui/retrieval/web/serper.py (+7 -8)
📝 backend/open_webui/retrieval/web/serply.py (+11 -17)
📝 backend/open_webui/retrieval/web/serpstack.py (+9 -14)
📝 backend/open_webui/retrieval/web/tavily.py (+5 -8)
📝 backend/open_webui/routers/retrieval.py (+118 -117)

...and 2 more files

📄 Description

Changelog Entry

Description

  • Allow blocking and allowing domains in web search.

Added

  • Added two new env vars RAG_WEB_SEARCH_ALLOWED_DOMAIN_LIST and RAG_WEB_SEARCH_BLOCKED_DOMAIN_LIST

Changed

  • Created both environment variables in config.py
  • Changed UI so that they are persisted
  • Don't try to generate search query if ENABLE_SEARCH_QUERY_GENERATION = False
  • Changed retrieval/web/main.py to enforce these variables
  • Created a new class SearchParameters to facilitate integration of search engines and modified search engines implementations accordingly
  • Detect if no search results are returned and in such case don't try to store them
  • When informing the UI about searching include the search engine being searched and the query being made
  • Fix typo when logging in process_web_search

Deprecated

  • RAG_WEB_SEARCH_DOMAIN_FILTER_LIST is no longer used

Removed

  • RAG_WEB_SEARCH_DOMAIN_FILTER_LIST is no longer used

Fixed

  • When no search results are found it doesn't raise an error

Breaking Changes

  • BREAKING CHANGE: [List any breaking changes affecting compatibility or functionality]

--- stored value for RAG_WEB_SEARCH_DOMAIN_FILTER_LIST may require migration

Additional Information

  • Refer to issue #9912 where some additional features might come in

🔄 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/10165 **Author:** [@nachogmd](https://github.com/nachogmd) **Created:** 2/17/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `web_search_domains` --- ### 📝 Commits (1) - [`c684715`](https://github.com/open-webui/open-webui/commit/c6847159a0bca8814832e5d636a139744c5f2987) Allow blocking and allowing domains in web search as per #9912 ### 📊 Changes **22 files changed** (+393 additions, -341 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/config.py` (+22 -0) 📝 `backend/open_webui/main.py` (+4 -2) 📝 `backend/open_webui/retrieval/web/bing.py` (+8 -12) 📝 `backend/open_webui/retrieval/web/bocha.py` (+9 -8) 📝 `backend/open_webui/retrieval/web/brave.py` (+8 -8) 📝 `backend/open_webui/retrieval/web/duckduckgo.py` (+6 -7) 📝 `backend/open_webui/retrieval/web/exa.py` (+9 -11) 📝 `backend/open_webui/retrieval/web/google_pse.py` (+10 -14) 📝 `backend/open_webui/retrieval/web/jina_search.py` (+9 -6) 📝 `backend/open_webui/retrieval/web/kagi.py` (+9 -10) 📝 `backend/open_webui/retrieval/web/main.py` (+32 -5) 📝 `backend/open_webui/retrieval/web/mojeek.py` (+8 -8) 📝 `backend/open_webui/retrieval/web/searchapi.py` (+9 -12) 📝 `backend/open_webui/retrieval/web/searxng.py` (+10 -15) 📝 `backend/open_webui/retrieval/web/serpapi.py` (+8 -12) 📝 `backend/open_webui/retrieval/web/serper.py` (+7 -8) 📝 `backend/open_webui/retrieval/web/serply.py` (+11 -17) 📝 `backend/open_webui/retrieval/web/serpstack.py` (+9 -14) 📝 `backend/open_webui/retrieval/web/tavily.py` (+5 -8) 📝 `backend/open_webui/routers/retrieval.py` (+118 -117) _...and 2 more files_ </details> ### 📄 Description # Changelog Entry ### Description - Allow blocking and allowing domains in web search. ### Added - Added two new env vars RAG_WEB_SEARCH_ALLOWED_DOMAIN_LIST and RAG_WEB_SEARCH_BLOCKED_DOMAIN_LIST ### Changed - Created both environment variables in config.py - Changed UI so that they are persisted - Don't try to generate search query if ENABLE_SEARCH_QUERY_GENERATION = False - Changed retrieval/web/main.py to enforce these variables - Created a new class SearchParameters to facilitate integration of search engines and modified search engines implementations accordingly - Detect if no search results are returned and in such case don't try to store them - When informing the UI about searching include the search engine being searched and the query being made - Fix typo when logging in process_web_search ### Deprecated - RAG_WEB_SEARCH_DOMAIN_FILTER_LIST is no longer used ### Removed - RAG_WEB_SEARCH_DOMAIN_FILTER_LIST is no longer used ### Fixed - When no search results are found it doesn't raise an error ### Breaking Changes - **BREAKING CHANGE**: [List any breaking changes affecting compatibility or functionality] --- stored value for RAG_WEB_SEARCH_DOMAIN_FILTER_LIST may require migration ### Additional Information - Refer to issue #9912 where some additional features might come in --- <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-04-29 19:56:30 -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#45522