~/.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.
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.
config.toml
config.toml
What each setting does
What each setting does
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:- The bottom-left corner says Consus Gateway.
- The model picker shows a model and a reasoning effort. It reads Custom until you do Step 3.
- Settings → Configuration shows Web search Disabled, Sandbox Workspace write, and network access off.
Step 3 (optional, recommended): Name your models
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:
make-catalog.py
make-catalog.py
config.toml, directly under model_reasoning_summary (it must sit above the first [table] header), and reopen the app:
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.tomlcan point the app somewhere else. No Codex setting prevents that. - Local data. Chats and transcripts are stored on the workstation under
~/.codex/.
api.consus.io. That one control closes the first two gaps.
For admins: lock the settings
Users can editconfig.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.
requirements.toml
requirements.toml
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 start — model_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.