~/.codex/config.toml. To send its requests to Hebo Gateway, add Hebo as a model provider in that file.
This setup uses your Hebo API key, not your ChatGPT subscription. Requests through Hebo do not use
your subscription allowance or change your plan.
Before you start
- Install the Codex app.
- Copy your alias path and create a Hebo API key. See Getting Started.
Configure Codex
-
Open or create
~/.codex/config.toml(%USERPROFILE%\.codex\config.tomlon Windows) and add these settings. Setmodelto your alias path:Putconfig.tomlmodel_providerandmodelbefore the first table header, such as[model_providers.hebo]. If the file already sets these keys or has a[model_providers.hebo]section, update them instead of adding duplicates. -
Set
HEBO_API_KEYfor desktop apps. Apps launched from the Dock or Start menu do not read your shell profile.On macOS, thelaunchctl setenvvalue lasts until you log out. Run the command again after each login. - Quit and reopen Codex Desktop.
Verify the connection
Send a test message in Codex and confirm that you receive a response. In the Hebo Console, open the agent and branch used by your alias and check Traces for the request.Switch models
- To use a different model with the same alias, change the Type of the alias in the Hebo Console. Your
config.tomlstays the same. See Models. - To use a different alias, set
modelinconfig.tomlto its alias path. Then quit and reopen Codex Desktop.
Troubleshooting
- Authentication errors: Check that
HEBO_API_KEYholds a valid Hebo API key. Do step 2 again, then quit and reopen Codex Desktop. - The app ignores your changes: Check that you edited
~/.codex/config.tomlin your home directory, not a.codex/config.tomlfile in a project folder. If the app still uses old settings, log out of your computer, log in, and do step 2 again. BYOK_REQUIREDerror: The model needs your own provider credentials. See Bring your own key.

