Support custom provider in app

Resolved 💬 4 comments Opened Mar 21, 2026 by popperwin Closed May 10, 2026

Summary

When using a custom model_provider (defined in ~/.codex/config.toml), there is no way to change the model associated with a session from the Codex Desktop app UI. The model dropdown either shows nothing useful or appears to mirror config.toml, but the actual value used at runtime is read from the model column in ~/.codex/state_5.sqlite (threads table).

For built-in providers, the GUI offers a model picker with known model IDs. For custom providers, the model field in the DB is persisted as empty string or whatever was set at session creation, and there is no UI affordance to edit it.

Reproduction

  1. Configure a custom provider in ~/.codex/config.toml.
  2. Use Codex Desktop with this provider. The model cannot be changed from the UI for sessions using the custom provider.

Expected behavior

The GUI should expose a free-text or editable model field for custom providers (since the available models are not known to the app). When the user sets a model, the value should be written to state_5.sqlite (threads.model) for that session.

Current behavior

The model is silently persisted (or left empty) in state_5.sqlite at session creation time. The GUI gives the impression the config is sourced from config.toml, but at runtime it reads from the DB. For custom providers, there is zero UI path to set or change the model. The only option is direct SQLite manipulation.

Related issues

  • #14540 (model choice not restored on session resume)
  • #15219 (model_provider not restored from persisted session metadata)
  • #13676 (per-session model identity lost after app restart)
  • #14133 (Desktop GUI sessions ignore config.toml)

Environment

  • Codex Desktop (macOS, Electron)
  • CLI version: 0.115+
  • Custom providers via config.toml [model_providers.*]

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗