Skip to content

[Bug]: ChatGPT model discovery depends on npm and can hide newer models #201480

Closed

Description

@daniel-lxs

ChatGPT users can miss newer models when npm is blocked or unreachable.
If the npm version lookup fails, discovery falls back to the bundled
Codex version, which can be below a newer model's minimum client version.

Discovery also makes an extra npm request on a cache miss. Successful
lookups are cached for six hours, so this does not happen on every listing.

Proposed fix

Use the same OpenClaw version we already send on Responses requests.
Accept calendar versions with a four-digit year of 2026 or later,
including versioned prereleases and build suffixes. Use 99.0.0 when
the version is unavailable or invalid, including 0.0.0, bare labels
and Codex-style versions.

Remove the npm lookup without changing Responses headers or Codex
binary selection.

Verification

The version-selection regression fails before the fix and passes after.
It includes 2027 and invalid-version cases. Related discovery, routing
and version-contract tests pass.

Activity

  1. added
    bug
    on Nov 18, 2026
  2. added
    clawsweeper:intake:bug
    clawsweeper:intake:needs-environment
    clawsweeper:intake:needs-repro
    P2
    clawsweeper:needs-maintainer-review
    clawsweeper:needs-product-decision
    clawsweeper:no-new-fix-pr
    clawsweeper:source-repro
    impact:auth-provider
    issue-rating: 🦞 diamond lobster
    and removed
    clawsweeper:intake:bug
    clawsweeper:intake:needs-environment
    clawsweeper:intake:needs-repro
    on Nov 18, 2026
  3. clawsweeper commented on Nov 18, 2026

    @clawsweeper
    Contributor

    Codex review: this still needs some work.

    Summary
    Keep open: current source confirms that npm failure can hide newer subscription models, but replacing the published-Codex version with a calendar version changes an explicitly accepted discovery policy.

    Reproducibility: Current source deterministically sends client_version=0.169.0 after npm failure, and existing contract coverage establishes omission above that version; this review ran no tests or live account reproduction.

    Maintainer decision needed

    • Question: Should ChatGPT discovery replace its real published-Codex version ceiling with OpenClaw’s calendar version and a 99.0.0 fallback?
    • Recommendation: Approve independent discovery versioning: Remove the npm dependency after validating the proposed version values against a real account, and preserve existing execution compatibility diagnostics.
    • Why: The outage mechanism is established, but the proposed replacement deliberately reverses the policy documented in the merged discovery work and current repository instructions.

    Next step
    Decide the discovery-version policy, then establish a failing catalog regression where npm is unavailable and an account model requires a version above the bundled pin.

    Review details

    Best possible solution:

    Provide npm-independent model discovery under an explicitly approved visibility policy, with actionable errors when the selected harness cannot execute a listed model.

    Do we have a high-confidence way to reproduce the issue?

    Current source deterministically sends client_version=0.169.0 after npm failure, and existing contract coverage establishes omission above that version; this review ran no tests or live account reproduction.

    Is this the best way to solve the issue?

    Removing the registry dependency addresses the reported failure directly, but the exact calendar-version and sentinel rules need approval and account-level validation before they replace the published-version policy.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • Calendar versions and 99.0.0 would expose models beyond the real published-Codex ceiling intentionally retained by the merged implementation.
    • The issue claims passing regression tests without attaching their code or output; no current-main live npm-outage reproduction was performed in this read-only review.

    Codex review notes: model internal, reasoning medium; reviewed against 8e08f83454cf.

    Label changes

    Label changes:

    • add clawsweeper:fix-shape-clear: Current issue advisory state selects this label.

    Label justifications:

    • P2: Registry failure can omit newer subscription models while older models remain available; the report does not establish a blocked first useful run.
    • impact:auth-provider: The affected boundary controls authenticated provider discovery and available model choices.
    Evidence reviewed

    Acceptance criteria:

    • pnpm test extensions/openai/openai-codex-discovery.test.ts extensions/openai/base-url.test.ts extensions/openai/openai-provider.test.ts extensions/openai/openai-provider.codex-catalog.test.ts
    • pnpm test extensions/openai/platform-access-programs.test.ts extensions/openai/openai-api-key-catalog.test.ts test/openai-model-discovery-auth-order.test.ts
    • pnpm test src/plugins/contracts/provider-live-listing.contract.test.ts test/scripts/codex-client-version-contract.test.ts
    • node scripts/check-changed.mjs
    • git diff --check

    What I checked:

    Likely related people:

    • Ayaan Zaidi: Raw commit 1680f54 adds extensions/openai/codex-client-version.ts:3 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1680f5450480; files: extensions/openai/codex-client-version.ts)
    • Peter Steinberger: Raw commit c9f03ee adds extensions/openai/codex-client-version.ts:10 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: c9f03ee9798c; files: extensions/openai/codex-client-version.ts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

    Reviewed November 18, 2026, 5:27 PM ET / 22:27 UTC.

  4. added
    clawsweeper:fix-shape-clear
    on Nov 18, 2026
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

    P2bugclawsweeper:fix-shape-clearclawsweeper:needs-maintainer-reviewclawsweeper:needs-product-decisionclawsweeper:no-new-fix-prclawsweeper:source-reproimpact:auth-providerissue-rating: 🦞 diamond lobster

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions