Back to blog
Quality
Vercel

When to use AI Gateway web tools instead of a bespoke search stack?

Thắng Đoàn
Thắng Đoàn

If you have built web search into an LLM app, you know the pain: provider-specific tooling, extra accounts, and fallback code that breaks the moment you switch models. AI Gateway now offers DeepSeek Search and Fetch helpers you can use with any tool-calling model behind one API key.

What it is

DeepSeek Search returns relevant pages with titles, URLs, and summaries, while DeepSeek Fetch retrieves page content as Markdown. Both work through AI Gateway with any tool-calling model and no separate DeepSeek account.

Applied case

Say you are building an agent that researches web pages. You pass both helpers in the tools array so the model first searches, then fetches chosen URLs as Markdown. If DeepSeek Search fails, you can pass alternative search tools alongside DeepSeek Fetch, since fallback is model-directed and best effort, so pin your retry limits explicitly. Each tool costs $0.75 per 1,000 billable requests, with no charge for failed requests, timeouts, or empty results.

  • Combine Search then Fetch via one tools array; fallback order is best effort, so pin retries

When to use it

Use when you want provider-agnostic web search and fetch behind one key. Skip when you already run a dedicated search API with custom routing.

Limitations

The $0.75 rate covers tool calls only; model tokens are billed separately. Fallback is model-directed, so provider order and retry limits are best effort, not guaranteed.

Read more

AI Gateway: DeepSeek Search and Fetch

DeepSeek Search docs

AI Gateway

Share:

Recommended for you

Enjoyed this article?

Subscribe for new articles. No spam. Unsubscribe anytime.

By subscribing you agree to receive the newsletter. No spam, and you can unsubscribe anytime.