When to use AI Gateway web tools instead of a bespoke search stack?
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
Recommended for you
- QualityVercel
Why does streaming agent UI still leave you rebuilding cards per
Chat agents that output rich UI force you to maintain separate message components for Slack, Teams, and every other surface.
- QualityVercel
How I stop throwaway Vercel demos piling up without manual deletes
Prototype and test apps pile up in your Vercel account until someone remembers to delete them by hand.
- QualityClaude Code
Why do juniors build what already exists while seniors skip it?
Juniors build what already exists; seniors skip it. The laziest solution that works is the right one. Real examples in code, plus a decision ladder.
- QualityClaude Code
When should you reject an agent PR that splits one file into six?
The agent's PR has six new files for one small feature. A utils file for one function. A types file for two interfaces. None of it earns its keep.
Enjoyed this article?
Subscribe for new articles. No spam. Unsubscribe anytime.