extra_body.web_search. This works with any model supported by the router.
For OpenAI-compatible clients, web_search_options is also accepted as a top-level field, but it is only supported by a limited number of providers. We recommend extra_body.web_search for broadest compatibility.
extra_body.web_search
| Parameter | Notes |
|---|---|
engine | "exa" | "google" | omit. Default exa. |
max_results | Results per search call. Default 3. |
max_steps | Search/refine rounds. Default 1. |
web_search_options (OpenAI-compatible)
Top-level field on the request—no extra_body. Forwarded to providers that implement native web search.
search_context_size: "low" | "medium" | "high".
Citations & streaming
Assistant messages may include OpenAI-styleannotations (e.g. type: "url_citation" with url, title, content).
With stream: true, annotations are delivered on the last SSE chunk, alongside finish_reason.