Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
Target branch: Please verify that the pull request targets the dev branch.
Description: Provide a concise description of the changes made in this pull request.
Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
Testing: Have you written and run sufficient tests to validate the changes?
Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following:
Changelog Entry
Description
Adding rate limiting on web searches to avoid 429 Too Many Requests errors.
Added
Rate limiting (N requests per T seconds) on web searches to avoid 429 Too Many Requests errors.
WEB_SEARCH_RATE_LIMIT_ENABLED: Enables Web Search Rate limiting
WEB_SEARCH_RATE_LIMIT_MAX_REQUESTS: Sets N requests
WEB_SEARCH_RATE_LIMIT_MIN_SECONDS: Sets T Seconds (minimum time to complete N requests
Additional Information
This PR is to fix 429 Too Many Request errors in the web search feature.
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/17449
**Author:** [@cvaz1306](https://github.com/cvaz1306)
**Created:** 9/15/2025
**Status:** 🔄 Open
**Base:** `dev` ← **Head:** `feat/rate-limit-web-search`
---
### 📝 Commits (5)
- [`ba25c26`](https://github.com/open-webui/open-webui/commit/ba25c26b1184d28f37d27eb3f2dbf37918d94e93) adding configurable rate limit for web search
- [`15cb2e2`](https://github.com/open-webui/open-webui/commit/15cb2e289d366f5330efabaac3d4a244be8c20b9) adding configurable rate limit for web search
- [`76e7012`](https://github.com/open-webui/open-webui/commit/76e70128f658ec6fb8bf3a2c94d11e4a7717098d) Merge branch 'feat/rate-limit-web-search' of https://github.com/cvaz1306/open-webui into feat/rate-limit-web-search
- [`2a9f13a`](https://github.com/open-webui/open-webui/commit/2a9f13a451bc318708f4898243c76139bf5f9431) removing redundant asyncio.ensure_future() in retrieval.py
- [`551bc64`](https://github.com/open-webui/open-webui/commit/551bc64a8dd5528d5af338e336587f985c792ddb) Merge branch 'dev' into feat/rate-limit-web-search
### 📊 Changes
**2 files changed** (+89 additions, -2 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/config.py` (+23 -0)
📝 `backend/open_webui/routers/retrieval.py` (+66 -2)
</details>
### 📄 Description
# Pull Request Checklist
### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request.
**Before submitting, make sure you've checked the following:**
- [x] **Target branch:** Please verify that the pull request targets the `dev` branch.
- [x] **Description:** Provide a concise description of the changes made in this pull request.
- [x] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description.
- [x] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources?
- [x] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation?
- [x] **Testing:** Have you written and run sufficient tests to validate the changes?
- [x] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
- [x] **Prefix:** To clearly categorize this pull request, prefix the pull request title using one of the following:
# Changelog Entry
### Description
- Adding rate limiting on web searches to avoid 429 Too Many Requests errors.
### Added
- Rate limiting (`N` requests per `T` seconds) on web searches to avoid 429 Too Many Requests errors.
- `WEB_SEARCH_RATE_LIMIT_ENABLED`: Enables Web Search Rate limiting
- `WEB_SEARCH_RATE_LIMIT_MAX_REQUESTS`: Sets `N` requests
- `WEB_SEARCH_RATE_LIMIT_MIN_SECONDS`: Sets `T` Seconds (minimum time to complete `N` requests
---
### Additional Information
- This PR is to fix `429 Too Many Request` errors in the web search feature.
### 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/17449
Author: @cvaz1306
Created: 9/15/2025
Status: 🔄 Open
Base:
dev← Head:feat/rate-limit-web-search📝 Commits (5)
ba25c26adding configurable rate limit for web search15cb2e2adding configurable rate limit for web search76e7012Merge branch 'feat/rate-limit-web-search' of https://github.com/cvaz1306/open-webui into feat/rate-limit-web-search2a9f13aremoving redundant asyncio.ensure_future() in retrieval.py551bc64Merge branch 'dev' into feat/rate-limit-web-search📊 Changes
2 files changed (+89 additions, -2 deletions)
View changed files
📝
backend/open_webui/config.py(+23 -0)📝
backend/open_webui/routers/retrieval.py(+66 -2)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Added
Nrequests perTseconds) on web searches to avoid 429 Too Many Requests errors.WEB_SEARCH_RATE_LIMIT_ENABLED: Enables Web Search Rate limitingWEB_SEARCH_RATE_LIMIT_MAX_REQUESTS: SetsNrequestsWEB_SEARCH_RATE_LIMIT_MIN_SECONDS: SetsTSeconds (minimum time to completeNrequestsAdditional Information
429 Too Many Requesterrors in the web search feature.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.