DeepSeek Search and DeepSeek Fetch are now available through AI Gateway. Search finds relevant pages with titles, URLs, and summaries. Fetch retrieves page content as Markdown for your model to read. Use both tools with any model that supports tool calling, using one AI Gateway API key. No separate DeepSeek account is required, and you can keep the same tools when switching model providers. These helpers are available in AI SDK 6.0.321 and later on v6, or 7.0.160 and later on v7. Update with pnpm add ai@latest and set your AI_GATEWAY_API_KEY. To combine search and page retrieval, pass both helpers in tools: import { gateway, streamText } from 'ai';const result = streamText({ model: 'deepseek/deepseek-v4.1-flash-1017', prompt: 'Find the latest Vercel AI Gateway announcement, fetch it, and summarize it.', tools: { deepseek_search: gateway.tools.deepseekSearch({ count: 3 }), deepseek_fetch: gateway.tools.deepseekFetch(), },});for await (const text of result.textStream) { process.stdout.write(text);} You can also use alternative search tools with DeepSeek Fetch if DeepSeek Search fails: import { gateway, streamText } from 'ai';const result = streamText({ model: 'zai/glm-5.3-flash', system: 'Try deepseek_search, then exa_search, then parallel_search on errors. After search succeeds, use deepseek_fetch on a result URL.', prompt: 'Find the latest Vercel AI Gateway announcement, fetch it, and summarize it.', toolChoice: 'required', tools: { deepseek_search: gateway.tools.deepseekSearch({ count: 3 }), deepseek_fetch: gateway.tools.deepseekFetch(), exa_search: gateway.tools.exaSearch({ numResults: 3 }), parallel_search: gateway.tools.parallelSearch({ maxResults: 3 }), },});for await (const text of result.textStream) { process.stdout.write(text);} Search fallback is model-directed, so provider order and retry limits are best effort. DeepSeek Fetch can retrieve a result URL from any of these search tools. Search and Fetch each cost $0.75 per 1,000 billable requests. Failed requests, timeouts, and empty results have no tool charge. Model tokens are billed separately. See the DeepSeek Search documentation and DeepSeek Fetch documentation for configuration options and pricing details. 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.
AI NEWS JOURNAL
VercelAI NEWS / JOURNAL
AI Gateway adds DeepSeek Search and Fetch tools
DeepSeek Search and DeepSeek Fetch are now accessible through Vercel's AI Gateway, enabling users to find relevant web pages and retrieve their content as Markdown using a single API key. These tools work with any model supporting tool calling, support fallback search options, and are available in AI SDK versions 6.0.321 (v6) and 7.0.160 (v7). Each search or fetch request costs $0.75 per 1,000 billable requests, with no charge for failed or empty results. Usage is tracked via AI Gateway, which also supports routing, retries, and failover configurations.
翻译服务暂未运行,当前显示原文。