Skip to content

feat: add Tavily as a configurable web search provider option#180

Open
tavily-integrations wants to merge 1 commit into
szczyglis-dev:masterfrom
Tavily-FDE:feat/tavily-migration/add-tavily-search-provider
Open

feat: add Tavily as a configurable web search provider option#180
tavily-integrations wants to merge 1 commit into
szczyglis-dev:masterfrom
Tavily-FDE:feat/tavily-migration/add-tavily-search-provider

Conversation

@tavily-integrations
Copy link
Copy Markdown

Summary

  • Added Tavily as a fourth selectable web search engine provider in the PyGPT web search plugin
  • Created TavilySearch provider class following the existing BaseProvider pattern (mirroring DuckDuckGo/Google/Bing providers)
  • Registered the new provider in app.py alongside existing providers
  • Added tavily-python dependency to pyproject.toml

Files changed

  • src/pygpt_net/provider/web/tavily_search.pyNew file: TavilySearch provider with search(), is_configured(), init_options(), and get_config_message() methods
  • src/pygpt_net/app.py — Added import and registration of TavilySearch
  • pyproject.toml — Added tavily-python dependency

Dependency changes

  • Added tavily-python = "^0.5.0" to [tool.poetry.dependencies]

Environment variable changes

  • TAVILY_API_KEY — Users configure this via the tavily_api_key plugin setting in the Tavily tab

Notes for reviewers

  • This is an additive change — all existing providers are untouched
  • The user selects the active provider via the existing plugin settings UI dropdown; no routing logic changes were needed
  • The Tavily provider uses search_depth="basic" (1 credit per search); "advanced" (2 credits) can be exposed as a setting later if desired
  • Tavily API supports up to 20 results per query (vs 10 for Google/DDG)

🤖 Generated with Claude Code

Automated Review

  • Passed after 1 attempt(s)
  • Final review: The Tavily provider implementation is correct, well-scoped, and consistent with the existing codebase patterns. All three reported files are properly modified: the new TavilySearch class follows the BaseProvider contract, the app.py registration mirrors existing providers, and tavily-python is added to pyproject.toml. Tavily SDK usage is correct (client initialization, search() call, response parsing via response["results"] and result["url"]). The lazy-import _load_tavily() pattern is consistent with the DuckDuckGo provider. Only minor issues found — no blockers.

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