Repository navigation
fix(openai): ChatGPT-login picker lists models the bundled Codex rejects - #167633
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesChatGPT-login model discovery reports the bundled Codex version instead of fetching npm’s latest version. Example: The user refreshes models with ChatGPT login
Review scores
ProductKind: Preference · Worth it: Yes 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 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe 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]
Technical reviewBest 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
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -109, Tests -122. Total -231 across 8 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 9, 2026, 1:43 AM ET / 05:43 UTC. |
|
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. |
…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]>
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/codexversion. With ChatGPT login andagentRuntimeunset/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()incodex-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 reports99.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
git revertof 41a8839; the bundled pin is still0.160.0, so the restored constant matches and the contract test passes.openai-provider,openai-codex-discovery,openai-model-discovery-auth-orderandcodex-client-version-contracttests 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.