DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to set up Codex CLI with gateway models in the /model picker with Setup Gateway

Configure Codex CLI to use a Responses API gateway and list extra gateway models in /model.

Short answer: Run node bin/setup-gateway.mjs codex and enter the Base URL and API key; then in interactive mode, tick the extra models you want in the multi-select list, or leave only the main model for a headless run; Restart Codex once so it reads gateway-catalog.json at startup. All steps.

Credentials. The key is stored as experimental_bearer_token in plaintext in config.toml, so keep the file private.

Who it is forA developer who uses Codex CLI and wants to switch between several gateway models without re-running any tool.

The problemCodex needs a provider block, a Responses API endpoint, and a model catalog file, and those are easy to get wrong by hand.

The outcomeCodex uses the gateway as its provider, and the chosen models appear in the built-in /model picker after one restart.

What you need first

  • Node.js 18 or newer installed
  • A gateway base URL that exposes /v1 and an API key for it
  • A model id the gateway serves, or access to GET /v1/models so the picker can list them
  • For Codex: a gateway that serves the Responses API (/v1/responses)

Steps

  1. Run node bin/setup-gateway.mjs codex and enter the Base URL and API key.
  2. In interactive mode, tick the extra models you want in the multi-select list, or leave only the main model for a headless run.
  3. Restart Codex once so it reads gateway-catalog.json at startup.
  4. Open /model in Codex and choose a gateway model.
  5. Run node setup-gateway.mjs status and check the Catalog line.

Prompt for your agent

In the repo Sinholms/setup-gateway, run `node bin/setup-gateway.mjs codex --base-url <GATEWAY_BASE_URL> --api-key <API_KEY> --model <MODEL_ID> --yes`. Expect config.toml and gateway-catalog.json to be written in the Codex config directory. Verify that config.toml sets wire_api to responses and that model_catalog_json points to an existing gateway-catalog.json.

Caveat. The gateway must serve the Responses API (/v1/responses), because Chat Completions only gateways will not work with Codex directly.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for Sinholms/setup-gateway and "Set up Codex CLI with gateway models in the /model picker"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer