Skip to main content
The gateway enforces the compliance boundary for the models it serves. It does not control the app itself: local tool execution, file access, or the app’s own background connections to OpenAI. See What this does not control. Client-side behavior is the customer’s responsibility.
The ChatGPT desktop app has two agent modes, ChatGPT Work and Codex. Both read one file, ~/.codex/config.toml. Point that file at the Consus Gateway and both modes run on compliant GPT models. No OpenAI account, no sign-in.

Before you start

  • The ChatGPT desktop app. Download it, but do not sign in.
  • A Consus API key from your Consus admin.
Keep the app closed (Cmd+Q) until Step 2. It rewrites its config file while running.

Step 1: Add the configuration

Create ~/.codex/config.toml (Windows: %USERPROFILE%\.codex\config.toml) and replace <CONSUS_API_KEY> with your key. For FedRAMP High, also change :itar to :fedramp-high on the first line.
The file holds your key, so restrict it to your user:
Do not reorder the file. In TOML, every line after a [table] header belongs to that table. The eight lines at the top must stay above the first [...] header. Move web_search = "disabled" below [model_providers.consus] and Codex silently ignores it.

Step 2: Open the app and verify

Open ChatGPT and pick ChatGPT Work or Codex from the dropdown at the top left. Three things should be true:
  1. The bottom-left corner says Consus Gateway.
  2. The model picker shows a model and a reasoning effort. It reads Custom until you do Step 3.
  3. Settings → Configuration shows Web search Disabled, Sandbox Workspace write, and network access off.
Then click Choose project, pick a folder, and ask for something real:
The file appears on disk and the output is the actual numbers. You’re done. Everything works without this step. Doing it gets you three things: the picker shows real names like 5.6 Sol (ITAR) instead of Custom, you can switch models from the picker, and the GPT-5.6 models get their full context window (up to 1M tokens) instead of a small default. Quit the app, then save this script as ~/.codex/make-catalog.py:
Run it once, and again whenever the app updates:
Then add this line to config.toml, directly under model_reasoning_summary (it must sit above the first [table] header), and reopen the app:
Add the line only after running the script. Codex will not start if the file it points to is missing.

Good to know

  • Start a new chat to change models. Changing reasoning effort mid-chat is fine. Changing the model mid-chat can fail with The request was invalid, because Codex replays encrypted reasoning that only the original cloud provider can read. Sol and GPT-5.1 are served from Azure Government; Terra, Luna, and GPT-5.4 from AWS GovCloud.
  • GPT models only. The app speaks the Responses API, which serves GPT. For Claude, use Claude Desktop or Claude Code.
  • No web search, image generation, voice, or connectors. Those run on OpenAI’s infrastructure outside the compliance boundary. The model has no live information, so treat any “current” facts as unverified.
  • Do not sign in to ChatGPT on a machine that handles controlled data. Signing in enables the OpenAI-hosted features this setup turns off.

What this does not control

  • The app’s own connections. The configuration governs the agent: where prompts go, which tools exist, what its commands can reach. The application around it is OpenAI’s and keeps its own connections to OpenAI and Google for things like updates and product analytics. Consus cannot see or route those.
  • The provider. A user who edits config.toml can point the app somewhere else. No Codex setting prevents that.
  • Local data. Chats and transcripts are stored on the workstation under ~/.codex/.
If your data classification requires the workstation to reach only authorized endpoints, enforce it on the network: an egress allowlist that permits api.consus.io. That one control closes the first two gaps.

For admins: lock the settings

Users can edit config.toml. To make the safety settings permanent, install a second file, requirements.toml, where users cannot write. Codex treats it as a hard limit: anything config.toml requests beyond it is overridden at launch, and the app shows those settings as locked under Settings → Configuration → Admin config.
Install it as an administrator:
To push the Step 1 file to a fleet as well, use /etc/codex/managed_config.toml or the MDM key config_toml_base64.
The file is machine-wide, so it also governs the Codex CLI and editor extensions. Headless codex exec can no longer run commands or edit files, because it always requests the never approval policy, which this file forbids.

Troubleshooting

The request was invalid right after switching models — Start a new chat. See Good to know. The picker says Custom, or lists the wrong models — Do Step 3, and re-run the script after every app update. The app will not startmodel_catalog_json points at a file that does not exist. Run the script in Step 3, or remove the line. unexpected status 401 — The key in http_headers is missing or wrong. Do not switch to env_key or env_http_headers: they read shell environment variables, which an app launched from the Dock does not have. A setting has no effect — A top-level key is below a [table] header. Settings → Configuration shows a banner naming the ignored key. A banner about session-flags is the app’s own and can be ignored. My edits disappeared — The app rewrote the file while it was running. Quit it before editing, and leave the sections it adds ([desktop], [projects], [plugins], [mcp_servers]) in place. git fetch or pip install fails inside the agent — Agent commands have no network, by design. Run those yourself in a terminal.

Codex CLI

Prefer the terminal? See the Codex CLI guide.