Web search
Let the model search the web and cite its sources.
Raon runs web search itself when it is enabled for your organization and configured on the server. Request it per call:
| API | How to turn it on |
|---|---|
| Chat Completions | add web_search_options |
| Responses | add a web_search tool |
| Messages | add a web_search_* tool, such as web_search_20250305 |
The model decides whether and when to search, and may search several times before it answers. Search and the additional model turns can increase response time. Server limits also apply; a requested max_uses does not override them. Search failures or exhausted limits can lead to an answer without further searches.
The response's usage counts the model's last turn, which already holds the whole conversation and every search result once. Those are the tokens you are billed for, and the input count is the conversation's size for the next request.
completion = client.chat.completions.create(
model="raon-1-mini-preview",
web_search_options={"search_context_size": "medium"},
messages=[{"role": "user", "content": "What changed in the latest PUBG update?"}],
)
message = completion.choices[0].message
print(message.content)
for annotation in message.annotations or []:
print(annotation.url_citation.title, annotation.url_citation.url)Chat Completions and Responses
search_context_sizesets the results per search:low3,medium5,high10.- Sources arrive as
url_citationannotations. On Chat Completions they are inmessage.annotations, or in the last chunk'sdelta.annotationswhen streaming. - On Responses each search is a
web_search_calloutput item, andfilters.allowed_domainslimits results to the sites you list.
Messages
| Response blocks | Each search adds a server_tool_use block and a web_search_tool_result block. |
| Sources | citations on the answer's text blocks, of type web_search_result_location. |
| Limits | max_uses caps the searches; allowed_domains and blocked_domains limit the sites. |
| Count | usage.server_tool_use.web_search_requests counts the searches. |
tool_choice | Omit it or use auto, any or none. Forcing one tool (type: "tool") returns 400. |

