AI Gateway 新增 Browserbase 搜索与抓取工具
AI Gateway adds Browserbase Search and Fetch tools
AI Gateway 现已支持 Browserbase 的搜索与抓取工具,开发者可通过单一 API key 在任何支持工具调用的模型上添加网页搜索和内容检索功能。
- 工具已在 AI SDK 7.0.116 及以后版本提供,示例代码展示如何在 moonshotai/kimi-k3 模型中调用。
- 相关定价与配置请参阅 Browserbase 文档,亦可在 AI Gateway 模型演练区体验。
AI Gateway 通过新增 Browserbase 搜索与抓取工具,让模型能实时获取网页信息,提升跨模型工具调用的便利性。
Browserbase Search and Fetch are now available through AI Gateway. Give your models access to current information, find relevant pages, and retrieve their contents, alongside Browserbase's existing AI SDK and Vercel Marketplace integrations.
AI Gateway lets you use Browserbase's tools across model providers with one API key. Add web search and page retrieval to any model that supports tool calling, and keep the same tools when you switch models.
These helpers are available in AI SDK 7.0.116 and later. Update with pnpm add ai@latest and set your AI_GATEWAY_API_KEY. To add search and fetch, pass the helpers in tools .
import { gateway, streamText } from 'ai';
const result = streamText({
model: 'moonshotai/kimi-k3',
prompt: 'Find Browserbase\'s latest announcement, fetch the page, and summarize it.',
tools: {
browserbase_search: gateway.tools.browserbaseSearch({ numResults: 3 }),
browserbase_fetch: gateway.tools.browserbaseFetch({
allowRedirects: true,
}),
},
});
For pricing and configuration options, see the Browserbase Search and Fetch documentation.
Try the Browserbase tools in the AI Gateway model playground, or explore the model catalog.
AI Gateway provides one API for calling models, tracking usage and cost, and configuring routing, retries, and failover. You can use an AI Gateway API key or bring your own provider key.
來源:Vercel Blog · vercel.com