codex icon indicating copy to clipboard operation
codex copied to clipboard

Windows Desktop: empty model picker with model_catalog_url although bundled app-server returns models

Open aziphale opened this issue 1 month ago • 3 comments

What version of the Codex App are you using?

  • Installed Windows MSIX package: 26.1013.4894.0 (from the package path, not the About dialog).
  • Desktop-reported app-server: 0.163.0-alpha.10.2.
  • Desktop client identifier in logs: Codex Desktop, version 26.1013.40934.
  • Standalone CLI client version in logs: 0.163.0.

What subscription do you have?

Custom Responses-compatible provider/API-key setup. No subscription entitlement claim is made in this report.

What platform is your computer?

Windows x64, OS version 10.0.26300.

What issue are you seeing?

With an explicit provider-owned model_catalog_url, Codex Desktop's model picker is empty, while the standalone CLI can list the models. A separate diagnostic process using the exact executable used by Desktop also returns the models through model/list.

The provider hostname, local username, credentials, and conversation data have been omitted.

What steps can reproduce the bug?

  1. Configure a custom Responses provider with an explicit remote Codex-format model catalog. The hostname and model slug below are placeholders:
model = "provider-model"
model_provider = "cliproxy"

[model_providers.cliproxy]
name = "CLI Proxy API"
base_url = "https://gateway.example.com/v1"
wire_api = "responses"
model_catalog_url = "https://gateway.example.com/v1/models?client_version=0.163.0"

Use the provider's normal authentication configuration; no credentials are included here. features.api_key_model_discovery is unset in the observed configuration.

  1. Ensure the endpoint returns a Codex-native top-level models array, with selectable entries using visibility: "list" and supported_in_api: true.
  2. Fully exit and reopen Desktop, then open the model picker. The picker is empty.
  3. Compare with the CLI and the bundled app-server diagnostic described below.

What is the expected behavior?

Selectable models returned by the configured provider catalog and app-server should appear in the Desktop picker. If another eligibility condition prevents display, the UI should explain it rather than show an empty list.

Additional information

Verified observations:

  • Standalone CLI logs show a successful model-cache hit.
  • Desktop logs show model/list completing with errorCode=null; those logs do not contain the response payload.
  • Started the same app-server executable resolved by Desktop, using stdio, and initialized it with client name Codex Desktop, version 26.1013.40934, and experimentalApi: true.
  • In that separate process, config/read reports model_provider: "cliproxy", a configured cliproxy provider, and no model_catalog_json.
  • model/list with includeHidden: true, cursor: null, and limit: 100 returns 16 models, 9 with hidden: false. The configured model is present and marked default. The first selectable entry has availableAccessPrograms.cyber: ["standard"].
  • This is a separate diagnostic process, not a capture of the running Desktop process's actual response. Differences in environment, startup options, or runtime state have not been excluded.

One possible UI compatibility gap: inspection of the installed Desktop bundle found that its hasConfiguredModelCatalog helper only checks for a nonempty model_catalog_json; it does not check the provider's model_catalog_url. The bundle also has custom-provider filtering branches, so this observation alone does not establish the root cause.

Related reports: #50282 (custom-provider discovery regression), #34487 and #37379 (Desktop picker hides models despite catalog availability). This report specifically supplies a remote-URL case on the versions above, with successful model listing from the Desktop executable. Please consolidate if this shares an existing root cause.

aziphale avatar Oct 17 '26 15:10 aziphale

Verified workaround / remote-vs-local catalog comparison

A follow-up test restores the Desktop model picker using a local snapshot of the same catalog:

  1. Run debug models with the exact Desktop engine executable (0.163.0-alpha.10.2) and save its valid JSON output as a local UTF-8 file. No model entries were edited.
  2. Set top-level model_catalog_json to that file. Leave the provider configuration, authentication, and existing model_catalog_url unchanged.
  3. Fully exit and reopen Codex Desktop.

Result: the picker now shows selectable GPT, DeepSeek, Gemini, and Grok entries, rather than an empty menu. With model_catalog_url alone, the picker was empty.

For comparison, a fresh process using the Desktop executable returned 16 entries through model/list, with 9 entries marked hidden: false. The running Desktop application also logged successful model/list responses (errorCode=null), although those logs did not expose the response payload. Its local app-server process had started after the configuration was last modified, so a process predating the edit did not explain the symptom.

This verifies a local-file workaround and narrows the discrepancy to Desktop integration/initialization of remote catalogs versus local catalogs. It does not establish the precise internal root cause. The local file is only a static snapshot and must be refreshed when the provider catalog changes.

aziphale avatar Oct 17 '26 16:10 aziphale

+1, reproduced on macOS arm64 too, so this isn't Windows-only and is still present in a newer build.

Versions

  • ChatGPT desktop 26.1023.51421, bundled codex 0.165.0-alpha.1.2 (requests client_version=0.165.0)
  • Custom Responses provider with env_key auth (no ChatGPT sign-in)

A/B results (full quit and reopen of the app between runs; the provider block is otherwise unchanged)

Config Desktop picker
No catalog setting ✅ bundled models
model_catalog_url → gateway serving the upstream rust-v0.165.0 models.json unmodified (527 KB) ❌ empty, composer chip shows "Custom"
Same, base_url left on the production gateway (only the model_catalog_url line added) ❌ empty
Top-level model_catalog_json → local file with the same catalog plus extra entries ✅ all models shown and selectable; a turn on an extra model succeeds

Server side looks fine in the failing case:

  • The app's app-server does fetch GET <catalog>?client_version=0.165.0 (HTTP 200).
  • Running codex app-server with the app's exact model/list params (includeHidden: true, cursor: null, limit: 100, client name "Codex Desktop") returns a response identical to the no-catalog baseline, in ~0.1 s.
  • In ~/Library/Logs/com.openai.codex, the app logs model/list as routed with errorCode=null in both runs.

So the app-server returns the right list and the desktop UI drops it. The model_catalog_json workaround from the comment above works on macOS as well.

michaelaw320 avatar Oct 28 '26 15:10 michaelaw320

Found the cause. It's in codex-rs, not the desktop UI, and it only hits providers that authenticate with an API key (env_key).

Setup: ChatGPT desktop 26.1111.21308 on macOS arm64, bundled codex 0.169.0-alpha.11.1, and a custom Responses provider with model_catalog_url.

What happens

  1. At startup the desktop app sends experimentalFeature/enablement/set with "api_key_model_discovery": false, among other flags. It's set over RPC at runtime, so it never appears in config.toml. That's why "features.api_key_model_discovery is unset" in the original report doesn't rule it out.
  2. From then on, model/list returns {"data": [], "nextCursor": null} for that provider, even though the app-server has just fetched the catalog successfully (HTTP 200, 15 valid entries). The UI then has no models: the picker is empty and the composer chip falls back to "Custom".

I recorded the desktop's stdio JSON-RPC traffic by pointing CODEX_CLI_PATH at a wrapper, then replayed it against the bundled binary:

  • Replaying the desktop's startup requests reproduces the empty list. Leaving out only experimentalFeature/enablement/set brings the models back.
  • A minimal session of initialize, then experimentalFeature/enablement/set {"api_key_model_discovery": false}, then model/list reproduces it on its own:
Provider config flag not set api_key_model_discovery: false
no catalog (bundled list) 12 models 12 models
model_catalog_json (local file) 15 15
model_catalog_url + env_key 15 0
model_catalog_url + [model_providers.X.auth] command 15 15

Why (codex-rs/models-manager/src/manager.rs at rust-v0.169.0-alpha.11)

  • A provider with model_catalog_url gets with_provider_catalog(): CatalogSource::ExplicitProvider, the bundled seed cleared, and fallback_models() returns None.
  • api_key_discovery_disabled() is true for API-key auth without command auth when api_key_model_discovery is off.
  • In that state models_for_entry() returns fallback_models().unwrap_or_default(), an empty list for an explicit provider catalog, and load_catalog() returns early.

So the desktop's own default (api_key_model_discovery: false) turns an explicitly configured model_catalog_url into an empty catalog. An explicit model_catalog_url is configuration, not API-key discovery, so it probably shouldn't be gated on that flag. At minimum it shouldn't silently produce an empty list.

#50282 (custom provider catalog disappears after a desktop update, chats show "Custom") looks like the same cause on an earlier version.

Workaround until it's fixed: authenticate the provider with [model_providers.X.auth] (a command) instead of env_key. With that change alone, the same desktop app lists the full catalog from model_catalog_url, custom models included.

michaelaw320 avatar Nov 18 '26 15:11 michaelaw320