Skip to main content

Native WebSearch — GPT-OSS

Some Clovis models natively integrate WebSearch capabilities. WebSearch is then driven directly by the model, which greatly simplifies integration.

Info

This approach is an alternative to MCP WebSearch. For fine-grained control over orchestration (autonomous agents, multi-tool workflows), prefer MCP WebSearch.


Compatible models

ModelNative WebSearch
ClovisLLM/gpt-oss-120b✔️

How it works

With these models, WebSearch is natively integrated into the model's reasoning:

  1. The model detects that a web search is relevant
  2. It automatically performs the search
  3. It leverages the results in its generation

There is no need to:

  • declare an MCP server in the request,
  • manage complex client-side orchestration,
  • implement specific routing logic.

Example

Request with GPT-OSS
{
"model": "ClovisLLM/gpt-oss-120b",
"input": "What are the latest news about AI in France?",
"temperature": 0.3
}

No tools declaration is required. The model decides on its own when to perform a web search and integrates it into its response.


MCP WebSearch vs Native WebSearch

MCP WebSearchNative GPT-OSS WebSearch
PrincipleThe model calls an external MCP serverWebSearch is natively integrated into the model
ControlFull control over orchestrationGreatly simplifies integration
Use caseAutonomous agents, workflows, multi-tool orchestrationQuick integration without client-side orchestration
ModelsAll Clovis modelsClovisLLM/gpt-oss-120b, ClovisLLM/gpt-oss-200b
DeclarationYes (tools with type: "mcp")No (no configuration required)
Attention

Native GPT-OSS WebSearch is a specific use case. For fine-grained control over orchestration, prefer MCP WebSearch.


Declare the MCP server

To enable WebSearch, add an mcp type tool in the tools field of your request:

MCP declaration
{
"type": "mcp",
"server_label": "web_search_preview",
"server_description": "The websearch mcp",
"server_url": "https://llm-gateway.clovis-ai.fr/api/v1/mcp",
"require_approval": "never"
}
FieldTypeRequiredDescription
typestring✔️Must be "mcp"
server_labelstring✔️Logical name of the MCP server
server_descriptionstringFunctional description of the server
server_urlstring✔️Clovis MCP server URL
require_approvalstringExecution policy (never = automatic)

Full example

Complete request
{
"model": "ClovisLLM",
"input": [
{
"role": "system",
"content": [
{
"type": "input_text",
"text": "You are a helpful assistant. If a question requires up-to-date information, use the websearch."
}
]
},
{
"role": "user",
"content": [
{
"type": "input_text",
"text": "What are the latest news about AI in France?"
}
]
}
],
"tools": [
{
"type": "mcp",
"server_label": "web_search_preview",
"server_description": "The websearch mcp",
"server_url": "https://llm-gateway.clovis-ai.fr/api/v1/mcp",
"require_approval": "never"
}
],
"temperature": 0.3,
"max_output_tokens": 1200
}

Response

The model returns a message type response containing the synthesis of web results:

Response
{
"id": "resp_xxx",
"object": "response",
"output": [
{
"type": "message",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Here are the latest news about AI in France: ..."
}
]
}
],
"usage": {
"input_tokens": 350,
"output_tokens": 420,
"total_tokens": 770
}
}

Code examples

Python
from openai import OpenAI

CLOVIS_API_KEY = "sk-xxxx"
CLOVIS_BASE_URL = "https://llm-gateway.clovis-ai.fr/v1"
CLOVIS_MODEL_NAME = "ClovisLLM"

client = OpenAI(api_key=CLOVIS_API_KEY, base_url=CLOVIS_BASE_URL)

answer = client.responses.create(
model=CLOVIS_MODEL_NAME,
input="What are the latest news about AI?",
tools=[
{
"type": "mcp",
"server_label": "web_search_preview",
"server_description": "The websearch mcp",
"server_url": "https://llm-gateway.clovis-ai.fr/api/v1/mcp",
"require_approval": "never",
}
]
)

print(answer.output_text)