Skip to content

fix(openai): ChatGPT-login picker lists models the bundled Codex rejects - #167633

Merged
obviyus merged 2 commits into
mainfrom
revert/codex-latest-client-version
Oct 9, 2026
Merged

obviyus merged 2 commits into
mainfrom
revert/codex-latest-client-version

Conversation

@obviyus

@obviyus obviyus commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Reverts #167387.

What Problem This Solves

Fixes: with ChatGPT login, the model picker can list a model that then fails with HTTP 400 on the default runtime, when npm's newest Codex is ahead of OpenClaw's bundled Codex.

User Impact

User impact: ChatGPT-login model discovery again reports the bundled Codex version (0.160.0), so it lists only models the bundled Codex can run. New ChatGPT models appear when the bundled Codex pin moves, as before #167387.

Why This Change Was Made

#167387 made discovery report npm's latest stable @openai/codex version. With ChatGPT login and agentRuntime unset/auto, turns on the official ChatGPT endpoint run on the Codex harness with the bundled, pinned binary (docs/providers/openai/runtimes.md). That binary reports its own version on each turn, and the backend gates models on it. So a model whose minimum Codex version is above the pin is listed but rejected. This is the 2026.9.8 GPT-6.1 failure (bundled 0.158.0, model needs ≥ 0.159.2) for the next gated model. Codex's own discovery also reports the real package version (client_version_to_whole() in codex-rs/models-manager).

This restores the alignment contract from #113615 (discovery version = bundled Codex version, guarded by test/scripts/codex-client-version-contract.test.ts). Hermes reports 99.0.0, but its default ChatGPT runtime talks to the backend directly and its Codex app-server mode is opt-in with a user-managed binary, so the same trade does not fit OpenClaw's default.

No failing model was observed: all currently listed ChatGPT models need Codex ≤ 0.155. This removes a reachable failure, not a reported one.

Evidence

  • Clean git revert of 41a8839; the bundled pin is still 0.160.0, so the restored constant matches and the contract test passes.
  • openai-provider, openai-codex-discovery, openai-model-discovery-auth-order and codex-client-version-contract tests pass.

Merge danger: two-way door. No stored state, config or schema. Blast radius: ChatGPT-login model discovery; models gated above the bundled Codex version stop appearing until the pin moves.

@clawsweeper

clawsweeper Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 9, 2026
@clawsweeper

clawsweeper Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

ChatGPT-login model discovery reports the bundled Codex version instead of fetching npm’s latest version.

Example: The user refreshes models with ChatGPT login

  • Before: Discovery can report npm’s 0.161.0 while the bundled runtime remains 0.160.0.
  • After: Discovery reports client_version=0.160.0, matching the bundled runtime.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-supported simplification with no actionable patch defect, but only synthetic proof of the changed discovery path.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Preference · Worth it: Yes
User problem: A newly listed ChatGPT model could fail on its first turn because the bundled Codex runtime is older than the version advertised during discovery.
Reason: The previous policy intentionally preferred model visibility despite possible incompatibility, so this is a compatibility-policy reversal rather than a demonstrated current bug. The contributor connected to that prior policy supplies an explicit revised rationale, and the change substantially simplifies its implementation.

Merge readiness

✅ Ready for maintainer review

This PR is a coherent, explained reversal of the recent discovery policy, and current main still advertises npm’s newer Codex version. No concrete introduced defect was found.

Priority: P2
Reviewed head: ebfc89ac55d541e9fc73622a8086ef27f21600d5

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: An after-fix real ChatGPT-login catalog refresh is missing; no base-failing inference regression is established because no currently affected model was observed.
Agent review details

How this fits together

The OpenAI plugin retrieves the signed-in account’s model catalog for OpenClaw’s model pickers. The advertised Codex version influences which models the ChatGPT backend returns.

flowchart LR
 A[ChatGPT login] --> B[OpenAI model discovery]
 C[Bundled Codex version] --> B
 B --> D[ChatGPT account catalog]
 D --> E[Selectable models]
 E --> F[Codex runtime]
Loading

Technical review

Best possible solution:

Keep discovery aligned with the bundled default runtime using the existing provider owner and cross-plugin version contract.

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

No: source establishes that discovery and execution can advertise different versions, but the author explicitly reports no currently listed model that fails because of this mismatch.

Is this the best way to solve the issue?

Yes for the bundled default runtime: restoring the synchronized discovery version is a narrow solution, and the prior area contributor explains why the earlier visibility tradeoff should change.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 687e6e9d1a8a.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source -109, Tests -122. Total -231 across 8 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 7 116 -109
Tests 5 15 137 -122
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 22 253 -231

Labels

Label changes:

  • add P2: This is a bounded model-discovery compatibility improvement without an observed urgent failure on current main.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: This is a bounded model-discovery compatibility improvement without an observed urgent failure on current main.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

Reviewed October 9, 2026, 1:43 AM ET / 05:43 UTC.

@obviyus
obviyus merged commit 629593b into main Oct 9, 2026
107 checks passed
@obviyus
obviyus deleted the revert/codex-latest-client-version branch October 9, 2026 05:50
@obviyus

obviyus commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator Author

Landed in 629593b. ChatGPT-login discovery again reports the bundled Codex version, so the picker only lists models the default (Codex harness) runtime accepts. New ChatGPT models appear when the bundled Codex pin moves.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 10, 2026
…cts (openclaw#167633)

Reverts openclaw#167387.

## What Problem This Solves

Fixes: with ChatGPT login, the model picker can list a model that then fails with HTTP 400 on the default runtime, when npm's newest Codex is ahead of OpenClaw's bundled Codex.

## User Impact

User impact: ChatGPT-login model discovery again reports the bundled Codex version (`0.160.0`), so it lists only models the bundled Codex can run. New ChatGPT models appear when the bundled Codex pin moves, as before openclaw#167387.

## Why This Change Was Made

openclaw#167387 made discovery report npm's latest stable `@openai/codex` version. With ChatGPT login and `agentRuntime` unset/`auto`, turns on the official ChatGPT endpoint run on the Codex harness with the bundled, pinned binary (`docs/providers/openai/runtimes.md`). That binary reports its own version on each turn, and the backend gates models on it. So a model whose minimum Codex version is above the pin is listed but rejected. This is the 2026.9.8 GPT-6.1 failure (bundled 0.158.0, model needs ≥ 0.159.2) for the next gated model. Codex's own discovery also reports the real package version (`client_version_to_whole()` in `codex-rs/models-manager`).

This restores the alignment contract from openclaw#113615 (discovery version = bundled Codex version, guarded by `test/scripts/codex-client-version-contract.test.ts`). Hermes reports `99.0.0`, but its default ChatGPT runtime talks to the backend directly and its Codex app-server mode is opt-in with a user-managed binary, so the same trade does not fit OpenClaw's default.

No failing model was observed: all currently listed ChatGPT models need Codex ≤ 0.155. This removes a reachable failure, not a reported one.

## Evidence

- Clean `git revert` of 5859153; the bundled pin is still `0.160.0`, so the restored constant matches and the contract test passes.
- `openai-provider`, `openai-codex-discovery`, `openai-model-discovery-auth-order` and `codex-client-version-contract` tests pass.

**Merge danger:** two-way door. No stored state, config or schema. Blast radius: ChatGPT-login model discovery; models gated above the bundled Codex version stop appearing until the pin moves.

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: openai P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant