TL;DR
- DeepSeek Search finds relevant pages with titles, URLs, and summaries; DeepSeek Fetch retrieves page content as Markdown
- Both tools work with any model that supports tool calling through a single AI Gateway API key, with no separate DeepSeek account required
- Tools are available in AI SDK 6.0.321+ (v6) and 7.0.160+ (v7), priced at $0.75 per 1,000 billable requests each
- Developers can combine these with alternative search tools like Exa or parallel search for failover logic
- Available in AI SDK
- 6.0.321+ (v6) and 7.0.160+ (v7)
- Cost per tool
- $0.75 per 1,000 requests
- Setup required
- AI_GATEWAY_API_KEY environment
What happened
Vercel has added two new tools to AI Gateway: DeepSeek Search and DeepSeek Fetch. These tools enable developers to retrieve web content programmatically within AI applications. DeepSeek Search finds relevant pages and returns titles, URLs, and summaries, while DeepSeek Fetch retrieves the full content of pages as Markdown that models can read and process.
How to use the tools
Both tools are available through AI SDK 6.0.321 and later on v6, or 7.0.160 and later on v7. To get started, update your SDK with pnpm add ai@latest and set your AI_GATEWAY_API_KEY environment variable. The tools work with any model that supports tool calling, whether from DeepSeek, Anthropic, Google, or other providers accessible through AI Gateway.
Developers can pass both helpers in a tools configuration object. The DeepSeek Search tool accepts a count parameter to control how many results to return. When calling DeepSeek Fetch, no parameters are required—it retrieves the full page content from a URL passed by the model.
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);
}Flexible search fallback
Developers can combine DeepSeek Search with alternative search tools from Exa or parallel search as fallback options. This approach lets models attempt one search strategy, then fall back to another if the first fails. The model itself decides which tool to call based on the system prompt and previous errors.
DeepSeek Fetch can retrieve content from results provided by any of these search tools, not just DeepSeek Search. Search fallback behavior is model-directed, meaning retry limits and provider order are best-effort; the model decides the sequence.
Pricing and integration
Each tool—Search and Fetch—costs $0.75 per 1,000 billable requests. Failed requests, timeouts, and empty results incur no charge. Model tokens are billed separately.
No separate DeepSeek account is required. Developers use a single AI Gateway API key to access both tools and can switch between model providers without changing their tool configuration. This unified interface simplifies multi-model workflows where teams want to keep the same retrieval layer across different AI services.
What to do next
Developers currently using AI SDK should update to version 6.0.321 or later (v6 track) or 7.0.160 or later (v7 track). If you're building agents or applications that need to search the web and fetch page content, set your AI_GATEWAY_API_KEY and add the tools to your streamText or model configuration. For detailed configuration options and pricing information, refer to the DeepSeek Search and DeepSeek Fetch documentation.
Source
Vercel Bloghttps://vercel.com/changelog/ai-gateway-adds-deepseek-search-and-fetch-toolsAI-assisted, verified against the source. This post was drafted with AI from the primary source linked above and checked automatically against it. For anything you depend on, read the original.
- #aigateway
- #deepseek
- #websearch
- #aisdk
- #toolcalling
