feat: add Tavily as configurable search engine in core search framework
Summary
- Added TavilySearch as a new search engine option alongside Exa, SerpAPI, and Arxiv
- Follows the existing engine pattern: schema dataclasses + SearchEngine subclass + registration in all registries
- Tavily results are mapped to the shared
BaseResultschema for seamless downstream consumption
Files Changed
ms_agent/tools/search/search_base.py— AddedTAVILYtoSearchEngineTypeenum and'tavily': 'tavily_search'toENGINE_TOOL_NAMESms_agent/tools/search/tavily/__init__.py— New package init exportingTavilySearch,TavilySearchRequest,TavilySearchResultms_agent/tools/search/tavily/schema.py— New file withTavilySearchRequestandTavilySearchResultdataclassesms_agent/tools/search/tavily/search.py— New file withTavilySearchclass usingtavily-pythonSDKms_agent/tools/search/websearch_tool.py— Added'tavily'toSUPPORTED_ENGINES,get_search_engine_class(),get_search_engine(),_api_keysinit, andconnect()engine instantiationms_agent/tools/search_engine.py— AddedTAVILYbranch inget_web_search_tool()factory andTAVILY_API_KEYsupport in env overridesrequirements/research.txt— Addedtavily-pythondependency
Dependency Changes
- Added
tavily-pythontorequirements/research.txt
Environment Variable Changes
- Added
TAVILY_API_KEY— required when using the Tavily engine
Notes for Reviewers
- This is an additive change — all existing engines remain fully functional
- Tavily can be selected via
engine: tavilyin agent YAML config or via theFIN_RESEARCH_SEARCH_ENGINEoverride - The
TavilySearch.search()method maps Tavily API results (content→summary,url→id) to the sharedBaseResultschema
🤖 Generated with Claude Code
Automated Review
- Passed after 1 attempt(s)
- Final review: The Tavily migration is well-implemented and follows all existing patterns in the codebase. The additive strategy is respected: no existing engines are removed or altered. All factory functions (
get_search_engine_class,get_search_engine,get_web_search_tool,WebSearchTool.connect) are correctly updated. TheTavilySearchclass, schema dataclasses,__init__.py, enum entry, tool-name mapping, andSUPPORTED_ENGINEStuple are all consistent with how Exa and SerpAPI are implemented. Thetavily-pythondependency is added torequirements/research.txt. The Tavily SDK is used correctly (TavilyClient.search(**kwargs)returning a dict with aresultslist). No critical or major issues found; only three minor documentation/style gaps.
Summary of Changes
Hello, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request introduces Tavily as a new, configurable search engine within the existing search framework. The change enhances the system's ability to perform AI-optimized web searches by providing an additional, high-relevance search option. The implementation adheres to current architectural patterns, ensuring that the new engine integrates smoothly and is easily configurable without impacting the functionality of other search providers.
Highlights
- New Search Engine Integration: TavilySearch has been added as a new configurable search engine option, expanding the existing suite of Exa, SerpAPI, and Arxiv.
- Standardized Implementation: The integration follows the established pattern of using schema dataclasses, a dedicated SearchEngine subclass, and registration across all relevant registries.
- Unified Result Schema: Tavily search results are consistently mapped to the shared BaseResult schema, ensuring seamless consumption by downstream components.
- Additive Change: This feature is purely additive, meaning all previously existing search engines remain fully functional and unaffected.
- Configurability: Tavily can be selected as the search engine via agent YAML configuration or through the FIN_RESEARCH_SEARCH_ENGINE environment variable override.
- New Dependency: The tavily-python library has been added to requirements/research.txt.
- API Key Support: Support for TAVILY_API_KEY has been introduced, which is required when using the Tavily engine.
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in pull request comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.
[^1]: Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.