Skip to content

[Feature]: Periodic auto-refresh of provider model catalog (pick up newly released models without manual 'ocx sync') #3630

Description

@doublewater777

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:

  1. 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.
  2. 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).
  3. Ideally surface "N new model(s) discovered" in the request log / dashboard so users can see when the catalog changed.
  4. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    catalogModel catalog, slugs, visibility, routed entriescliCLI, config inject, packaging flagsenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions