CLI AND DESKTOP · TESTED END TO END

Use Codex with a local LLM on Mac

Connect Codex CLI or Desktop to a local LLM on Mac with Bridge1. Configure the Responses provider and choose Route1 or a plain model id.

Updated

Codex is tested end to end in real sessions. This does not guarantee every model behaves the same way.

A matte toy train crosses slender stone viaduct arches along an orange track.

Before connecting Codex

Codex API and model names

Codex uses the OpenAI-compatible Responses route, /v1/responses. The provider base URL ends in /v1 and wire_api is responses.

OpenCode, Pi.dev, Codex and Hermes Agent share plain model ids. Keep model = "route1" to follow the model you pick in Bridge1 without changing your client config.

How Route1 chooses a model →

Start from the terminal

bridge1 launch codex

What you skip
Bridge1 does not edit Codex’s saved configuration; it supplies session-only command-line overrides. Codex may write its own files during a session.
Versions
Versions below the tested version or in another major are refused; newer minors warn, while newer patches in the tested minor proceed silently.
Needs
On macOS, starting Codex depends on model availability and your automatic-loading settings; the manual steps below still work.

Set up Codex

Copy the Codex provider configuration from the Gateway panel into ~/.codex/config.toml. Replace the placeholder with your gateway key.

  1. For Codex CLI, save the generated provider configuration in ~/.codex/config.toml.
  2. For Codex Desktop, use the same configuration file, then quit and reopen the app.
model_provider = "bridge1" model = "route1" [model_providers.bridge1] name = "Bridge1" base_url = "http://127.0.0.1:54321/v1" wire_api = "responses" [model_providers.bridge1.http_headers] "x-api-key" = "YOUR-GATEWAY-KEY"

First connection check

In Codex, type bridge1: help in a chat to see status, list models, or load, switch or stop a model. If a model is not ready, Bridge1 explains the next step in the chat. You can turn chat controls off in Settings.

Check that it works

  1. Check Codex is using the Bridge1 provider and your chosen plain model id. For route1, compare the current selection in Bridge1; confirm the provider uses Responses.
  2. Ask Codex an ordinary question. A relevant answer is the reply check; a status response or an echoed phrase is not enough.
  3. Use a disposable project and ask Codex to create a small text file containing a greeting. Inspect the saved file: the task passes only when the requested content is there.

A model list or connection test does not prove Codex can complete a file task. Check CLI and Desktop separately; the terminal launcher starts the CLI.

If something is off

SymptomWhat it usually meansWhat to checkMore help
Provider request uses the wrong API or URLThe manual provider may not match the Responses setup.Compare wire_api and the base URL with the unchanged snippet above.Codex provider setup
Desktop keeps the previous configurationThe saved manual configuration needs to be reopened.Save the provider file, quit Codex Desktop and reopen it.Claude Desktop setup
Launcher refuses the versionThe installed client is outside the supported version rule.Install or update the client; if still refused, use the Gateway panel’s manual setup.Codex compatibility
Model is not readyLaunch depends on availability and automatic-loading settings.Check the model state in Bridge1 and follow the next step shown in chat.Choose an available model

Versions

Bridge1 0.7.7 launches Codex 0.164.0, tested on macOS on 2026-10-27. This check used bridge1 launch codex. Below the tested version or a different major version: refused. A newer minor of the same major proceeds with a one-line warning. A newer patch is silent. These are not the only versions that work; you do not need the tested version. The manual setup below was not re-tested at that version.

Codex: limits to check

Review Codex and shared client limits →

Other client setup guides

Request Bridge1 early access

Codex setup questions

Does Codex Desktop need a different provider file?

Codex Desktop uses the same ~/.codex/config.toml file as the CLI. Save the provider configuration, then quit and reopen Codex Desktop.

Which API format does the Codex provider use?

Set wire_api to responses and point the provider base_url at http://127.0.0.1:54321/v1. Codex uses the OpenAI-compatible Responses route.

Can Codex select a local model directly?

Yes. Put the plain model id from the Gateway panel in the model line. Keep route1 there when you want Codex to follow the model chosen for Route1 instead.