Connecting Ollama in Codex App writes top-level model_provider + model_catalog_json, hiding OpenAI models and causing 404s for gpt-5.5
What version of Codex is running?
codex-cli 0.142.5 / Codex App 26.623.81905 (macOS)
What issue are you seeing?
Connecting the Codex desktop app to Ollama persists top-level keys into ~/.codex/config.toml:
model_provider = "ollama-launch-codex-app"
model_catalog_json = "/Users/ummi/.codex/ollama-launch-models.json"
These globally hijack every subsequent Codex session (CLI and app), not just the Ollama one:
- OpenAI models disappear from the model picker. When
model_catalog_jsonis set,load_model_catalog(codex-rs/core/src/config/mod.rs) replaces the catalog, and the TUI picker (codex-rs/tui/src/chatwidget/model_popups.rs,try_list_models()) lists only catalog entries — so only Ollama models are selectable and gpt-5.5/gpt-5.4 etc. vanish. - 404s against localhost.
model = "gpt-5.5"is still set while the default provider is now Ollama, so requests go tohttp://127.0.0.1:11434/v1/responsesand fail with404 model 'gpt-5.5' not found. This appears to be the root cause behind #30647 / #29703 / #29848, and is related to the picker filtering in #19694.
Notably the app also writes a correct scoped [profiles.ollama-launch] with model_provider = "ollama-launch" — the top-level writes are redundant with it and are what causes the breakage.
What steps can reproduce the bug?
- Have a working OpenAI-authenticated Codex setup.
- In the Codex app, connect to Ollama (launch/connect local models flow).
- Inspect
~/.codex/config.toml: top-levelmodel_providerandmodel_catalog_jsonnow point at Ollama. - Start a new Codex session: the model picker no longer shows OpenAI models; selecting/keeping gpt-5.5 yields
404 Not Found: model 'gpt-5.5' not foundfrom127.0.0.1:11434.
What is the expected behavior?
Connecting a local provider should be additive, not a global takeover:
- The Ollama flow should scope its settings to the profile it already creates (
[profiles.ollama-launch]) instead of writing top-levelmodel_provider/model_catalog_json. - Alternatively (or additionally), when
model_catalog_jsonis set, the picker should merge the custom catalog with the built-in OpenAI presets (or scope the catalog to its provider) rather than replacing them, so users can switch back without hand-editing config.toml. - If the default provider is switched,
modelshould be remapped to a model that exists on that provider rather than left pointing at gpt-5.5.
Workaround
Delete the two top-level lines (model_provider = "ollama-launch-codex-app", model_catalog_json = ...) from ~/.codex/config.toml; the Ollama profile keeps working via codex --profile ollama-launch.
Additional information
Happy to submit a PR for the merge-instead-of-replace behavior in the catalog/picker path if maintainers agree with the direction.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗