selan.ai
Apps

Docs · Codex Desktop

Set up Codex Desktop on your company's account

Run OpenAI's Codex desktop app on your company's account, with the same models, limits, Usage and Logs as everything else. Paste a few lines, restart, sign in. Start at the docs.

Which settings do I need?

Step 2 asks for these lines.

model_provider = "selan-app"
model_providers.selan-app.name = "Selan"
model_providers.selan-app.base_url = "https://gw.selan.ai/openai/v1"
model_providers.selan-app.model_catalog_url = "https://gw.selan.ai/openai/v1/models"
model_providers.selan-app.wire_api = "responses"
model_providers.selan-app.request_max_retries = 1
model_providers.selan-app.stream_max_retries = 2
model_providers.selan-app.gateway_oauth.authorization_url = "https://auth.selan.ai/oauth/authorize"
model_providers.selan-app.gateway_oauth.token_url = "https://auth.selan.ai/oauth/token"
model_providers.selan-app.gateway_oauth.client_id = "codex"

Tested with the Codex app inside the ChatGPT desktop app, version 26.1123.

What is in the settings?

A provider and a place to sign in, not a credential. The lines make Selan the app's model provider and send you to Selan's sign-in. They are the same for everyone at your company and hold nothing secret. Your own credential comes from the sign-in in step 3, and the app keeps it and renews it itself.

Codex in the terminal stays on selan codex: these lines do not change it.

How do I set up Codex Desktop, step by step?

Settings (⌘,) → Configuration → Configuration file → Open. It opens ~/.codex/config.toml in your editor.

The app's Settings on Configuration, with the Configuration file row and its Open button
Settings → Configuration. Open is on the Configuration file row.

Put the lines from the top of this page first in the file, above anything else; what is already there stays as it was. If the file already has a model_provider line, remove it.

Quit the app and open it again. Choose Continue to Sign In; your browser opens. Sign in there as you would to Selan itself. No ChatGPT subscription is needed.

The app's Connect to your gateway screen with a Continue to Sign In button
The app asks for the sign-in itself after the restart.

The model picker lists your company's models. Every request then runs on your company's account.

The model picker open, listing the company's models
The list comes from your company, so it changes when an owner changes the models.

What if Codex Desktop setup did not work?

The app still asks for a ChatGPT account. The lines are below a [section] header in the file, or the app has not restarted. Move them to the top, save, quit and open it again.

It says no models are available. It is not signed in yet: choose Continue to Sign In.

It refuses the config file. The file has two model_provider lines. Keep the one from this page.