WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@vercel-ai-sdk
Copy link
Contributor

@vercel-ai-sdk vercel-ai-sdk bot commented Dec 2, 2025

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-pick output

Auto-merging content/cookbook/05-node/56-web-search-agent.mdx
CONFLICT (content): Merge conflict in content/cookbook/05-node/56-web-search-agent.mdx
Auto-merging content/docs/02-foundations/04-tools.mdx
CONFLICT (content): Merge conflict in content/docs/02-foundations/04-tools.mdx
Auto-merging content/tools-registry/registry.ts
CONFLICT (content): Merge conflict in content/tools-registry/registry.ts
error: could not apply 891e33ff7... Add Perplexity Search tool to registry and documentation (#10477)
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config set advice.mergeConflict false"

@nicoalbanese nicoalbanese marked this pull request as ready for review December 2, 2025 18:34
@nicoalbanese nicoalbanese enabled auto-merge (squash) December 2, 2025 18:38
Comment on lines +168 to +174
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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:

  1. Import both tavilySearch and tavilyExtract
  2. Call both functions with parentheses: tavilySearch() and tavilyExtract()
  3. Now matches cookbook example and follows consistent pattern with other tools in registry (Exa, Perplexity)

@nicoalbanese nicoalbanese merged commit f6ff67f into release-v5.0 Dec 2, 2025
18 checks passed
@nicoalbanese nicoalbanese deleted the backport-pr-10477-to-release-v5.0 branch December 2, 2025 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants