feat: add TavilyProvider to search fallback chain (priority 3)#5
Open
tavily-integrations wants to merge 1 commit into
Open
Conversation
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
Adds Tavily as a configurable search provider in the multi-provider fallback chain, slotted at priority 3 between SearXNG (1) and SerpAPI (5). This is an additive change — all existing providers remain untouched.
Tavily is an LLM-optimized search API that provides high-quality, relevant results. It is disabled by default and activates only when
TAVILY_API_KEYis set, consistent with the BraveSearchProvider and SerpAPIProvider patterns.Files changed
server/src/search/TavilyProvider.ts(new) — ImplementsSearchProviderinterface using@tavily/coreSDK. Maps Tavily response fields (title,url,content) to theSearchResultshape.server/src/search/SearchProviderManager.ts— Imports and registersTavilyProviderat priority 3. Updated fallback chain comment to include Tavily.server/src/search/index.ts— ExportsTavilyProvider.server/package.json— Added@tavily/coredependency..env.example— AddedTAVILY_API_KEYenv var reference.Dependency changes
@tavily/core: ^0.6.4toserver/package.jsonEnvironment variable changes
TAVILY_API_KEYto.env.example(optional, enables TavilyProvider when set)Updated fallback chain
Notes for reviewers
DuckDuckGoProvider.tsandtough-cookieare unrelated to this changesearchDepth: 'basic'by default for cost efficiency (1 credit per search)Automated Review