Enable WebSocket
Complete Configure Model Provider first, then run the one-line command to enable the Codex Responses protocol format and WebSocket connection. The script only updates connection capability. It does not read, save, or overwrite your API key.
Enable WebSocket in One Command (Recommended)
curl -fsSL https://hao.ai/install/codex.sh | bashThe script backs up ~/.codex/config.toml, finds the HaoAI provider written by CC Switch when possible, and adds these fields to the existing provider block. The example below uses haoai as the provider name; if your local provider uses another name, replace haoai with that name:
[model_providers.haoai]
wire_api = "responses"
supports_websockets = truewire_api = "responses" tells Codex to use the Responses protocol format; supports_websockets = true tells Codex this provider supports a WebSocket connection. Together, they let Codex connect to HaoAI through the recommended path.
The API key stays in the CC Switch Codex provider settings. This command only enables the Codex protocol format and WebSocket connection.
If your config uses an inline table under [model_providers], the script updates the existing provider entry instead of forcing another TOML layout.