Summary
Native web search for xai/grok-4.5 is broken / unsupported on the documented Cloudflare AI REST path (POST /client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/...), despite the grok-4.5 model page advertising search_parameters, web_search_options, and tools on chat completions.
Basic chat completions for xai/grok-4.5 succeed (HTTP 200). Any attempt to enable native search fails in one of two contradictory ways depending on endpoint/shape.
Root-cause framing
This looks like a docs / gateway wiring gap, not an upstream xAI outage:
- The AI Gateway web search docs explicitly state that only
xai/grok-4.20-multi-agent-0309 accepts web_search via AI Gateway, on POST /ai/v1/responses with input + tools: [{ "type": "web_search" }].
- The same docs list other Grok chat-completions models under “Models without web search support,” but do not mention
xai/grok-4.5.
- The xai/grok-4.5 model page exposes
search_parameters, web_search_options, and tools on the chat-completions schema — implying search is available — but those fields fail in practice.
- Sending a Responses-API-shaped body (
input + tools: [{type:"web_search"}]) to /ai/v1/responses for xai/grok-4.5 is rejected as if the gateway is treating the request as chat completions (unsupported field input; expects messages).
Hypothesis: AI Gateway only wires native xAI web_search for the multi-agent model on the Responses path. xai/grok-4.5 is catalogued with search-related schema fields, but the gateway does not implement chat-side search_parameters / web_search_options, nor Responses-side web_search for this model ID.
Environment
- Product: FRAME (Workers / Agents SDK app)
- Client:
@ai-sdk/openai chat completions against Cloudflare OpenAI-compatible AI REST
- Base URL:
https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1
- Auth:
Authorization: Bearer $CLOUDFLARE_API_TOKEN (Unified Billing / account token; no per-vendor xAI key)
- Model:
xai/grok-4.5
- Date observed: 2026-07-22
Steps to reproduce
1. Baseline — chat without search (works)
curl -sS -X POST "https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/chat/completions" \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "xai/grok-4.5",
"messages": [
{ "role": "user", "content": "Say hello in one sentence." }
]
}'
Actual: HTTP 200 with a normal chat completion.
2. Chat completions with search_parameters (fails — HTTP 500)
curl -sS -X POST "https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/chat/completions" \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "xai/grok-4.5",
"messages": [
{ "role": "user", "content": "What were the top news stories about Cloudflare this week? Summarize in three bullets." }
],
"search_parameters": {
"mode": "auto",
"return_citations": true
}
}'
Also fails with the equivalent top-level web_search_options body (same endpoint / model).
Actual:
HTTP 500
{
"errors": [
{
"message": "Model execution failed (Error)",
"code": 2002
}
],
"success": false
}
3. Responses-shaped request on /ai/v1/responses (fails — HTTP 400)
This is the shape documented for xAI web search on the multi-agent model, adapted to xai/grok-4.5:
curl -sS -X POST "https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/responses" \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "xai/grok-4.5",
"input": "What were the top news stories about Cloudflare this week? Summarize in three bullets.",
"tools": [
{ "type": "web_search" }
]
}'
Actual: HTTP 400 rejecting field input and indicating the gateway expects messages (chat-completions shape), not Responses API input.
Expected
Either:
A (preferred): Native web search works for xai/grok-4.5 on the documented AI REST path — ideally both:
- Chat completions:
search_parameters / web_search_options (as advertised on the model page), and/or
- Responses:
input + tools: [{ "type": "web_search" }] (as documented for xAI in the web search guide)
…and ideally also xAI-native x_search / code_execution tools where applicable.
B: If intentionally unsupported, the grok-4.5 model page should not advertise search_parameters / web_search_options, and the web search docs should list xai/grok-4.5 under “Models without web search support” (or explicitly document the supported model list only). Failures should be a clear 4xx validation error, not an opaque HTTP 500 code: 2002.
Ask
Please support native web_search (and ideally x_search / code_execution) for xai/grok-4.5 on the documented AI REST / AI Gateway path, or clarify the model-page params if they are intentionally unsupported.
If the intended path is only xai/grok-4.20-multi-agent-0309 on /ai/v1/responses, please:
- Wire
xai/grok-4.5 the same way (or document why it cannot be), and
- Align the model-page schema + “Models without web search support” list so developers are not sent down a 500 path.
Related docs
Notes
Summary
Native web search for
xai/grok-4.5is broken / unsupported on the documented Cloudflare AI REST path (POST /client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/...), despite the grok-4.5 model page advertisingsearch_parameters,web_search_options, andtoolson chat completions.Basic chat completions for
xai/grok-4.5succeed (HTTP 200). Any attempt to enable native search fails in one of two contradictory ways depending on endpoint/shape.Root-cause framing
This looks like a docs / gateway wiring gap, not an upstream xAI outage:
xai/grok-4.20-multi-agent-0309acceptsweb_searchvia AI Gateway, onPOST /ai/v1/responseswithinput+tools: [{ "type": "web_search" }].xai/grok-4.5.search_parameters,web_search_options, andtoolson the chat-completions schema — implying search is available — but those fields fail in practice.input+tools: [{type:"web_search"}]) to/ai/v1/responsesforxai/grok-4.5is rejected as if the gateway is treating the request as chat completions (unsupported fieldinput; expectsmessages).Hypothesis: AI Gateway only wires native xAI
web_searchfor the multi-agent model on the Responses path.xai/grok-4.5is catalogued with search-related schema fields, but the gateway does not implement chat-sidesearch_parameters/web_search_options, nor Responses-sideweb_searchfor this model ID.Environment
@ai-sdk/openaichat completions against Cloudflare OpenAI-compatible AI RESThttps://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1Authorization: Bearer $CLOUDFLARE_API_TOKEN(Unified Billing / account token; no per-vendor xAI key)xai/grok-4.5Steps to reproduce
1. Baseline — chat without search (works)
Actual: HTTP 200 with a normal chat completion.
2. Chat completions with
search_parameters(fails — HTTP 500)Also fails with the equivalent top-level
web_search_optionsbody (same endpoint / model).Actual:
3. Responses-shaped request on
/ai/v1/responses(fails — HTTP 400)This is the shape documented for xAI web search on the multi-agent model, adapted to
xai/grok-4.5:Actual: HTTP 400 rejecting field
inputand indicating the gateway expectsmessages(chat-completions shape), not Responses APIinput.Expected
Either:
A (preferred): Native web search works for
xai/grok-4.5on the documented AI REST path — ideally both:search_parameters/web_search_options(as advertised on the model page), and/orinput+tools: [{ "type": "web_search" }](as documented for xAI in the web search guide)…and ideally also xAI-native
x_search/code_executiontools where applicable.B: If intentionally unsupported, the grok-4.5 model page should not advertise
search_parameters/web_search_options, and the web search docs should listxai/grok-4.5under “Models without web search support” (or explicitly document the supported model list only). Failures should be a clear 4xx validation error, not an opaque HTTP 500code: 2002.Ask
Please support native
web_search(and ideallyx_search/code_execution) forxai/grok-4.5on the documented AI REST / AI Gateway path, or clarify the model-page params if they are intentionally unsupported.If the intended path is only
xai/grok-4.20-multi-agent-0309on/ai/v1/responses, please:xai/grok-4.5the same way (or document why it cannot be), andRelated docs
Notes
cloudflare/aiissue appears to covergrok-4.5+web_search/search_parametersspecifically (searched 2026-07-22)./ai/v1/responses), AI Gateway doesn't supports Azure OpenAPI Responses API #399 (Azure Responses API support). This report is specifically about xAI Grok 4.5 native search capability and endpoint/schema mismatch.