Let the gateway run a live web search and inject results into your conversation automatically.
Not yet available. The Web Search server tool is not yet available.
The Web Search server tool gives any model access to live search results without you writing a search-and-inject loop. The gateway runs the search, formats the results, injects them into the conversation context, and lets the model answer — all within your single API call.
Add opendunes.web_search to the tools array on any chat-completions request:
The model decides when to search. If the question is fully answerable from its training data, it may skip the tool entirely.
You can tune web search behavior with an options object inside the tool entry:
| Option | Type | Default | Description |
|---|---|---|---|
max_results | integer | 5 | Maximum search results to inject (1–10) |
safe_search | boolean | true | Filter explicit content |
region | string | "dz" | ISO 3166-1 alpha-2 region code for result ranking |
Each search result is injected as a structured snippet:
The model uses these snippets to ground its answer and may cite sources inline.
Web Search charges a flat fee per search invocation (regardless of result count), plus the token cost of injecting results into the context. Both line items appear in your per-request usage breakdown.
Web Search can run alongside Web Fetch in the same request. A common pattern is to search for relevant URLs, then fetch one in a second tool call for deeper content — the gateway handles both hops automatically.