Repository navigation
feat(codex): the gateway's model is in the picker, and titles go through the gateway - #918
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ugh the gateway When Codex runs on a gateway (its config's `model_provider` is not OpenAI), the model picker offered only OpenAI's models and started new threads on one the gateway may not serve, and titles and commit messages written by Codex went to OpenAI: those one-shot `codex exec` runs leave out the user's config on purpose (so their MCP servers and notify hooks don't fire for a title), and the gateway went with it. - The status check reads Codex's config when the default provider is not OpenAI. The model it names is in the model list as the one default, shown once even when the user had added it by hand. - One-shot runs are handed the gateway alone as `-c` overrides, beside `--ignore-user-config`. A plain token or header in the provider's definition travels in the run's environment (through `env_key` and `env_http_headers`), never in its arguments. - No routing where it can't be done safely, which leaves the run on OpenAI as before: a secret only arguments could carry (a credential in the address or `query_params`, or among the `auth` command's arguments), and a Codex that starts through cmd.exe, where the settings' quotes could act as commands. - A run the gateway refuses for its model is tried once more on the config's model: the built-in pick for titles is an OpenAI model. - A run asked for before the instance's first status check ends waits for it, up to 20 seconds. A remembered gateway survives a check that could not ask Codex, lapses after 15 minutes unconfirmed, and is forgotten at once when Codex says it is on OpenAI. Not included: a Codex agent answering on the side in a room still runs on OpenAI with the borrowed ChatGPT sign-in.
…e, never as arguments The gateway's definition went to `codex exec` as `-c` overrides, with a name-based filter for what looked like a secret. A credential under a name the filter did not know (an Azure Functions `code` key in `query_params`) still ended up in the process list. A run on a gateway now gets a Codex home of its own: a folder only its owner can open, holding a config with the provider alone, removed when the run ends. Nothing from the definition is an argument, so there is nothing to filter, no variable names to invent, and nothing for cmd.exe to misread. The home stands in for --ignore-user-config: it has no user config to ignore. A home made for one run has no sign-in, so a provider that signs in with what Codex's own home stores (`requires_openai_auth`, a gateway's OAuth) gets no routing and its runs stay on OpenAI, as before.
…teway's secrets, and a slow start asks Codex Follow-ups to running one-shot Codex runs on a gateway from a home of their own. - A provider Codex has built in has no definition to hand over and may sign in with what Codex's own home stores: it runs there, named by its id beside --ignore-user-config. Amazon Bedrock and Google Cloud providers, whose credentials Codex keeps in its home too, get no routing, like the ones that need a ChatGPT sign-in or a gateway's OAuth. - Codex's error output can repeat the address of a failed request, and with it a key the address carries. The provider's token, headers, query values and address password are struck from the error before it is logged or shown. - A run that finds no recent answer about the provider no longer goes to OpenAI after waiting out the first status check: it waits five seconds for that check, then asks Codex itself (two reads of its own config, none of a status check's calls to OpenAI). - The sweep of leftover temp homes runs before the first gateway home is made, so one a killed server left does not wait for a room side answer to clear it.
badcuban
force-pushed
the
feat/codex-gateway-model
branch
from
November 14, 2026 19:47
1905dcf to
93177c1
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When Codex runs on a gateway (its config's
model_provideris not OpenAI), the model picker offered only OpenAI's models and started new threads on one the gateway may not serve. Titles and commit messages written by Codex also went to OpenAI: those one-shotcodex execruns leave out the user's config on purpose, so that their MCP servers and notify hooks don't fire for a title, and the gateway went with it.What changed
--ignore-user-config: it has no user config to ignore.Where a run stays on OpenAI, as before
requires_openai_auth, a gateway's OAuth, Amazon Bedrock or Google Cloud. A home made for one run has no sign-in. (A provider built into Codex runs in Codex's own home, named by its id.)History of the design
The first commit passed the definition as
-coverrides with a name-based secret filter. The security review flagged that a credential under an unlisted name (query_params.code) still reached the process list. The second commit replaces that channel with the private home; the third covers what a home of its own loses.Checked
vp fmt,vp lint,vp run typecheck, full unit suite, browser suite (one unrelated chat timeline spec failed under load and passes alone).