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.
Before connecting Codex
For Codex, start with an Apple Silicon Mac: 24 GB minimum, 32 GB or more recommended. Check memory fit.
Bridge1 lists Ornith 1.5 35B-A3B (OptiQ 4-bit · default for coding) as its default for coding. Check the model's memory and context before choosing it for Codex.
Install Bridge1 through invite-only macOS early access, choose a model and open the Gateway panel for 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.
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.
For Codex CLI, save the generated provider configuration in ~/.codex/config.toml.
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
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.
Ask Codex an ordinary question. A relevant answer is the reply check; a status response or an echoed phrase is not enough.
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
Symptom
What it usually means
What to check
More help
Provider request uses the wrong API or URL
The manual provider may not match the Responses setup.
Compare wire_api and the base URL with the unchanged snippet above.
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
Codex is tested end to end in real sessions. The shared model and compaction limits still apply; check the Compatibility page before a long session.
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.