fix(server): drop non-interactive Codex models from the model picker#4487
fix(server): drop non-interactive Codex models from the model picker#4487colonelpanic8 wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
ApprovabilityVerdict: Approved Straightforward bug fix that filters out a broken model ('codex-auto-review') from the model picker. The change is small, well-documented, and includes comprehensive tests covering the filtering behavior. You can customize Macroscope's approvability policy. Learn more. |
`model/list` exposes a `hidden` flag that the provider dropped on the floor, and codex-cli 0.145.0 additionally reports `codex-auto-review` (the automatic approval-review model) with `hidden: false` and the display name of another catalog entry, so the picker renders two identical "GPT-5.6-Luna" rows. Threads started on the auto-review model cannot execute anything: every tool call fails locally with "unsupported custom tool call" and every follow-up turn is rejected with a 400 for an unknown `namespace` input parameter. Honor `hidden` and skip known non-interactive Codex slugs when parsing the catalog. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
11c647c to
6b75ff3
Compare
…he model picker)
What Changed
parseCodexModelListResponsenow filters the Codexmodel/listcatalog beforebuilding picker entries:
hidden: trueare dropped (the flag waspreviously read off the schema and discarded)
(currently just
codex-auto-review)Why
codex-cli 0.145.0 returns
codex-auto-review— Codex's internal "Automaticapproval review model" — in the ordinary catalog, with
hidden: falseandthe display name of a different entry. Probing the app server directly:
So the picker shows two identical
GPT-5.6-Lunarows and one of them silentlyroutes to a model that cannot do any work. A thread started on it fails in two
stages:
Every tool call is rejected locally. The model emits a code-mode
custom_tool_call(name: "exec",namespace: "exec") and codex answerscustom_tool_call_output: "unsupported custom tool call: execexec". No toolrow ever renders — the model just narrates that "the shell tool is currently
failing on invocation" and gives up.
Every subsequent turn dies before it starts, because the retained call items
carry
namespace, which is not a valid Responses API input field:That surfaces as
thread/status/changed → systemErrorabout half a secondafter each send, and the thread is unrecoverable since the offending item is
permanently in history.
Filtering the catalog is the narrow fix: honoring
hiddenis simply respectinga field the protocol already provides, and the slug list covers the case where
Codex itself mislabels an internal model as selectable. There is precedent for
both shapes in the tree —
OpenCodeProviderfiltersagent.hidden, andopencodeRuntimekeeps aKNOWN_HIDDEN_AGENTSset for entries the CLI does notflag.
UI Changes
No visual changes. The only user-visible effect is that the duplicate
GPT-5.6-Lunarow disappears from the Codex model picker; the remaining rowsand their ordering are unchanged.
Checklist
Validation (scoped per
AGENTS.md, which asks that repo-wide suites be left to CI):The three new tests were confirmed to fail against the unfiltered parser.
Note
Low Risk
Narrow catalog filtering at model-list parse time with targeted tests; no auth, session runtime, or UI layout changes beyond removing invalid picker rows.
Overview
Filters Codex
model/listentries before they become picker rows inparseCodexModelListResponse.Catalog items with
hidden: trueare no longer mapped intoServerProviderModelentries. Slugs inNON_INTERACTIVE_CODEX_MODEL_SLUGS(starting withcodex-auto-review) are excluded even when the app server leaves them visible—addressing duplicate labels (e.g. two “GPT-5.6-Luna” rows) and sessions that break on tool calls and follow-up turns.parseCodexModelListResponseis exported for unit tests; new cases cover normal catalog passthrough, hidden drops, and thecodex-auto-reviewduplicate scenario.Reviewed by Cursor Bugbot for commit 6b75ff3. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Drop non-interactive Codex models from the model picker
Filters out models that should not appear in the interactive model picker by updating
parseCodexModelListResponsein CodexProvider.ts. Models marked as hidden or whose slug appears inNON_INTERACTIVE_CODEX_MODEL_SLUGS(initiallycodex-auto-review) are excluded. The function is also now exported to support direct testing.Macroscope summarized 6b75ff3.