feat: add Tavily search provider to packages/core#22
Open
tavily-integrations wants to merge 1 commit intoOpenBrowserAI:mainfrom
Open
feat: add Tavily search provider to packages/core#22tavily-integrations wants to merge 1 commit intoOpenBrowserAI:mainfrom
tavily-integrations wants to merge 1 commit intoOpenBrowserAI:mainfrom
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 as a configurable search provider alongside the existing Exa AI search service in
packages/core. This is an additive (parallel) migration — no existing Exa functionality is modified or removed.Changes
packages/core/src/service/tavily-search.ts— ImplementsTavilySearchServicewith a staticsearch()method using the official@tavily/coreSDK. Mirrors theExaSearchServiceinterface pattern (static method returningPromise<string>).packages/core/src/service/index.ts— AddedTavilySearchServiceexport.packages/core/src/index.ts— AddedTavilySearchServiceto the main barrel export.packages/core/src/service/chat-service.ts— Extended thewebsearchoptions type withprovider?: "exa" | "tavily"so callers can specify which search backend to use.packages/core/package.json— Added@tavily/coreas a runtime dependency.Dependency changes
@tavily/core: ^0.6.1topackages/core/package.jsondependenciesEnvironment variable changes
TAVILY_API_KEY— required when usingTavilySearchService(passed asapiKeyparameter)Notes for reviewers
ExaSearchServiceand all its exports remain completely untouched.providerfield on websearch options is optional and defaults behavior is unchanged.TavilySearchService.search().Automated Review
@tavily/coreSDK is used correctly (tavily({ apiKey })+client.search()),TavilySearchServicemirrors theExaSearchServiceinterface (staticsearch()→Promise<string>), theproviderdiscriminator field is properly optional inChatService.websearch(no regressions), and exports are wired through both barrel files and the main package index. Two minor gaps: no timeout guard (ExaSearchService uses 25 s), and the TAVILY_API_KEY env var noted in the migration plan is not documented anywhere (no.env.exampleupdate).