feat: migrate web-search to support Tavily alongside Brave Search#2
Open
tavily-integrations wants to merge 3 commits intosonpiaz:mainfrom
Open
feat: migrate web-search to support Tavily alongside Brave Search#2tavily-integrations wants to merge 3 commits intosonpiaz:mainfrom
tavily-integrations wants to merge 3 commits intosonpiaz:mainfrom
Conversation
added 3 commits
April 6, 2026 16:07
…/fallback provider to web_search tool
…/fallback provider to web_search tool
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.
Summary
web_searchMCP toolSEARCH_PROVIDERenv var (bravedefault,tavilyoption)Files changed
tools/web-search/index.ts— Refactored intosearchBrave()andsearchTavily()functions with sharedSearchResultinterface, provider routing viaSEARCH_PROVIDERenv var, and mutual fallback logic.env.example— AddedTAVILY_API_KEYandSEARCH_PROVIDERdocumentationpackage.json— Added@tavily/coredependencyDependency changes
@tavily/core^0.6.0 to package.jsonEnvironment variable changes
TAVILY_API_KEY— Tavily API key (required when using Tavily provider)SEARCH_PROVIDER— Optional;'brave'(default) or'tavily'Notes for reviewers
r.contentfield is mapped todescriptionto match the existing output shape🤖 Generated with Claude Code
Automated Review
SEARCH_PROVIDERenv var. The SDK is used correctly (tavily({ apiKey }),client.search(), mappingr.content→description). TheenvVarsfix correctly removesTAVILY_API_KEYfrom startup checks, preventing the tool from being skipped for existing Brave-only users. Fallback logic in both directions (Tavily→Brave and Brave→Tavily) is sound. Two minor issues are noted but do not block approval.