OpenAI & Codex
OpenAI API and Codex now use different execution paths:
- OpenAI API — Claudette keeps the gateway path. It starts a local HTTP listener that translates Claude’s wire format into the OpenAI Responses API (
/v1/responses) so the officialclaudeCLI can talk to OpenAI-shaped endpoints. - Codex — Claudette uses the
codexCLI app-server (codex app-server --listen stdio://) and talks JSON-RPC to that process. This path supersedes the oldcodex-subscriptiongateway row when Codex is enabled.
Prerequisites
Section titled “Prerequisites”For the OpenAI API backend, make sure Settings > Models > Agent providers is on. OpenAI API remains manual because it needs an API key.
For Codex, make sure Settings > Models > Codex is on. Claudette auto-enables Codex at startup when it detects the codex CLI, unless you have manually turned Codex off. When Codex is on, Settings > Models shows Codex and the chat model picker includes the seeded Codex models immediately.
OpenAI API
Section titled “OpenAI API”For users who specifically want gpt-* or OpenAI reasoning models, or who have prepaid OpenAI credit they’d rather use instead of Claude quota.
- Get an API key from platform.openai.com.
- In Settings > Models, find the
openai-apibackend. - Paste the key into the API key field and save.
- Click Test — Claudette validates the key against
/v1/models. - Click Refresh models — Claudette queries the OpenAI
/v1/modelsendpoint and populates the model list. - Set a default model if desired.
- Toggle Enabled on.
The OpenAI API provider appears in the chat header picker alongside Claude.
Codex reuses the codex CLI’s ChatGPT subscription auth instead of an API key. It is useful if you have a ChatGPT Plus / Pro / Team subscription that includes Codex access and want Claudette to drive Codex natively.
Install the codex CLI
Section titled “Install the codex CLI”npm install -g @openai/codex# orbun install -g @openai/codexConfirm it is on PATH: codex --version should print a version.
Claudette resolves codex from the app’s enriched PATH plus common user install locations on macOS, Linux, and Windows, including npm shims and native codex.exe installs.
Sign in
Section titled “Sign in”In Settings > Models, find Codex and click Run codex login. Claudette runs codex login for you, which:
- Opens your browser to OpenAI’s OAuth page.
- Has you sign in with your ChatGPT account.
- Stores Codex CLI credentials under
~/.codex/.
You can also select a Codex model and run /login in chat, or run codex login yourself in any terminal.
Configure
Section titled “Configure”- In Settings > Models, make sure Codex is on.
- Find the Codex backend card.
- If you have not signed in yet, click Run codex login.
- Claudette refreshes Codex models once in the background at startup when Codex is enabled, so authenticated users usually see account models appear automatically. Click Refresh models for an immediate manual refresh.
- Set a default model if desired.
- Toggle Enabled on.
Runtime behavior
Section titled “Runtime behavior”Codex does not start the Claude Code CLI or the OpenAI gateway. Instead:
- Claudette spawns
codex app-server --listen stdio://in the workspace. - Claudette initializes the app-server over JSON-RPC.
- New turns use
thread/startandturn/start; mid-turn steering usesturn/steer; stop requests useturn/interrupt. - Fast mode maps to Codex’s priority service tier through app-server
serviceTier. - Codex intelligence uses the same user-facing shape as Codex:
Low,Medium,High, andExtra High. Claudette maps those levels to app-serverturn/start.effortvalues (low,medium,high,xhigh) and seeds new threads withconfig.model_reasoning_effort. Empty or stale Codex effort values normalize toHigh. Codex does not expose a model reasoning on/off toggle in the picker metadata, so Claudette only offers the intelligence levels plus a display-only Show Codex reasoning toggle for reasoning summaries. - Codex notifications are adapted into Claudette chat events for assistant text, reasoning summaries, command execution, MCP tool calls, file changes, token usage, turn completion, failures, and process exit.
- Codex app-server approval requests for command execution, file changes, permission escalation,
request_user_input, and MCP elicitations are answered over JSON-RPC. Denying one of these Codex approvals sends only a decline decision to Codex; freeform denial feedback is reserved for approval flows that can forward it.
Permission levels map to Codex approval and sandbox settings:
| Claudette permission | Codex approval | Codex sandbox |
|---|---|---|
| Read-only | untrusted | read-only |
| Standard | on-request | workspace-write |
| Full access | never | danger-full-access |
Native Codex currently does not expose Claude Remote Control, Claude MCP config injection, or image/file attachments through Claudette. Those controls remain Claude Code-only until the app-server protocol has matching wired surfaces.
Legacy Codex Gateway
Section titled “Legacy Codex Gateway”The old codex-subscription backend routed ChatGPT subscription auth through Claudette’s OpenAI Responses gateway. It is no longer user-facing in Settings; Codex CLI app-server is the Codex path.
Custom OpenAI-shaped endpoints
Section titled “Custom OpenAI-shaped endpoints”The CustomOpenAi backend kind exists in the data model but is not yet exposed in the Settings panel. When that flow lands, the same OpenAI gateway path will work for providers that implement /v1/responses. Providers that only ship /v1/chat/completions will not work behind the gateway until they add the Responses API.
Troubleshooting
Section titled “Troubleshooting”Test fails on OpenAI API — the API key is invalid or rate-limited. Re-paste it; check the dashboard at platform.openai.com/usage.
Codex fails to start — confirm codex --version works from the same shell environment and run codex login again.
Agent immediately errors with no model — set a default model in Settings > Models for the selected backend.
OpenAI gateway restart loop — usually caused by the upstream rejecting the translated request. Open the agent’s terminal tab to see stderr from the listener; common causes are a model ID the upstream does not recognize or a request shape the gateway cannot translate.
See also
Section titled “See also”- Agent Providers overview — capability matrix and architecture
- Ollama — local provider setup
- Authentication — credential handling for the default Anthropic backend