Integration guides

Codex

OpenAI's coding agent — available as a CLI, desktop app and VS Code extension; works with any OpenAI-compatible service, configured once and reused for the long haul.

Site / download
  1. 01

    Install and verify

    Install globally with npm (be sure to include the @openai/ prefix — don't grab a similarly named package by mistake); on macOS you can also use Homebrew. After installing, print the version to confirm the command is ready.

    # npm (all platforms)
    npm install -g @openai/codex
    
    # macOS Homebrew
    brew install --cask codex
    
    # Verify
    codex --version
  2. 02

    Find the config file

    Codex reads .codex/config.toml in your home directory; create it by hand if it doesn't exist. To move it elsewhere, set the CODEX_HOME environment variable.

    Windows
    %USERPROFILE%\.codex\config.toml
    macOS
    ~/.codex/config.toml
    Linux
    ~/.codex/config.toml
  3. 03

    Write the provider config

    Add XylemNode as a model source. Three things to note: base_url must include /v1 manually; Codex currently only speaks the Responses protocol, so keep wire_api set to responses; reference the key via env_key rather than writing it in plain text.

    model = "gpt-5.6-sol"
    model_provider = "xylemnode"
    
    [model_providers.xylemnode]
    name = "XylemNode"
    base_url = "https://api.xylemnode.com/v1"
    wire_api = "responses"
    env_key = "XYLEMNODE_API_KEY"
  4. 04

    Set the key

    Store the key in the environment variable named by env_key above. On Windows, run setx and reopen the terminal for it to take effect.

    # Windows (PowerShell / CMD)
    setx XYLEMNODE_API_KEY "sk-your-key"
    
    # macOS / Linux
    export XYLEMNODE_API_KEY="sk-your-key"
  5. 05

    Launch and test

    Reopen the terminal, run codex and send a simple prompt to confirm the connection. You can also switch models on the fly at launch.

    codex
    
    # Pick a model for this run
    codex --model gpt-5.6-sol

One config for CLI, desktop and the VS Code extension

All three entry points read the same user-level config.toml, so configuring it once covers them all. A few notes: model_provider and model_providers must live in the user-level config — project-level configs ignore them; restart the client after changes — in VS Code, reload the window and reselect the model; the desktop app only reads your local config when the project is opened in local mode.

Common questions

Every Codex command fails after an upgrade

Check wire_api in config.toml first. Codex has dropped chat/completions and speaks only the Responses protocol — the migration notice is explicit that any custom provider set to wire_api = "chat", or left without the field, has to be updated. Set wire_api = "responses" on every model_providers entry. While you are there, confirm base_url carries /v1 by hand; Codex does not append it for you.