[PR #20070] [MERGED] feat: Apply WEB_SEARCH_CONCURRENT_REQUESTS to all search engines using semaphore #25451

Closed
opened 2026-04-20 05:56:33 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/20070
Author: @Classic298
Created: 12/21/2025
Status: Merged
Merged: 12/21/2025
Merged by: @tjbck

Base: devHead: dev


📝 Commits (4)

📊 Changes

3 files changed (+49 additions, -24 deletions)

View changed files

📝 backend/open_webui/config.py (+1 -1)
📝 backend/open_webui/routers/retrieval.py (+32 -10)
📝 src/lib/components/admin/Settings/WebSearch.svelte (+16 -13)

📄 Description

Changelog Entry

Description

The existing WEB_SEARCH_CONCURRENT_REQUESTS setting was only used by DuckDuckGo. This fix applies it to all search engines using asyncio.Semaphore, allowing users to set it to 1 for sequential query execution to prevent rate limiting errors (e.g., Brave free tier's 1 req/sec limit).

Fixes #20003, #14107 https://github.com/open-webui/open-webui/issues/15134

Changed

process_web_search now uses asyncio.Semaphore to limit concurrent queries for all engines

Moved "Concurrent Requests" input to general web search settings (visible for all engines)

Added tooltip explaining the setting: "Set to 1 for sequential execution (recommended for APIs with strict rate limits like Brave free tier)"

Deprecated

DuckDuckGo-specific "Concurrent Requests" section (now redundant)

Fixed

429 rate limiting errors with Brave Search free tier when multiple queries are generated

Breaking Changes
BREAKING CHANGE: WEB_SEARCH_CONCURRENT_REQUESTS default changed from 10 to 0 (unlimited). Previously, this setting only affected DuckDuckGo. Now it applies to all search engines and controls concurrent query execution. Users who were implicitly limited to 10 concurrent queries will now have unlimited parallel requests. If you use a rate-limited API like Brave free tier, set this to 1 for sequential execution.

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.

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged 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/20070 **Author:** [@Classic298](https://github.com/Classic298) **Created:** 12/21/2025 **Status:** ✅ Merged **Merged:** 12/21/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `dev` --- ### 📝 Commits (4) - [`08ddf0d`](https://github.com/open-webui/open-webui/commit/08ddf0d606a75e1747fa23845b05fae6e678bdeb) sequential - [`d11de16`](https://github.com/open-webui/open-webui/commit/d11de164d28813ded7fa677b1e036df85deb0fe6) Merge branch 'open-webui:dev' into dev - [`66352dc`](https://github.com/open-webui/open-webui/commit/66352dc5a9656af278dedd49a4b1af11cb7ea2ea) zero default - [`c16aff0`](https://github.com/open-webui/open-webui/commit/c16aff00f33c57c11ace4a7f30aee20de7b64a10) fix ### 📊 Changes **3 files changed** (+49 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/config.py` (+1 -1) 📝 `backend/open_webui/routers/retrieval.py` (+32 -10) 📝 `src/lib/components/admin/Settings/WebSearch.svelte` (+16 -13) </details> ### 📄 Description # Changelog Entry ### Description The existing WEB_SEARCH_CONCURRENT_REQUESTS setting was only used by DuckDuckGo. This fix applies it to all search engines using asyncio.Semaphore, allowing users to set it to 1 for sequential query execution to prevent rate limiting errors (e.g., Brave free tier's 1 req/sec limit). Fixes #20003, #14107 https://github.com/open-webui/open-webui/issues/15134 ### Changed process_web_search now uses asyncio.Semaphore to limit concurrent queries for all engines Moved "Concurrent Requests" input to general web search settings (visible for all engines) Added tooltip explaining the setting: "Set to 1 for sequential execution (recommended for APIs with strict rate limits like Brave free tier)" ### Deprecated DuckDuckGo-specific "Concurrent Requests" section (now redundant) ### Fixed 429 rate limiting errors with Brave Search free tier when multiple queries are generated **Breaking Changes** BREAKING CHANGE: WEB_SEARCH_CONCURRENT_REQUESTS default changed from 10 to 0 (unlimited). Previously, this setting only affected DuckDuckGo. Now it applies to all search engines and controls concurrent query execution. Users who were implicitly limited to 10 concurrent queries will now have unlimited parallel requests. If you use a rate-limited API like Brave free tier, set this to 1 for sequential execution. ### 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. > [!NOTE] > Deleting the CLA section will lead to immediate closure of your PR and it will not be merged 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-20 05:56:33 -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#25451