Internal server error when using the model xai/grok-4.1-fast-reasoning

I get a Couldn’t Complete Request
Internal server error when using the model xai/grok-4.1-fast-reasoning with vercel ai gateway , it works with xai/grok-4.1-fast-non-reasoning also the status page shows that everything is good

Hi rg,

Since xai/grok-4.1-fast-non-reasoning works but xai/grok-4.1-fast-reasoning returns an internal server error, I’d treat this as model/provider-specific first, not an API key or Gateway setup issue.

I’d try one direct minimal request outside the app/SDK:

curl -i https://ai-gateway.vercel.sh/v1/chat/completions \
  -H "Authorization: Bearer $AI_GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "xai/grok-4.1-fast-reasoning",
    "messages": [{ "role": "user", "content": "Say test" }],
    "stream": false
  }'

Then run the same request with:

xai/grok-4.1-fast-non-reasoning

If only the reasoning model fails with the same tiny prompt, that pretty strongly rules out your app code, prompt size, auth header, and credits. I’d also avoid adding any provider-specific reasoning options until this baseline request works.

The model page is useful to compare status/availability:

If it still fails, the most useful details to share are the status code, redacted response body, x-vercel-id response header, timestamp, SDK version if using AI SDK, and whether the same request fails from the AI Gateway playground too. Don’t post the API key.