Problem
Newly released upstream models are not picked up automatically while the proxy is running. They only appear after a manual ocx sync (or a proxy restart, since ocx start auto-syncs).
Example: OpenAI added a new native model upstream (visible via GET /backend-api/codex/models for my account), but the running proxy kept serving the older catalog. The new model was absent from /v1/models and from ~/.codex/opencodex-catalog.json until I ran ocx sync by hand.
Why this matters
- Discovering that a model is "missing" currently requires noticing it elsewhere and then remembering to run
ocx sync.
- The Codex Desktop model picker additionally keeps its own cached
model/list, so even after a manual sync the desktop app can keep showing the stale list until app-server processes restart. This makes the whole flow feel manual and error-prone.
Proposed behavior
Add an opt-in (or default-on) periodic catalog refresh so the running proxy re-discovers provider models on an interval and updates the served catalog without a manual ocx sync. Concretely:
- A configurable interval (e.g.
catalogRefreshIntervalMinutes, default maybe 30-60 min, 0 = off) that triggers the same code path as ocx sync for model discovery + catalog write.
- On successful refresh, if the served model set changed, also refresh the Codex-side catalog/cache the same way
ocx sync does today (respecting the existing "external provider owns config.toml" guard).
- Ideally surface "N new model(s) discovered" in the request log / dashboard so users can see when the catalog changed.
- Optional: a
--restart-codex-style hook (or an in-band signal) so the Codex Desktop app-server drops its cached model/list after a catalog change, without requiring the user to restart the desktop app manually.
Alternatives considered
- Manual
ocx sync (current behavior) — works but easy to forget.
- A user-side cron/launchd job calling
ocx sync — works around it, but is per-machine setup that the tool could reasonably own.
Environment
- opencodex 2.41.0 (npm @bitkyc08/opencodex)
- macOS (arm64), Codex CLI 0.153.2
Problem
Newly released upstream models are not picked up automatically while the proxy is running. They only appear after a manual
ocx sync(or a proxy restart, sinceocx startauto-syncs).Example: OpenAI added a new native model upstream (visible via
GET /backend-api/codex/modelsfor my account), but the running proxy kept serving the older catalog. The new model was absent from/v1/modelsand from~/.codex/opencodex-catalog.jsonuntil I ranocx syncby hand.Why this matters
ocx sync.model/list, so even after a manual sync the desktop app can keep showing the stale list until app-server processes restart. This makes the whole flow feel manual and error-prone.Proposed behavior
Add an opt-in (or default-on) periodic catalog refresh so the running proxy re-discovers provider models on an interval and updates the served catalog without a manual
ocx sync. Concretely:catalogRefreshIntervalMinutes, default maybe 30-60 min,0= off) that triggers the same code path asocx syncfor model discovery + catalog write.ocx syncdoes today (respecting the existing "external provider owns config.toml" guard).--restart-codex-style hook (or an in-band signal) so the Codex Desktop app-server drops its cachedmodel/listafter a catalog change, without requiring the user to restart the desktop app manually.Alternatives considered
ocx sync(current behavior) — works but easy to forget.ocx sync— works around it, but is per-machine setup that the tool could reasonably own.Environment