AI Gateway adds Browserbase Search and Fetch tools
Source
vercel.com
Author
Josh Lipman
Date
Context
Browserbase's Search and Fetch tools let an AI application find web pages and then retrieve their contents through AI Gateway. These are separate steps: search identifies relevant pages, while fetching supplies the page material the model can use.
The integration makes those tools available across model providers through one gateway key. Developers can keep the same search and retrieval tools when changing models, provided the replacement supports tool useA model's ability to call external functions — run code, search the web, edit files — instead of only generating text.Full definition →. The announcement specifies AI SDK version 7.0.116 or later for the supplied helpers.
Key takeaways · AI-distilled
The Browserbase helpers require AI SDK 7.0.116 or later and an AI_GATEWAY_API_KEY; you pass gateway.tools.browserbaseSearch() and gateway.tools.browserbaseFetch() in the tools object of a streamText call.
Both tools take options: Vercel's example sets numResults: 3 on search and allowRedirects: true on fetch.
Because the tools run through AI Gateway rather than a provider, the same search and fetch setup works across any tool-calling model; Vercel's example pairs them with moonshotai/kimi-k3.
Terms in this piece · Glossary
tool use — A model's ability to call external functions — run code, search the web, edit files — instead of only generating text.