[PR #17449] [CLOSED] feat: Add Configurable Rate Limit for Web Search #47482

Closed
opened 2026-04-29 22:42:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/17449
Author: @cvaz1306
Created: 9/15/2025
Status: Closed

Base: devHead: feat/rate-limit-web-search


📝 Commits (6)

  • ba25c26 adding configurable rate limit for web search
  • 15cb2e2 adding configurable rate limit for web search
  • 76e7012 Merge branch 'feat/rate-limit-web-search' of https://github.com/cvaz1306/open-webui into feat/rate-limit-web-search
  • 2a9f13a removing redundant asyncio.ensure_future() in retrieval.py
  • 551bc64 Merge branch 'dev' into feat/rate-limit-web-search
  • d85ab78 Merge branch 'dev' into feat/rate-limit-web-search

📊 Changes

2 files changed (+87 additions, -1 deletions)

View changed files

📝 backend/open_webui/config.py (+23 -0)
📝 backend/open_webui/routers/retrieval.py (+64 -1)

📄 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:

  • 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:** ❌ Closed **Base:** `dev` ← **Head:** `feat/rate-limit-web-search` --- ### 📝 Commits (6) - [`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 - [`d85ab78`](https://github.com/open-webui/open-webui/commit/d85ab787cf55a0e4e2b2a998db53b43b5e471446) Merge branch 'dev' into feat/rate-limit-web-search ### 📊 Changes **2 files changed** (+87 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/config.py` (+23 -0) 📝 `backend/open_webui/routers/retrieval.py` (+64 -1) </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>
GiteaMirror added the pull-request label 2026-04-29 22:42:38 -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#47482