Codex -> GoModel -> upstream
Codex talks to GoModel with a GoModel master key, so every request shows up in
the dashboard. The one choice to make is which provider serves the model,
because that decides what pays for it:
Everything after this point is the same either way.
Before you start
- Install Codex on your machine.
- Choose a GoModel master key, for example
change-me.
-e OPENAI_API_KEY="sk-..." — and use one of its models in step 2.
1. Confirm the Responses API
Optional: check that GoModel answers a plain Responses request before involving Codex. Use a model your configured provider actually serves.ok. For the Python and JavaScript equivalents, see the
Responses API reference.
2. Configure Codex to use GoModel
Add a Responses-based provider to~/.codex/config.toml:
Codex requires this variable even when you are signed in with ChatGPT, and it
carries the GoModel master key — not an OpenAI key. Without it the provider
fails to start.
Codex ignores
OPENAI_BASE_URL. Use the provider config above, or set
openai_base_url in Codex config if you intentionally want to override the
built-in OpenAI provider.3. Run a Codex test prompt
Codex 0.147.0 logs
failed to refresh available models: missing field "models" at startup. It calls its own catalogue endpoint, which GoModel
answers with the standard OpenAI /v1/models shape. The message is cosmetic
— Codex falls back and the session works.4. Check the traffic in GoModel
Open the GoModel dashboard audit logs: http://localhost:8080/admin/dashboard/audit This lets you confirm that Codex is reaching GoModel and inspect the full request and response trail. From the same dashboard, you can keep following your GoModel traffic and usage.DeepSeek V4
Codex sendsPOST /v1/responses, which DeepSeek does not serve natively. Use
type: deepseek rather than type: openai: the DeepSeek provider translates
/responses to /chat/completions, while the generic OpenAI provider forwards
it upstream unchanged.
model = "deepseek-v4-pro" in the Codex config from step 2. See the
DeepSeek page for the reasoning-effort mapping, and
Responses compatibility for what
chat-translated providers drop — including the reasoning.encrypted_content
Codex asks for on every request.
Current status
- the recommended integration path is Codex custom provider -> standard
http://localhost:8080/v1 - Codex custom provider mode sends
POST /v1/responsesas plain JSON, so the old--disable enable_request_compressionworkaround is no longer required
References
- OpenAI Codex discussion: Deprecating
chat/completionssupport in Codex - OpenAI Codex repository: openai/codex
Validated on August 20, 2026
This guide was validated against a local GoModel instance and Codex CLI0.147.0. Local validation confirmed:
codex execreturnedokthroughCodex -> GoModel -> ChatGPT subscriptionPOST /v1/responsesreturned200 OKfor both streaming and non-streaming callers- Codex sent plain JSON; no
Content-Encoding: zstdheader was present - the custom
gomodelprovider failed without itsenv_key, because Codex still requires that variable when signed in with ChatGPT