跳到主要内容Skip to content
Docs

Codex setup

Configure Codex to use OpenAI as the model provider via 0-0.pro (wire_api = responses).

Scope

Compatible
This setup applies to all Codex clients that read the standard ~/.codex directory, including VS Code Codex extensions/plugins, Codex CLI, and the Codex app.

1) Install or open Codex

Install or open the Codex client you use. Codex reads its shared configuration from ~/.codex.

2) Update ~/.codex/config.toml

Set ~/.codex/config.toml to the following:

toml
1model = "gpt-5.6-sol"2model_reasoning_effort = "xhigh"3 4model_provider = "OpenAI"5personality = "pragmatic"6 7[features]8enable_request_compression = true9 10[model_providers.OpenAI]11name = "OpenAI"12base_url = "https://api.0-0.pro/v1"13wire_api = "responses"14requires_openai_auth = true15supports_websockets = false16experimental_bearer_token = "sk-xxx"
Note
Replace sk-xxx with your 0-0 API key. This is the only file you need to update.

3) Restart or reload Codex

Restart or reload the Codex client you use: reload the VS Code window for VS Code extensions/plugins, restart your Codex CLI session, or reopen the Codex app.

Troubleshooting

Network
If Codex reports stream disconnected before completion: error sending request for url (https://api.0-0.pro/v1/responses), first check the local VPN or proxy. A common cause is a local 60s idle timeout cutting the streaming connection; Codex may retry 5 times, which makes the request look stuck for about 5 minutes.

Restore previous chats

  1. Close the Codex app, Codex CLI, and the Codex extension in VS Code.
  2. Run the command for your system.

    Windows PowerShell:

    powershell
    1py -c "import sqlite3,pathlib; db=sqlite3.connect(pathlib.Path.home()/'.codex'/'state_5.sqlite'); db.execute('UPDATE threads SET model_provider=?',('OpenAI',)); db.commit()"

    macOS / Linux:

    bash
    1sqlite3 "$HOME/.codex/state_5.sqlite" "UPDATE threads SET model_provider = 'OpenAI';"
  3. Reopen Codex. If you use Codex CLI, run:

    bash
    1codex resume --all

Use mobile ChatGPT to connect to desktop Codex App or CLI

After completing the config above, use these steps to control Codex running on your computer from ChatGPT on your phone. Keep desktop Codex signed in with the same ChatGPT account you use on mobile. A ChatGPT Free account can also be used for this login step.

  1. On the computer, run Codex login and complete the ChatGPT sign-in flow:

    bash
    1codex login
  2. If you use Codex CLI, enable remote control once, then keep the remote-control process running:

    bash
    1codex features enable remote_control2codex remote-control
  3. On your phone, install or open ChatGPT, sign in with the same account, find Codex in ChatGPT, and connect it to your computer. If you use the desktop Codex app instead of the CLI, restart the app and use Settings → Connections to allow this computer to be controlled from your phone.