Skip to content

feat: add Tavily as a configurable search provider#1

Open
tavily-integrations wants to merge 1 commit intobysiber:mainfrom
Tavily-FDE:feat/tavily-migration/deepworm-tavily-provider
Open

feat: add Tavily as a configurable search provider#1
tavily-integrations wants to merge 1 commit intobysiber:mainfrom
Tavily-FDE:feat/tavily-migration/deepworm-tavily-provider

Conversation

@tavily-integrations
Copy link
Copy Markdown

Summary

  • Added Tavily as a fourth search provider option alongside DuckDuckGo (default), Brave, and SearXNG
  • Tavily is opt-in via --search-provider tavily or DEEPWORM_SEARCH_PROVIDER=tavily
  • Uses search_depth="advanced" and include_raw_content=True for research-quality results
  • Existing providers remain fully intact and unchanged

Files changed

  • pyproject.toml — Added tavily-python>=0.3.0 to core dependencies
  • deepworm/search.py — Added _search_tavily() function and wired it into search_web() dispatch
  • deepworm/config.py — Added "tavily" to VALID_SEARCH_PROVIDERS set
  • deepworm/__main__.py — Added "tavily" to --search-provider CLI choices

Dependency changes

  • Added tavily-python>=0.3.0 to pyproject.toml dependencies

Environment variable changes

  • TAVILY_API_KEY — Required when search_provider=tavily (validated at search time, same pattern as BRAVE_API_KEY)

Notes for reviewers

  • The _search_tavily() function returns results in the same SearchResult schema as other providers, so researcher.py requires no changes
  • API key validation happens at search time in _search_tavily(), consistent with how _search_brave() validates BRAVE_API_KEY
  • Falls back to DuckDuckGo if Tavily search fails, matching existing fallback behavior

🤖 Generated with Claude Code

Automated Review

  • Passed after 1 attempt(s)
  • Final review: The Tavily provider migration is a clean, additive implementation that correctly integrates Tavily as a fourth search provider. All four files from the plan are modified, SDK usage is correct, and existing providers are completely untouched. There are two minor issues: tavily-python is added as a mandatory core dependency rather than an optional extra (unlike anthropic and google which are optional), and the body field is not serialized in the search cache — though the latter is a pre-existing limitation affecting all providers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant