mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 06:03:26 -05:00
[PR #23488] [MERGED] fix: use admin-configured WEB_SEARCH_RESULT_COUNT as default IF MODEL DID NOT PROVIDE PARAMTER #130885
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/23488
Author: @Classic298
Created: 4/7/2026
Status: ✅ Merged
Merged: 4/8/2026
Merged by: @tjbck
Base:
dev← Head:fix/web-search-result-count-default📝 Commits (1)
03f6a2efix: use admin-configured WEB_SEARCH_RESULT_COUNT as default📊 Changes
1 file changed (+5 additions, -8 deletions)
View changed files
📝
backend/open_webui/tools/builtin.py(+5 -8)📄 Description
The built-in search_web tool hardcoded count=5 as the default, ignoring the admin-configured WEB_SEARCH_RESULT_COUNT setting. When the LLM did not specify a count, the tool always returned 5 results regardless of admin configuration.
Now the tool defaults to the admin-configured value when the LLM omits the count parameter, while still capping LLM-requested values at the admin maximum to prevent abuse.
Closes #23485
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.