fix(codex): stop installing an empty codeg provider in the shared config.toml - #706
Open
Adam-Dalloul wants to merge 1 commit into
Open
fix(codex): stop installing an empty codeg provider in the shared config.toml#706Adam-Dalloul wants to merge 1 commit into
Adam-Dalloul wants to merge 1 commit into
Conversation
…fig.toml An unrelated switch could bind codeg as codex's model provider with no URL behind it, writing model_provider = "codeg" beside a [model_providers.codeg] whose base_url is "". codex then fails every request at the builder stage, in codeg and in every other client that reads ~/.codex/config.toml, and nothing in the panel undoes it. The WebSocket switch no longer adopts a provider. With none bound it writes only features.responses_websockets_v2, which is what the reader falls back to, so the control still round-trips. Clearing the API base URL no longer creates a provider either; typing one still binds codeg as before. Fixes xintaofei#520
Adam-Dalloul
force-pushed
the
fix/codex-config-empty-provider
branch
from
September 10, 2026 03:52
db80d05 to
f9ee522
Compare
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.
Fixes #520.
Flipping the Codex WebSocket switch, or clearing the API base URL, on a
~/.codex/config.tomlthat names nomodel_providerwrites this into it:That file is shared with the codex CLI and the native Codex app. An empty
base_urlfails the Responses request builder, so every Codex turn dies withstream disconnected before completion: builder errorin all of them, and nothing in the settings panel takes it back out.patchCodexConfigTomlTextfell back tocodegwhenever neither the patch nor the file named a provider. It no longer does:supports_websocketsonly onto a provider that is already bound. With none bound it writesfeatures.responses_websockets_v2, which is exactly what the reader falls back to, so the switch still round-trips on and off.codegonly when the patch actually carries a URL. Clearing the box no longer creates a provider whose whole content would bebase_url = "".Choosing API Key or Model provider in the auth selector still binds
codegdeliberately, and a provider the user did bind keeps its current behaviour.Tests cover both controls from an unbound config and from a bound one; reverting the source change fails five of them.