feat: add Tavily as configurable search provider alongside SearXNG#1
Open
tavily-integrations wants to merge 2 commits into
Open
Conversation
added 2 commits
April 22, 2026 13:05
… search provider alongside SearXNG
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 tool, selectable via theSEARCH_PROVIDERenv var (searxngdefault,tavilyoption)Files changed
src/devtools/tools/web_search.py— Refactored into_search_searxng()and_search_tavily()helpers;web_search()dispatches based onSEARCH_PROVIDERenv varpyproject.toml— Addedtavily-python>=0.5.0to project dependenciesdocker-compose.yml— Added commented-outSEARCH_PROVIDERandTAVILY_API_KEYenv varstests/test_web_search.py— Added 5 Tavily provider tests (success, no results, max results, routing, empty query)Dependency changes
tavily-python>=0.5.0topyproject.toml[project.dependencies]Environment variable changes
SEARCH_PROVIDER(optional; values:searxng[default],tavily)TAVILY_API_KEY(required whenSEARCH_PROVIDER=tavily)Notes for reviewers
SEARCH_PROVIDER=tavilyis explicitly set🤖 Generated with Claude Code
Automated Review
tavily-pythonis correctly placed as an optional dependency, the lazy import inside_search_tavily()allows the package to be absent when SearXNG is used,TavilyClient()correctly auto-readsTAVILY_API_KEYfrom the environment, and the pre-flight key check provides a clear error message. Tests cover success, no-results, max_results, routing, missing key, and empty query. The mock strategy (@patch("tavily.TavilyClient")) works correctly with the lazy import pattern. The lock file and docker-compose docs are properly updated. Two minor test style issues were found but neither blocks approval.