# X_AI_PROVIDER_UNAVAILABLE

## Means

the model provider is unreachable

## Typical cause

a non-2xx, an in-band `error` event, or a stream cut before `message_stop`. **Never a local refusal**, `As of 2026-08-23`: `X_AI_KEY_MISSING` and `X_AI_REQUEST_INVALID` are raised before the socket opens and reach the caller verbatim, keeping their own `fix:`, instead of being collected into this code by the fallback loop

## Fix

retry a 429/5xx (the gateway already does); fix the request a 4xx names

[MCP and AI](/error-codes#mcp-and-ai)
