Skip to content

fix(chat): retain unlisted reported Codex models - #32068

Merged
nwparker merged 1 commit into
mainfrom
nwparker/codex-unlisted-chat-model
Oct 23, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/codex-unlisted-chat-model

Conversation

@nwparker

@nwparker nwparker commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​100 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​100
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​14 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​10

ELI5

When terminal-backed Codex Chat reports a model newer than Orca's bundled list, the composer now shows that model. Previously a first gpt-6.1-sol report left only “Model”; switching from a listed model could leave the old model displayed. The same repair applies to desktop and mobile.

Before / after (Codex status-report strings)

Codex reports Before After
gpt-6.1-sol (newer than seed) nothing, pill says "Model" gpt-6.1-sol
gpt-5.5-pro mislabeled as GPT-5.5 gpt-5.5-pro
gpt-5.2-codex-mini mislabeled as GPT-5.2 Codex gpt-5.2-codex-mini
ollama/qwen3:32b (custom provider) nothing ollama/qwen3:32b
gpt-5.5, GPT-5.5, GPT-5.6 Sol GPT-5.5 / GPT-5.6 Sol unchanged
blank, or text with spaces nothing unchanged

What Changed

The shared matcher gains an opt-in for unlisted selectors, used only by Codex's desktop and mobile status-report callers. Exact known IDs and labels still canonicalize; an unlisted single-token selector keeps its exact spelling before fuzzy containment can mistake it for an older model. Other callers retain their existing matching policy.

Existing tracked-row reconciliation supplies the current label. Reconnect guards and Codex's own /model picker remain in place. An unknown model gains no inferred reasoning-effort choices or default effort value.

Why

Both surfaces discarded an authoritative current-model report solely because it was absent from a fallback catalog. Reusing the matcher and tracked-row reconciliation fixes that shared boundary without expanding the static seed on each model release.

Linked Issue

Refs #25951, including the iOS report consolidated from #26075. This addresses the current-model label slice. Live catalog discovery/picker membership (#30077), worker validation (#25006), and displaying actually observed effort remain separate; no full issue closure is claimed.

Visual Proof

Real hidden Electron dev app on macOS, in a disposable folder project with shell PTYs and a seeded idle Codex status reporting gpt-6.1-sol. The original matcher and fixed matcher were exercised in the same app. Full-window screenshots were inspected directly; the fixed picker was opened and offered “Choose in agent picker…” with no inferred effort controls.

Original matcher Fixed matcher
Composer only shows Model Composer names gpt-6.1-sol

This is rendered integration proof with synthetic status data, not a live Codex/custom-provider/account test. Windows/Linux/SSH and mobile-device rendering were not run. No test windows were revealed or focused. Screenshots reviewed by the primary agent; no delegated visual review.

Testing

  • Manually inspected the hidden desktop renderer and opened the real picker.
  • Added automated regressions: first unlisted report and listed-to-unlisted switch on both desktop and mobile, repeated report after a gap, retained picker action, and no invented effort controls.
  • Original matcher: both desktop regressions fail (8 existing controls pass); both mobile regressions fail (21 existing controls pass).
  • Fixed: 102 desktop/shared tests in five files and 29 mobile tests in three files pass. Matcher controls additionally cover unknown suffix IDs, case-preserved custom selectors, known labels, whitespace rejection and opt-in scope.
  • Renderer typecheck: 15,575 files, passed. Mobile app typecheck passed.
  • Changed-code quality, formatting and diff checks pass. Normal commit hooks ran.
  • The dev launch rebuilt main/preload. Full release packaging and the full repository test suite were not run.

Independent review pass (2026-10-22)

  • Reproduced the bug against main's matcher: both new desktop regressions and both new mobile regressions fail (8 / 21 existing tests still pass). With this branch: 47/47 shared+desktop tests (native-chat-session-option-state, use-native-chat-session-options, native-chat-session-option-commands) and 23/23 mobile hook tests pass.
  • Ran a throwaway comparison of the old vs new matcher on the real Codex seed catalog; results are the table above.
  • Confirmed the Codex hook stamps the raw Codex model slug (codex-events.ts), so the reported string is the exact selector, not free text.
  • oxlint and oxfmt clean on changed files. No cross-host run: this is pure renderer/mobile string logic with no platform, path, or wire change.

Review

No protocol/schema, credential, shell/process, path, shortcut or layout change. Incoming reports remain host-produced; existing report replay protection stays in place. The matcher adds constant work per report and no requests, polling, effects or subscriptions. Shared tests plus both real hooks cover desktop/mobile logic; remote peers need no new capability or wire field.

Risks / tradeoffs

  • A Codex model whose id merely contains a seeded id (e.g. gpt-5.5-pro) used to borrow that seed's effort control; it now shows its true name with no inline effort control. That control only typed /model anyway, and the model pill still opens Codex's own /model picker, where effort is chosen.
  • Only Codex opts in; Claude, OMP and other agents keep their current matching.

Related

Agent skill upstream boundary

  • No upstream skill-installer content was copied or translated.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a5017af5-8e0e-4842-8c05-9395318b14b0
📥 Commits

Reviewing files that changed from the base of the PR and between 9613563 and 7164687.

📒 Files selected for processing: 6
  • mobile/src/session/use-mobile-native-chat-session-options.test.ts
  • mobile/src/session/use-mobile-native-chat-session-options.ts
  • src/renderer/src/components/native-chat/use-native-chat-session-options.test.ts
  • src/renderer/src/components/native-chat/use-native-chat-session-options.ts
  • src/shared/native-chat-session-option-state.test.ts
  • src/shared/native-chat-session-option-state.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

📝 Walkthrough

The shared model matcher now accepts an option to retain unlisted, single-token model reports. The renderer and mobile session hooks enable this option for Codex; other agents keep the default matching behavior. Tests cover matcher results and Codex model choices, snapshot preservation, and /model actions.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 71646

Unlisted reported Codex models remain selectable on desktop and mobile. No issue identified here prevents merging after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: retaining unlisted reported Codex models.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description is complete and relevant. It includes the ELI5 summary, user-facing behavior, implementation details, rationale, linked issue references, visual proof, testing results, scope boundarie…
Full details: Description check

Explanation

The description is complete and relevant. It includes the ELI5 summary, user-facing behavior, implementation details, rationale, linked issue references, visual proof, testing results, scope boundaries, risks, and platform limitations. The issue reference uses “Refs” instead of the template’s “Fixes #” format, and the AI Disclosure, Notes, and Checklist headings are not included, but the required technical context is otherwise present.

✨ Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nwparker
nwparker merged commit 722bb24 into main Oct 23, 2026
62 of 64 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant