查看中文版 →

Deutsche Version ansehen →

Открыть русскую версию →

Ver versión en español →

Log inChoose a plan
Blog · Setup guides

Use Custom Models in Codex & ChatGPT Desktop

Codex reads one config file from all three places it runs. Add a provider block and set your key to use it across the terminal, IDE and desktop app.

The Codex CLI in your terminal, the Codex extension in your editor, and Codex inside the ChatGPT desktop app all read the same ~/.codex/config.toml. Add a CodingPass provider block there and all three entry points can use CodingPass models. For the quick reference only, see the Codex setup guide.

Codex and its three entry points

Codex is OpenAI's coding agent. It reads code in your project directory, edits files, and runs commands inside a sandbox—pausing for your approval whenever an action crosses the sandbox boundary. Beyond interactive coding, /review reviews diffs and codex exec runs non-interactive tasks in scripts and CI. The CLI is open-source.

There are three entry points:

  • Terminal: the codex command, installed via npm.
  • IDE extension: the Codex plugin in VS Code and other editors.
  • Desktop app: bundled inside the ChatGPT desktop app (ChatGPT.app on macOS, still identified internally as com.openai.codex). The app ships its own codex binary, whose version may differ from the CLI you installed.

All three run locally and use model_provider in config.toml to decide where model requests go. Cloud Codex tasks do not read this file and cannot use a custom provider.

Codex's built-in catalog lists only OpenAI models. Once connected to CodingPass, Go defaults to GPT-6.1 Terra, while Plus and Pro unlock GPT-6.2 Sol. The same key can also call Claude, Gemini, and other models—Codex just prints a warning line because it lacks metadata for them.

Setup steps

Prerequisites

  • Install the Codex CLI: npm install -g @openai/codex@latest. If you use the desktop app, install the ChatGPT desktop app.
  • Open the Keys page in the CodingPass dashboard and create a key. Copy it—it starts with cp-live-.

Step 1: Write config.toml

Add the following block to ~/.codex/config.toml (create the file if it does not exist):

model = "gpt-6.1-terra"model_provider = "codingpass" [model_providers.codingpass]name = "codingpass"base_url = "https://codingpass.ai/v1"env_key = "CODINGPASS_API_KEY"wire_api = "responses"

base_url must end with /v1 or requests will return 404. Use gpt-6.1-terra on Go; Plus and Pro can switch model to gpt-6.2-sol.

Step 2: Set your key

env_key names an environment variable, not the key itself. Export the key in your shell startup file (~/.zshrc for zsh, ~/.bashrc for bash) and open a new terminal:

export CODINGPASS_API_KEY="cp-live-…"

Step 3: Run it in the terminal

Inside your project directory, run codex. If the status bar shows GPT-6.1 Terra and a message gets a reply, you are connected.

Codex CLI 0.170.0 terminal UI showing the prompt Say hi in five words, reply Hi there, friend! How are you?, and GPT-6.1 Terra in the status bar
No ChatGPT login needed—the status bar shows the model from config.toml.

To verify that Codex sees your key, run codex doctor. The auth line should report provider auth env var CODINGPASS_API_KEY (present).

Step 4: Use it in the desktop app

Quit the desktop app completely (⌘Q on macOS), reopen it, start a new session, and send a message.

Codex session inside the ChatGPT desktop app showing Say hi in five words, reply Hi there, hope you are well!, and 6.1 Terra in the model slot
The desktop app reads the same config.toml and shows 6.1 Terra.

The model slot displays 6.1 Terra, followed by the reasoning effort such as Light.

In our testing, launching the app from the Dock picks up the key from ~/.zshrc. If it does not on your machine, replace the env_key line with experimental_bearer_token = "cp-live-…" and relaunch the app.

Whenever you edit config.toml later, restart codex in the terminal and quit and reopen the desktop app.

Boarding

Keep Codex, put it on a fixed monthly bill.

One provider block gets you GPT-6.1 Terra from a month. No surprise charges, cancel anytime.

  • Request ID on every response
  • Full refund if you've used 5% or less
  • No surprise charges
Choose GoCodex guide

$10/mo until you cancel.