mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 04:16:03 -05:00
[PR #20070] [MERGED] feat: Apply WEB_SEARCH_CONCURRENT_REQUESTS to all search engines using semaphore #25451
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/20070
Author: @Classic298
Created: 12/21/2025
Status: ✅ Merged
Merged: 12/21/2025
Merged by: @tjbck
Base:
dev← Head:dev📝 Commits (4)
08ddf0dsequentiald11de16Merge branch 'open-webui:dev' into dev66352dczero defaultc16aff0fix📊 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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.