-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Backport: Add Perplexity Search tool to registry and documentation #10804
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
Conversation
| import { tavilySearch } from '@tavily/ai-sdk'; | ||
| const { text } = await generateText({ | ||
| 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.
| import { tavilySearch } from '@tavily/ai-sdk'; | |
| const { text } = await generateText({ | |
| model: gateway('google/gemini-3-pro-preview'), | |
| prompt: 'What are the latest developments in agentic search?', | |
| tools: { | |
| webSearch: tavilySearch, | |
| import { tavilySearch, tavilyExtract } from '@tavily/ai-sdk'; | |
| const { text } = await generateText({ | |
| model: gateway('google/gemini-3-pro-preview'), | |
| prompt: 'What are the latest developments in agentic search?', | |
| tools: { | |
| webSearch: tavilySearch(), | |
| webExtract: tavilyExtract(), |
The Tavily code example in the registry is incomplete - it only demonstrates using tavilySearch without parentheses, while the corresponding cookbook example shows using both tavilySearch() and tavilyExtract() with parentheses.
View Details
Analysis
Tavily code example in registry is incomplete and uses incorrect function syntax
What fails: The registry example for Tavily (lines ~167-179 in content/tools-registry/registry.ts) shows webSearch: tavilySearch without parentheses and only demonstrates the search tool, missing the extract tool entirely. The cookbook shows both tools should be used with function invocation.
How to reproduce: Look at the Tavily entry in content/tools-registry/registry.ts:
tools: {
webSearch: tavilySearch, // Missing parentheses, wrong syntax
}Compare to cookbook example in content/cookbook/05-node/56-web-search-agent.mdx:
tools: {
webSearch: tavilySearch(), // Correct
webExtract: tavilyExtract(), // Complete example
}Result: The registry example shows incorrect syntax that won't work - tavilySearch without parentheses passes the function reference instead of calling it to return the configured tool instance. Also missing tavilyExtract from the example.
Expected: According to official Tavily documentation, both functions must be called with parentheses: tavilySearch() and tavilyExtract(). The registry should demonstrate both available tools like the cookbook does.
Changes made: Updated the Tavily entry to:
- Import both
tavilySearchandtavilyExtract - Call both functions with parentheses:
tavilySearch()andtavilyExtract() - Now matches cookbook example and follows consistent pattern with other tools in registry (Exa, Perplexity)
This is an automated backport of #10477 to the release-v5.0 branch. FYI @kesku
This backport has conflicts that need to be resolved manually.
git cherry-pickoutput