Skip to content

Edgee Demo Day · November 10

Register
Agent Gateway
Coding assistants

Codex

Use Edgee with Codex to cut token costs and extend sessions, with zero manual configuration.

Codex is OpenAI's open-source CLI coding agent. Route your Codex traffic through Edgee to cut token costs by 15-20% with lossless compression, and gain full observability over every coding session. (Our SWE-bench Lite benchmark measures 50% with all three strategies on: see what you'll actually save.)

Edgee works with your existing subscription for Codex.

The fastest way to connect Codex to Edgee is through the CLI, no config files to edit manually.

Install the Edgee CLI

curl -fsSL https://edgee.ai/install.sh | bash

# Accept the alias prompt (recommended).
# If skipped: edgee alias
# Reopen your terminal afterward.

Launch Codex through Edgee

Choose how you want to launch. Both options route requests through Edgee.

With aliases installed in the previous step, use your usual command:

codex

The alias runs edgee launch for you, so requests go through Edgee.

If you are not signed in, Edgee starts sign-in automatically at launch. Follow the prompts and select your organization when asked.

The CLI authenticates, writes the Codex config, and starts Codex, all in one command. Token compression is enabled automatically.

After the session ends, the CLI prints a link to view token usage, compression savings, and cost breakdown in the Edgee Console.

Manual setup (advanced)

Get your coding-agent key

Manual setup uses the key of your enrolled Codex agent, not a standard API key created for LLM Router applications.

  1. Open the Edgee Console and select your organization.
  2. In the header, click Set up coding agent or +, select Codex, and click Enroll. If your agent is already enrolled, use its existing icon.
  3. Click the agent's icon, then Advanced settings → Advanced.
  4. Under Edgee API key (for manual setup), click Reveal key, then the copy icon.

Use this key wherever the configuration below shows <YOUR_CODING_AGENT_KEY>.

Configure Codex

If you prefer to configure Codex without the CLI, update your Codex configuration file at ~/.codex/config.toml:

model_provider = "edgee"

[model_providers.edgee]
name = "EDGEE"
base_url = "https://edgee.io/v1"
http_headers = { "x-edgee-api-key" = "<YOUR_CODING_AGENT_KEY>" }
wire_api = "responses"
requires_openai_auth = true
model_catalog_url = "https://edgee.io/v1/models?catalog=edgee"

[features]
api_key_model_discovery = true

requires_openai_auth keeps your ChatGPT sign-in for OpenAI models. model_catalog_url adds your organization's Edgee models to Codex's model picker; api_key_model_discovery lets Codex fetch that list when you sign in with an API key.

Choose a model

Codex's model picker (/model) lists your OpenAI models first, then the models your organization can use through Edgee, such as Claude, GLM, Kimi, or DeepSeek. Pick any of them, mid-session included.

  • OpenAI models run on your ChatGPT plan, as before: Edgee forwards them with your Codex sign-in.
  • Other models run on your organization's credentials (Edgee credits or BYOK) and are billed to the organization, not to your ChatGPT plan.
  • Signed out of ChatGPT, every model runs on your organization's credentials, OpenAI models included.

Choose which models Codex lists

Organization admins decide which Edgee models appear after the OpenAI ones, in Settings → Gateway → Codex model picker. The setting applies to every Codex user in the organization, in Codex CLI and in the ChatGPT desktop app.

Auto (default) lists every model your organization can use through Edgee, ranked by capability tier then most recent release, until Codex's catalog limit is reached (roughly 15 to 25 models, depending on your ChatGPT plan's own list).

Manual lists only the models you pick, up to 15, in your order. Search for a model to add it, then use the arrows to reorder the list, and click Save.

Either way, model access rules and key allowlists still apply. When BYOK only is on, you can only pick models served by your organization's provider keys.

Usage

Keep launching through Edgee so the request uses your configured gateway:

edgee launch codex "Explain this repository"

Arguments after the agent name are forwarded to the installed agent. Use that agent's current help for its supported flags. A bare codex command routes through Edgee only if you have installed an alias.

Verify the connection

Send one request from the configured client, then open Logs in the same Edgee organization. Check the served model, provider, and key. For a CLI-launched coding agent, also inspect its session report.

If the request is missing, check that you launched through Edgee or saved the client’s gateway URL and coding-agent key. If it appears with an error, inspect the error before changing settings. See Troubleshooting and Gateway errors.