Repository navigation
fix(adopt): drop the Codex model-list cost - #113
Merged
Merged
Conversation
It said Codex does not read the model list from the gateway and that a custom model name therefore has no effect. All three parts are now wrong or not worth a line in the confirmation dialog. Read from openai/codex rather than measured this time, since the CLI is open source: - 0.139.0 sent no GET at all; 0.153.4 does send `GET /v1/models?client_version=…`. So "does not read" is false. - It wants Codex's own catalogue shape (`models` at the top level), not the OpenAI `data` list the gateway serves, so the response is rejected with one logged line and nothing else. - Nobody is held up by that. `models-manager/models.json` is compiled in with `include_str!`; the remote catalogue only adds to it. A model in the bundled list draws no warning at all, and one outside it still forwards, on a 272k fallback context window. - Today's main gates the request away entirely: a provider with a custom `base_url` and no `model_catalog_url` skips the fetch. A cost that blocks nobody, and is disappearing on its own, does not earn a line the user has to read before confirming. The reasoning is kept in a comment so the next person does not re-add it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
fylorn
force-pushed
the
fix/drop-codex-model-list-cost
branch
from
September 23, 2026 04:34
366c4d3 to
478ac97
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.
The cost read: "Codex does not read the model list from the gateway, so a custom model name has no effect; its local model catalogue decides." All three parts are now wrong, or not worth a line in the confirmation dialog.
Read from
openai/codexthis time rather than measured — the CLI is open source:GET /v1/models?client_version=…, so "does not read" is false.modelsat the top level), not the OpenAIdatalist the gateway serves. The response is rejected with a singleerror!("failed to refresh available models: …")and the run continues.models-manager/models.jsonis compiled in withinclude_str!(11 models); the remote catalogue only adds to it. A model in the bundled list draws no warning at all, and one outside it still forwards, on a 272k fallback context window.maingates the request away entirely —supports_api_key_models()is false for a provider with a custombase_urland nomodel_catalog_url, sorefresh_available_modelsreturns early without fetching.A cost that blocks nobody, and is disappearing on its own, does not earn a line the user has to read before confirming. The reasoning stays in a comment next to the Codex edits so it does not get re-added.
Codex keeps two costs: the ChatGPT desktop app is adopted along with it, and the terminal has to be reopened.
Checks
cargo fmt --check,cargo clippy --workspace --all-targets -D warnings,cargo test --workspace,./scripts/smoke.sh(51 passed, 0 failed).🤖 Generated with Claude Code