-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Feat/add tavily tools #10567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/add tavily tools #10567
Conversation
- Introduced Tavily as a new tool for real-time web search, extraction, crawling, and mapping. - Updated documentation to include installation instructions and usage examples for Tavily. - Added Tavily to the tools registry with relevant details and code examples.
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
| model: gateway('google/gemini-3-pro-preview'), | ||
| prompt: 'What are the latest developments in agentic search?', | ||
| tools: { | ||
| webSearch: tavilySearch, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| webSearch: tavilySearch, | |
| webSearch: tavilySearch(), |
The Tavily code example in the registry doesn't call the tool functions with parentheses, but the cookbook documentation shows they should be called with parentheses like tavilySearch() and tavilyExtract().
View Details
Analysis
Tavily code example in registry.ts missing function call parentheses
What fails: The Tavily tool code example in content/tools-registry/registry.ts (line 139) passes tavilySearch as a reference without calling it with parentheses, but the official Tavily documentation requires calling it as tavilySearch() to return the tool object. This causes the example to be incompatible with the Vercel AI SDK tools interface.
How to reproduce:
- View the Tavily example in
content/tools-registry/registry.tslines 131-143 - Compare it with the cookbook example in
content/cookbook/05-node/56-web-search-agent.mdxlines 218-219 - Check that the cookbook correctly shows
tavilySearch()andtavilyExtract()with parentheses
Result: Registry example shows webSearch: tavilySearch, without parentheses, while the cookbook and official documentation show webSearch: tavilySearch() with parentheses.
Expected: The registry example should call the function with parentheses, matching the pattern used by other similar tools in the same file (executeCode() on line 43, webSearch() on line 75) and matching the documented usage in the Tavily AI SDK documentation which states: "You pass the result of calling these functions to the tools object"
<!-- Welcome to contributing to AI SDK! We're excited to see your changes. We suggest you read the following contributing guide we've created before submitting: https://github.com/vercel/ai/blob/main/CONTRIBUTING.md --> ## Background Tavily provides a suite of web-access tools trusted by over 800K developers worldwide. We're excited to announce our new Vercel AI SDK integration package (https://www.npmjs.com/package/@tavily/ai-sdk) which will allow developers to build Tavily-powered agents on Vercel AI SDK v5. <!-- Why was this change necessary? --> ## Summary This PR adds Tavily tools to the new Vercel agent registry and tool-calling documentation. <!-- What did you change? --> ## Checklist <!-- Do not edit this list. Leave items unchecked that don't apply. If you need to track subtasks, create a new "## Tasks" section Please check if the PR fulfills the following requirements: --> - [ ] Tests have been added / updated (for bug fixes / features) - [x] Documentation has been added / updated (for bug fixes / features) - [ ] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [ ] I have reviewed this pull request (self-review) --------- Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com> Co-authored-by: nicoalbanese <[email protected]>
|
✅ Backport PR created: #10805 |
Background
Tavily provides a suite of web-access tools trusted by over 800K developers worldwide. We're excited to announce our new Vercel AI SDK integration package (https://www.npmjs.com/package/@tavily/ai-sdk) which will allow developers to build Tavily-powered agents on Vercel AI SDK v5.
Summary
This PR adds Tavily tools to the new Vercel agent registry and tool-calling documentation.
Checklist
pnpm changesetin the project root)