Skip to content

feat: add Tavily search provider option to Express API - #96

Open
manisrinivasan2k1 wants to merge 1 commit into
developersdigest:mainfrom
Tavily-FDE:feat/tavily-migration/express-api-brave-search
Open

feat: add Tavily search provider option to Express API#96
manisrinivasan2k1 wants to merge 1 commit into
developersdigest:mainfrom
Tavily-FDE:feat/tavily-migration/express-api-brave-search

Conversation

@manisrinivasan2k1

@manisrinivasan2k1 manisrinivasan2k1 commented Jul 14, 2026

Copy link
Copy Markdown

Summary

Adds Tavily as a configurable, parallel search provider in the Express API while keeping the existing BraveSearch integration as the default.

  • Imported @tavily/core and added a Tavily search path in searchEngineForSources()
  • Provider is selected via SEARCH_PROVIDER env var ('brave' default, 'tavily' to use Tavily)
  • Tavily results are normalized to { title, link } to match the existing BraveSearch output format

Files changed

  • express-api/index.js — Added Tavily import and conditional search path gated by SEARCH_PROVIDER
  • express-api/package.json — Added @tavily/core dependency
  • express-api/.env.example — Added TAVILY_API_KEY and SEARCH_PROVIDER entries

Dependency changes

  • Added @tavily/core ^0.0.7 to express-api/package.json

Environment variable changes

  • Added TAVILY_API_KEY — required when SEARCH_PROVIDER=tavily
  • Added SEARCH_PROVIDER — optional, defaults to brave

Notes for reviewers

  • BraveSearch remains the default; no breaking changes
  • The Tavily path reuses the existing fetchAndProcess pipeline (cheerio scraping + vectorization) for consistency

Automated Review

  • Passed after 1 attempt(s)
  • Final review: The migration correctly adds Tavily as a configurable search provider alongside BraveSearch in the Express API. All three files listed in the plan are modified. The Tavily SDK is imported and used with correct patterns, the dependency is added to package.json, and environment variables are documented in .env.example. No regressions to the existing Brave path are introduced. A few minor issues exist but none are blocking.

Open in Devin Review

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the developersdigest's Team Team on Vercel.

A member of the Team first needs to authorize it.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

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