Skip to content

fix(adopt): drop the Codex model-list cost - #113

Merged
fylorn merged 1 commit into
mainfrom
fix/drop-codex-model-list-cost
Sep 23, 2026
Merged

fylorn merged 1 commit into
mainfrom
fix/drop-codex-model-list-cost

Conversation

@fylorn

@fylorn fylorn commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

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/codex this time rather than measured — 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. The response is rejected with a single error!("failed to refresh available models: …") and the run continues.
  • Nobody is held up by it. models-manager/models.json is compiled in with include_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.
  • Today's main gates the request away entirely — supports_api_key_models() is false for a provider with a custom base_url and no model_catalog_url, so refresh_available_models returns 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

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
fylorn force-pushed the fix/drop-codex-model-list-cost branch from 366c4d3 to 478ac97 Compare September 23, 2026 04:34
@fylorn
fylorn merged commit bc952eb into main Sep 23, 2026
1 check passed
@fylorn
fylorn deleted the fix/drop-codex-model-list-cost branch September 23, 2026 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant