fix(ui): show web search providers for all models#13472
Merged
kangfenmao merged 1 commit intomainfrom Mar 15, 2026
Merged
Conversation
Remove the `isFunctionCallingModel || isPromptToolUse` gate on the web search provider list in WebSearchQuickPanelManager. At runtime, models that lack native function-calling support automatically fall back to prompt-based tool use, so web search providers work regardless of model capability. The UI should reflect this by always showing provider options. Fixes #13466 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: icarus <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Before this PR:
Web search provider options (Tavily, SearXNG, etc.) were only shown for models matching
isFunctionCallingModel()or when the user explicitly set prompt tool-use mode. Local LLM models (e.g. Ollama) showed an empty web search panel.After this PR:
Web search provider options are always available for all models.
Fixes #13466
Why we need it and why it was done in this way
At runtime, models that lack native function-calling support automatically fall back to prompt-based tool use (
ApiService.ts:254-256), so web search providers work regardless of model capability. The UI gate was unnecessarily restrictive and out of sync with runtime behavior.The following tradeoffs were made:
The following alternatives were considered:
isFunctionCallingModel || isToolUseModeFunction) — rejected because prompt mode has almost no model restrictions, making any gate unnecessary.Breaking changes
None.
Special notes for your reviewer
Behavior change: selecting a web search provider on a non-function-calling model now silently triggers prompt-based tool use at runtime (this fallback already existed but was previously unreachable from the UI). Please consider whether this implicit fallback is acceptable or if it needs a user-visible indicator.
Checklist
Release note