Skip to content

feat: add Tavily as configurable search provider in Table-as-Search#4

Open
tavily-integrations wants to merge 1 commit into
ATH-MaaS:mainfrom
Tavily-FDE:feat/tavily-migration/table-as-search-google-to-tavily
Open

feat: add Tavily as configurable search provider in Table-as-Search#4
tavily-integrations wants to merge 1 commit into
ATH-MaaS:mainfrom
Tavily-FDE:feat/tavily-migration/table-as-search-google-to-tavily

Conversation

@tavily-integrations

Copy link
Copy Markdown

Summary

  • Added TavilySearchTool class in tools/google_search_tool.py that implements the same smolagents.Tool interface as GoogleSearchTool, wrapping tavily-python's TavilyClient.search()
  • The tool reuses name='google_search' so agent prompts work without modification
  • Updated create_search_tool() in both run_deepsearch_inference.py and run_widesearch_inference.py to check SEARCH_PROVIDER env var and instantiate TavilySearchTool when set to 'tavily'
  • Added tavily-python>=0.5.0 to requirements.txt
  • Batch inference files (run_deepsearch_batch_inference.py, run_widesearch_batch_inference.py) require no changes as they delegate to the updated inference modules

Files changed

  • Marco-DeepResearch-Family/Table-as-Search/tools/google_search_tool.py — added TavilySearchTool class
  • Marco-DeepResearch-Family/Table-as-Search/run_deepsearch_inference.py — import TavilySearchTool, update create_search_tool() with provider selection
  • Marco-DeepResearch-Family/Table-as-Search/run_widesearch_inference.py — same changes as deepsearch
  • Marco-DeepResearch-Family/Table-as-Search/requirements.txt — added tavily-python>=0.5.0

Dependency changes

  • Added tavily-python>=0.5.0 to requirements.txt

Environment variable changes

  • TAVILY_API_KEY — required when SEARCH_PROVIDER=tavily
  • SEARCH_PROVIDER — optional, values: google (default) | tavily

Notes for reviewers

  • Existing Google Search + Jina fallback path is completely unchanged
  • TavilySearchTool honours GlobalSearchCounter with the same budget messages
  • The tool name stays 'google_search' per plan requirements so hardcoded agent prompts are unaffected

🤖 Generated with Claude Code

Automated Review

  • Passed after 1 attempt(s)
  • Final review: The migration correctly adds TavilySearchTool as an additive, opt-in alternative to GoogleSearchTool. The Tavily SDK usage is valid (TavilyClient.search() with correct parameters, correct response field mapping), the smolagents Tool interface is preserved, GlobalSearchCounter integration is correct, requirements.txt is updated, and the default behavior (SEARCH_PROVIDER defaults to "google") ensures no regression. Three minor issues exist: the tool description is copy-pasted from GoogleSearchTool and contains Google-specific text/caveats that don't apply to Tavily (this text is exposed to the LLM agent), the search budget counter label still says "Google Search Budget", and the new env vars (TAVILY_API_KEY, SEARCH_PROVIDER) are not documented in any README or .env.example. None of these block approval.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Tavily PR Agent seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants