Skip to content

feat: add Tavily as configurable search provider alongside Google PSE#3

Open
tavily-integrations wants to merge 2 commits into
chhanz:mainfrom
Tavily-FDE:feat/tavily-migration/google-pse-search-skill
Open

feat: add Tavily as configurable search provider alongside Google PSE#3
tavily-integrations wants to merge 2 commits into
chhanz:mainfrom
Tavily-FDE:feat/tavily-migration/google-pse-search-skill

Conversation

@tavily-integrations
Copy link
Copy Markdown

Summary

  • Added Tavily as a configurable parallel/fallback search provider in scripts/search.py
  • New --provider flag accepts google (default), tavily, or auto (Google PSE with Tavily fallback on 403/429)
  • Tavily results are normalized into the same Markdown output format as Google PSE for consistent caller experience
  • Tavily is fully optional — the script continues to work without TAVILY_API_KEY set

Files changed

  • scripts/search.py — Added get_tavily_client(), tavily_search(), format_tavily_results() functions; added --provider CLI argument; updated search() to route by provider and fall back to Tavily on quota errors
  • SKILL.md — Updated description, search tool priority table, usage examples, options table, and error handling table to document Tavily provider
  • requirements.txt — New file listing requests and tavily-python dependencies

Dependency changes

  • Added tavily-python to requirements.txt

Environment variable changes

  • Added optional TAVILY_API_KEY — enables --provider tavily and --provider auto fallback

Notes for reviewers

  • This is an additive change: existing Google PSE behavior is fully preserved when --provider google (the default) is used
  • tavily-python is imported lazily so the script doesn't fail if the package is not installed and Tavily is not being used
  • The --provider auto mode tries Google PSE first, then falls back to Tavily only on HTTP 403/429 (quota/rate-limit errors)

Automated Review

  • Passed after 2 attempt(s)
  • Final review: The implementation correctly addresses all three prior review issues: unsupported-flag stderr warnings with date mapping, elimination of redundant TavilyClient instantiation in the auto fallback path, and pinned dependency versions in requirements.txt. Tavily SDK usage (TavilyClient, search(), time_range values, include_domains) is correct. Documentation in SKILL.md is accurate and complete. Two minor issues are noted but do not block approval.

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