feat: add Tavily as configurable search provider alongside Brave#1
Open
tavily-integrations wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Tavily Search as a third selectable retrieval endpoint alongside Brave Web Search and LLM Context. Brave remains the default; Tavily activates when a
TAVILY_API_KEYis configured.What changed
lib/tavily.ts(new): Tavily search module using@tavily/coreSDK. ExportstavilySearch()returning the sharedRetrievalResultinterface, andTavilyErrorfor error handling. Mirrors the shape oflib/brave.ts.lib/types.ts: ExtendedEndpointtype andAnswerRequestSchemato include"tavily".lib/env.ts: Added optionalTAVILY_API_KEYto the Zod env schema.app/api/answer/route.ts: Addedtavilybranch to retrieval logic withTavilyErrorhandling.components/EndpointToggle.tsx: Added third "Tavily" toggle option, updated grid to 3 columns..env.example: DocumentedTAVILY_API_KEYvariable.tests/tavily.test.ts(new): Unit tests covering success path, empty results, URL filtering, missing API key, and upstream errors.tests/setup.ts: Added testTAVILY_API_KEYdefault.package.json: Added@tavily/coredependency.Dependency changes
@tavily/core(^0.6.1) to dependenciesEnvironment variable changes
TAVILY_API_KEY(optional — only required when using the Tavily endpoint)Notes for reviewers
pnpm installafter checkout to fetch the new@tavily/coredependency.Automated Review