feat: add Tavily search as configurable alternative to Serper#3
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 an optional, configurable search provider alongside the existing Serper integration (additive/parallel strategy). When configured, search queries are routed to Tavily instead of Serper; otherwise the existing Serper path is unchanged.
Changes
minimax_search_browse.pyTavilyClientfromtavily-pythonsearch_tavily(query)function that callsTavilyClient.search()and normalizes results to match Serper's shape (title,url,snippet)get_search_results(): routes to Tavily whenSEARCH_PROVIDER=tavilyorTAVILY_API_KEYis present; defaults to Serper otherwisepyproject.tomltavily-python>=0.3.0to dependencies listEnvironment Variable Changes
TAVILY_API_KEY(new, optional) — activates Tavily search pathSEARCH_PROVIDER(new, optional) — set totavilyorserper; defaults to Serper when unsetSERPER_API_KEY(existing, unchanged)Notes for Reviewers
contentfield is mapped tosnippetin normalized results, whichget_brief_text()already handlesSEARCH_PROVIDERenv var > presence ofTAVILY_API_KEY> default (Serper)Automated Review
search_tavily()function uses the correct SDK patterns, properly normalizes results to the Serper shape expected byget_brief_text(), and the provider-selection logic inget_search_results()is sensible. Thetavily-python>=0.3.0dependency is correctly added topyproject.toml. Three minor issues exist but none block approval.