chatgpt provider calls the Codex backend that ships with a ChatGPT
subscription (Plus, Pro, Business, or Enterprise). Usage is billed against the
subscription’s quota, not an OpenAI Platform API key.
Pair it with the Codex guide to run
Codex -> GoModel -> ChatGPT subscription.
Configure
The credential is the access token from your Codex sign-in:config.yaml:
codex login first if ~/.codex/auth.json does not exist yet. GoModel
derives the ChatGPT account ID from the token itself, so nothing else is
needed.
Models
The Codex backend has no model-listing endpoint, so GoModel ships the inventory a ChatGPT subscription can call:The '<model>' model is not supported when using Codex with a ChatGPT account.
gpt-5.4 and gpt-5.4-mini leave ChatGPT-authenticated Codex on August 31,
2026; use gpt-5.6-terra and gpt-5.6-luna instead. Both stay available to
Codex sessions authenticated with an OpenAI API key, through the openai
provider.
Responses API only
The Codex backend serves/responses and nothing else, so
/v1/chat/completions and /v1/embeddings answer 501 for chatgpt models.
Use /v1/responses, which is what Codex sends anyway.
The backend also validates against a strict parameter allowlist. GoModel
adapts requests rather than failing them, so callers keep using the standard
Responses API:
Because the backend streams only, a non-streaming
POST /v1/responses is
served by streaming upstream and returning the final response object. Clients
see a normal non-streaming response. See
Responses compatibility for how the
gateway’s Responses surface behaves across providers.
Prompt caching
The backend keeps one conversation on a warm prefix cache when every turn carries the samesession-id header; prompt_cache_key alone gets no cache
hits. GoModel sends the detected session as
session-id, or the client’s prompt_cache_key when no session is detected,
and forwards the key in the body too, as the Codex CLI does. When the client
sends no key, the session id stands in for it if it fits the 64-character key
limit.
If the client sends no key and GoModel detects no session, the backend gets
neither signal. Send prompt_cache_key to keep cache hits; a session header
such as X-Session-Id also works unless SESSION_KEEPING_ENABLED=false, which
turns session detection off.
To check hit rates against the real backend, run the opt-in live test:
Reported cost is not real spend
Subscription usage is flat-rate, but these model IDs also exist on the OpenAI Platform, so the model catalog attaches their per-token API prices. Usage records and dashboard totals forchatgpt show a figure that corresponds to no
actual charge, and the same collision makes GET /v1/models advertise
modes: ["chat", "responses"].
The modes are cosmetic — they drive dashboard grouping, not routing. Pricing is
not: it feeds cost tracking, budgets, and cost
load balancing.
Limits
Subscription quota is separate from API credit. When it is exhausted the gateway relays a429: