mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #16905] [CLOSED] fix: eliminate duplicate query generation in web search functionality #63132
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/16905
Author: @jmleksan
Created: 8/25/2025
Status: ❌ Closed
Base:
dev← Head:reuse-queries📝 Commits (4)
407dc9aMerge pull request #16507 from open-webui/dev2777babMerge pull request #16810 from open-webui/dev1db8decMerge pull request #16821 from open-webui/dev7a032c0Reuse Web Search queries when available📊 Changes
1 file changed (+30 additions, -23 deletions)
View changed files
📝
backend/open_webui/utils/middleware.py(+30 -23)📄 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
chat_completion_files_handlerto check for existing web search queriesnext()generator expression for efficient file filteringChanged
chat_completion_files_handlerto prioritize reusing web search queries over generating new oneslog.infofor query reuse events for better visibilityDeprecated
Removed
Fixed
generate_queriescalls when web search is enabledSecurity
Breaking Changes
Additional Information
chat_completion_files_handlerwas processing web search results as files and generating new queries, even though the web search handler had already generated queries for the same content.Screenshots or Videos
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.
Changelog
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.