mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 12:58:11 -05:00
[PR #24056] [CLOSED] feat: OpenAI Responses API native web_search tool support #66350
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/24056
Author: @mcowger
Created: 4/23/2026
Status: ❌ Closed
Base:
dev← Head:feat/openai-native-web-search📝 Commits (1)
863694bfeat: add OpenAI Responses API native web_search tool support📊 Changes
5 files changed (+86 additions, -6 deletions)
View changed files
📝
backend/open_webui/main.py(+4 -0)📝
backend/open_webui/routers/openai.py(+37 -4)📝
backend/open_webui/utils/payload.py(+1 -0)📝
src/lib/components/admin/Settings/WebSearch.svelte(+14 -2)📝
src/lib/components/chat/Settings/Advanced/AdvancedParams.svelte(+30 -0)📄 Description
Description
This PR adds support for OpenAI's native server-side
web_searchtool when using the Responses API (e.g. GPT-5.4). Users can now choose between OpenAI's native web search and OpenWebUI's built-in web search implementations. This addresses the web search support request raised in Discussion #11874.How it works
The existing Web Search capability (set in Model Editor → Capabilities) acts as the master switch. When enabled, the new "OpenAI Web Search (Responses API)" toggle in Advanced Params selects the implementation:
{"type": "web_search"}tool is injected into the Responses API payload; built-insearch_web/fetch_urltools are suppressedsearch_web/fetch_urltools are activeBackend changes
openai_responses_web_searchto metadata params ingenerate_chat_completionconvert_to_responses_payload()to accept and use metadata for feature/param detection{"type": "web_search"}tool into Responses API payload when web_search capability is enabled ANDopenai_responses_web_searchis truesearch_web/fetch_urltools when native mode is activeopenai_responses_web_searchtoremove_open_webui_params()so it is stripped before upstream API callsFrontend changes
model_nativeoption to Admin → Settings → Web Search engine dropdownTesting performed
openai_responses_web_search=truecorrectly injects nativeweb_searchtool into the Responses API payloadopenai_responses_web_search=false/nullfalls back to built-insearch_web/fetch_urltoolsopenai_responses_web_searchis stripped from upstream API requestdevRelated
Changelog
Added
openai_responses_web_searchparameter (Advanced Params toggle) that routes web search requests through OpenAI's nativeweb_searchtool in the Responses API instead of the built-insearch_web/fetch_urltools. The existing Web Search capability acts as the master switch; the toggle selects the implementation. (#11874)devbranch.model_nativeengine option and the Advanced Params toggle.dev.feat:prefix.Screenshots:
Chat UI:

Admin Web Search:
Model Advanced Configs:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.