Skip to content

fix(cf-ux): default the codex pilot to a model accounts still have - #239

Open
vasylcf wants to merge 2 commits into
mainfrom
fix/codex-default-model
Open

vasylcf wants to merge 2 commits into
mainfrom
fix/codex-default-model

Conversation

@vasylcf

@vasylcf vasylcf commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Problem

gpt-5.4-mini has been withdrawn. Every codex case in the prompt pilot errors out:

ERROR: {"status":400,"message":"The 'gpt-5.4-mini' model is not supported
when using Codex with a ChatGPT account."}

From a clean clone that is 8 of 16 cases red, for a reason that has nothing to do with the skill under test — and the failure surfaces as a truncated JSON blob inside a promptfoo table cell, so it reads like a harness bug rather than a stale constant.

Change

Default CF_UX_CODEX_MODEL to gpt-5.6-sol, the cheapest slug codex currently reports for this account type. The full entitled set today: gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-6-astra, gpt-5.5.

The comment now states the slug is dated, not permanent, and says where to re-pick from, so the next withdrawal costs a lookup rather than a debugging session. CF_UX_CODEX_MODEL is untouched and still overrides.

DEFAULT_EFFORT="low" stays valid — gpt-5.6-sol lists low among its supported reasoning levels.

Two docs naming the same dead default are corrected alongside: CONTRIBUTING.md and the header comment in promptfooconfig.yaml.

Result

Measured on this branch — make test-prompts went from 0 passed / 16 errors to 11 passed / 0 failed / 5 errors, 1m30s, $0.72.

All 8 codex cases now pass. The remaining 5 are claude-side and are genuine pilot findings, not environment: 4 × the cf skill was never invoked, 1 × cf-documenting-review was invoked directly, bypassing the cf router. Those are being handled separately.

Deliberately out of scope

skills/studio/scripts/studio/commands/agents.py maps the cf model tiers onto gpt-5.4 and gpt-5.4-mini too, so the product's own model matrix names withdrawn models. That has a spec and snapshot tests behind it and deserves its own change — flagged here, not touched.

`gpt-5.4-mini` has been withdrawn. Every codex case in the prompt pilot
errored with

    The 'gpt-5.4-mini' model is not supported when using Codex with a
    ChatGPT account.

-- eight of sixteen cases red from a clean clone, for a reason that has
nothing to do with the skill under test.

Default to `gpt-5.6-sol`, the cheapest slug `codex` currently reports,
and say in the comment that the slug is dated rather than permanent, so
the next withdrawal is re-picked instead of re-diagnosed.
`CF_UX_CODEX_MODEL` is unchanged and still overrides.

Measured after the change: 8/8 codex cases pass.

Note for a separate change: skills/studio/scripts/studio/commands/agents.py
maps the cf model tiers onto gpt-5.4 and gpt-5.4-mini as well. That is the
product's model matrix, with a spec and snapshot tests behind it, and is
deliberately left alone here.

Signed-off-by: vasylcf <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 24 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

This review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: c8878e65-6495-4472-948f-f7b1ac3f9361

📥 Commits

Reviewing files that changed from the base of the PR and between c60e51b and fe5fbce.

📒 Files selected for processing (4)
  • CONTRIBUTING.md
  • Makefile
  • tests/prompts/cf-ux/promptfooconfig.yaml
  • tests/prompts/cf-ux/providers/codex_provider.py

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

@ainetx

ainetx commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Production agent model matrix still bakes in the withdrawn gpt-5.4-mini slug for Codex/Cursor+OpenAI

Severity: Major

Problem
This PR fixes the test pilot's default Codex model in codex_provider.py after discovering gpt-5.4-mini is withdrawn and rejected by ChatGPT-account Codex sessions with the runtime error "The 'gpt-5.4-mini' model is not supported when using Codex with a ChatGPT account." However, skills/studio/scripts/studio/commands/agents.py's _MODEL_MATRIX -- the production resolver that bakes model slugs into real generated agent configs for end users (resolved via _MODEL_MATRIX.get((tool, provider)) at line 992) -- still hard-codes 'gpt-5.4-mini' as the cf:tier:cheap base model for both ('codex','openai') (line 828) and ('cursor','openai') (line 856), with additional 'gpt-5.4' override entries at lines 833-835 and 861-863. The PR's own new comment in codex_provider.py explicitly names this exact matrix and the shared risk ('a withdrawal found here is worth checking there'), showing the authors were aware of the connection, yet the matrix itself was left unfixed.

Reproduction, impact, suggested fix, verification

How to reproduce

  1. A user generates a Codex or Cursor+OpenAI agent config with tier cf:tier:cheap (or an analyze/planning override at cf:tier:cheap). 2. The generator resolves the tier via _MODEL_MATRIX to 'gpt-5.4-mini' (or 'gpt-5.4' for the override paths) and bakes it into the emitted agent config. 3. The user runs that agent through Codex CLI on a ChatGPT account. 4. Codex rejects the run with 'The [model] model is not supported when using Codex with a ChatGPT account.'

Expected behavior
The production model matrix should track the same withdrawal fact discovered and documented in this PR, resolving cf:tier:cheap (and related overrides) for codex/openai and cursor/openai to a currently-supported slug (e.g. gpt-5.6-sol or another currently-entitled cheap model), just as codex_provider.py's DEFAULT_MODEL was updated.

Actual behavior
_MODEL_MATRIX still resolves cf:tier:cheap to the withdrawn 'gpt-5.4-mini' and several overrides to 'gpt-5.4' for both codex/openai and cursor/openai, unchanged by this PR, despite the PR itself proving these slugs are rejected at runtime.

PR fixes test pilot: codex_provider.py DEFAULT_MODEL gpt-5.4-mini -> gpt-5.6-sol
|
v (same withdrawal fact, not propagated)
agents.py _MODEL_MATRIX[('codex','openai')]['base']['cf:tier:cheap'] = 'gpt-5.4-mini' (unchanged)
agents.py _MODEL_MATRIX[('cursor','openai')]['base']['cf:tier:cheap'] = 'gpt-5.4-mini' (unchanged)
|
v
End user generates cheap-tier agent config -> Codex CLI rejects model on ChatGPT account -> same outage class recurs in production

Impact
End users generating cheap-tier Codex or Cursor+OpenAI agent configs will hit a hard runtime rejection from Codex CLI, recurring the exact outage class this PR fixed in CI, but now affecting real users in production.

Suggested correction
Update _MODEL_MATRIX's cf:tier:cheap base and cf:tier:cheap overrides for ('codex','openai') and ('cursor','openai') to a currently-supported model slug, and add tracking/comment noting these two locations must be kept in sync (as codex_provider.py's new comment already flags).

How to verify
Confirm _MODEL_MATRIX no longer contains 'gpt-5.4-mini'/'gpt-5.4' for codex/openai and cursor/openai entries, and that a generated agent config for cf:tier:cheap on those tool/provider pairs runs successfully against a real ChatGPT-account Codex session.

@ainetx

ainetx commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Makefile still documents the withdrawn gpt-5.4-mini as the pilot's cheap default

Severity: Minor

Problem
This diff updated the model-default mention in CONTRIBUTING.md and promptfooconfig.yaml but missed the identical mention in Makefile:332, which still reads 'gpt-5.4-mini'.

Reproduction, impact, suggested fix, verification

How to reproduce

  1. Read Makefile lines 330-334.
  2. Compare against CONTRIBUTING.md:342 and promptfooconfig.yaml:7, both updated in this diff.
  3. Makefile still says 'gpt-5.4-mini'.

Expected behavior
All three locations describing the pilot's default cheap model should stay in sync.

Actual behavior
Makefile's comment is now inconsistent with the actual default and with the other two updated docs.

codex_provider.py DEFAULT_MODEL -> gpt-5.6-sol
CONTRIBUTING.md -> gpt-5.6-sol
promptfooconfig.yaml -> gpt-5.6-sol
Makefile -> gpt-5.4-mini (stale)

Impact
Contributors reading the Makefile get stale guidance about which model is actually used by default, and may believe (incorrectly) that gpt-5.4-mini still works.

Suggested correction
Update Makefile:332 to reference 'gpt-5.6-sol' (or a generic 'see CONTRIBUTING.md' pointer to avoid future duplication).

How to verify
Grep the repo for 'gpt-5.4-mini' after the fix and confirm no stale references remain in comments/docs.


Original location: Makefile:332 -- inline anchoring could not be resolved after 1 attempt(s).

Comment thread tests/prompts/cf-ux/providers/codex_provider.py
# SIGTERM/SIGINT, and via pid-liveness sweep on next invocation.
#
# Cheap-by-default models (Claude Haiku 4.5, gpt-5.4-mini) with low reasoning
# Cheap-by-default models (Claude Haiku 4.5, gpt-5.6-sol) with low reasoning

@ainetx ainetx Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

promptfooconfig.yaml's model-slug comment remains an unreferenced duplicate, unlike the Makefile's now-fixed equivalent

Severity: Minor

Problem
promptfooconfig.yaml line 7 hardcodes 'gpt-5.6-sol' as free-text prose, independent of codex_provider.py's DEFAULT_MODEL constant. This PR demonstrates awareness of exactly this failure mode by fixing the Makefile's identical duplication (removing the literal, explaining 'this comment is the copy that went stale last time'), but did not apply the same treatment to promptfooconfig.yaml, nor does the DEFAULT_MODEL runbook comment or CONTRIBUTING.md mention this yaml file as a location to update on re-pick.

Reproduction, impact, suggested fix, verification

How to reproduce

  1. Model gpt-5.6-sol is withdrawn in the future. 2. A maintainer follows codex_provider.py's runbook and updates DEFAULT_MODEL / CF_UX_CODEX_MODEL and CONTRIBUTING.md's table. 3. promptfooconfig.yaml:7 is not mentioned anywhere in the runbook, so it is not updated and now names a stale/withdrawn model.

Expected behavior
The yaml comment should either reference the source of truth (e.g. 'see codex_provider.py DEFAULT_MODEL') instead of duplicating the literal, or the update runbook should explicitly list this file as a location to update.

Actual behavior
The yaml comment independently duplicates the literal slug with no cross-reference, and no runbook mentions it.

codex_provider.py DEFAULT_MODEL updated on re-pick --> CONTRIBUTING.md table updated --> promptfooconfig.yaml:7 comment NOT updated (not in runbook) --> stale doc

Impact
Low-severity documentation drift; a contributor reading promptfooconfig.yaml's comment could be misled about the actual current default after a future re-pick, though the functional default lives correctly in codex_provider.py.

Suggested correction
Replace the literal slug in promptfooconfig.yaml:7 with a reference to codex_provider.py's DEFAULT_MODEL, or add this file to the re-pick runbook comment in codex_provider.py.

How to verify
After a future model re-pick, confirm promptfooconfig.yaml's comment either has no literal to go stale or was updated alongside the other two locations per an explicit runbook step.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-verified against the current code -- this write-up has been updated.

Why

Problem (was): promptfooconfig.yaml line 7 ('Cheap-by-default models (Claude Haiku 4.5, gpt-5.6-sol) with low reasoning...') restates the model slug as free-text prose, independent of codex_provider.py's DEFAULT_MODEL constant. The new remediation guidance (codex_provider.py's comment and CONTRIBUTING.md's updated row) tells a future maintainer to re-pick the model and update CF_UX_CODEX_MODEL/CONTRIBUTING.md, but never mentions this yaml comment.

Problem (now): promptfooconfig.yaml line 7 hardcodes 'gpt-5.6-sol' as free-text prose, independent of codex_provider.py's DEFAULT_MODEL constant. This PR demonstrates awareness of exactly this failure mode by fixing the Makefile's identical duplication (removing the literal, explaining 'this comment is the copy that went stale last time'), but did not apply the same treatment to promptfooconfig.yaml, nor does the DEFAULT_MODEL runbook comment or CONTRIBUTING.md mention this yaml file as a location to update on re-pick.

…stale

Review found Makefile:332 still naming gpt-5.4-mini as the pilot default,
after CONTRIBUTING.md and promptfooconfig.yaml had been updated -- the
third copy, missed exactly the way a fourth would be.

Rather than sync it, remove the slug from it: the comment's subject is
that the pilot spends real tokens on cheap models, not which ones. The
values stay next to the code that uses them.

Also note in codex_provider.py why its default is not shared with
agents.py's _MODEL_MATRIX, since the two naming the same withdrawn model
invites the conclusion that they should be one constant.

Signed-off-by: vasylcf <[email protected]>
@sonarqubecloud

Copy link
Copy Markdown

@vasylcf

vasylcf commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

Both findings verified; one taken, one answered.

Taken — Makefile:332 (Minor)

Correct, and it was the third copy of the slug. Rather than sync it, fe5fbce removes the slug from that comment: its subject is that the pilot spends real tokens on cheap models, not which ones. Fewer copies, one fewer thing to go stale.

Answered — a shared constant with agents.py (Minor)

Not doing this, and the reason is in what the two are for.

codex_provider.DEFAULT_MODEL picks the cheapest thing that can run a test. agents._MODEL_MATRIX maps a tier a user chose onto a model. One constant serving both would mean a pilot cost decision changes what users' generated agents run — a coupling that is worse than the duplication it removes.

They do go stale together, so fe5fbce says so at the definition, pointing at the other location.

Escalated, not fixed here — agents.py still emits gpt-5.4-mini (Major)

The finding is right, and it is the more serious one: generated Codex and Cursor+OpenAI configs at cf:tier:cheap name a model a ChatGPT-plan account cannot use. Measured on a real account, the entitled set is gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-6-astra, gpt-5.5gpt-5.4-mini and gpt-5.4 are both gone.

It is not fixed here because which model each tier maps to is a product decision with a spec and snapshot tests behind it (test_agents_existing_snapshot.py, test_agents_model_matrix.py pin the current values as deliberate), not something to pick while fixing a test default. Widening this PR to cover it would bury a user-facing model change inside a test-harness fix.

Flagged in the PR description before review; tracking it separately so it gets the decision it needs.

#: this one is only the cheapest of that set as of 2026-09-18 (`codex` reports
#: gpt-5.6-sol, -terra, -luna, gpt-6-astra, gpt-5.5). Its predecessor here,
#: `gpt-5.4-mini`, had been withdrawn, and every codex case in the pilot errored
#: with `The 'gpt-5.4-mini' model is not supported when using Codex with a

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No fail-fast validation of model availability

Non-blocking review challenge -- [engineering]

Rather than letting every codex-backed test case in the suite independently error out with the same 'model not supported' message when the pinned slug is withdrawn, why not have the provider validate DEFAULT_MODEL against the account's entitled set once at startup and raise a single, actionable error?

Why this is worth asking
The comment itself describes exactly this failure mode ('half the suite red for a reason that had nothing to do with the skill under test'), and the fix is purely reactive (update the slug, add a longer comment) rather than making the same class of failure cheap to diagnose next time it recurs.

Industry note
CLI/SDK wrappers commonly do an early capability/availability check (or catch the specific 'unsupported model' error and re-raise with a short, targeted message) so N parallel workers don't each surface the same root cause as N separate opaque failures.

@ainetx

ainetx commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

↩️ Replying to #239 (comment)

This concern still stands.

Why

The "pushback" is just an automated SonarCloud quality-gate bot comment (Quality Gate passed, 0 new issues) — it contains no argument or claim addressing the finding at all, vague or otherwise. It's boilerplate CI output, not a rebuttal. Separately, grep confirms gpt-5.4-mini is still present in skills/studio/scripts/studio/commands/agents.py, consistent with the finding's claim that the production _MODEL_MATRIX was left unchanged while the PR only updated the test-harness default in codex_provider.py.

@ainetx

ainetx commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

↩️ Replying to #239 (comment)

Re-verified against the current code (fe5fbce) and this is still an issue. The write-up has also been updated to reflect the current code (see the edited comment above).

Why
  • Reviewer: Confirmed by direct read of skills/studio/scripts/studio/commands/agents.py lines 826-865: _MODEL_MATRIX still hard-codes 'gpt-5.4-mini' as the cf:tier:cheap base model for both ('codex','openai') (line 828) and ('cursor','openai') (line 856), plus 'gpt-5.4' overrides at lines 833-835/861-863, entirely unchanged by this PR. The PR's own new comment in codex_provider.py (lines 16-30) explicitly names this exact matrix, quotes the literal runtime error proving gpt-5.4-mini is rejected for ChatGPT-account Codex usage, and even notes 'a withdrawal found here is worth checking there' — showing the authors were aware of the connection yet left the production-facing resolver unfixed. No plan/roadmap/deferral doc found (checked CONTRIBUTING.md's Tuning and Troubleshooting sections, which only document the test pilot's escape hatch, not a scheduled fix for the production matrix) that would excuse this as intentionally out of scope. This matches the previously accepted finding for this same PR.
  • Verifier: Confirmed by direct read of skills/studio/scripts/studio/commands/agents.py: _MODEL_MATRIX still hard-codes 'gpt-5.4-mini' as the cf:tier:cheap base model for both ('codex','openai') (line 828) and ('cursor','openai') (line 856), plus 'gpt-5.4' overrides (lines 833-835, 861-863). get_file_diff confirms agents.py was not touched by this PR at all. The PR's own new comment in codex_provider.py (lines 16-30) quotes the literal runtime error proving gpt-5.4-mini is rejected for ChatGPT-account Codex usage, explicitly names _MODEL_MATRIX, and even notes 'a withdrawal found here is worth checking there' -- yet the production resolver (used at line 992 to resolve tiers into real generated agent config model IDs) was left with the same withdrawn slug. No plan/roadmap/deferral doc found (CONTRIBUTING.md's Tuning/Troubleshooting sections only cover the test pilot's escape hatch) that would excuse this as an intentional deferral.

@ainetx

ainetx commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

↩️ Replying to #239 (comment)

This finding is already closed (fixed-by-new-commit) -- an automated re-check won't reopen it on its own, so flagging this for a human to look at directly rather than reversing it here.

Why

The posted "pushback" is not actually a rebuttal — it's an automated SonarCloud quality-gate comment with no relevance to the model-sync finding, making no checkable claim to evaluate. Separately, even on the merits, the diff and current file content show the finding is stale: Makefile lines 331-338 no longer say 'gpt-5.4-mini' at all — the comment was rewritten to deliberately stop repeating slugs and explains why ("The slugs themselves are deliberately not repeated here... this comment is the copy that went stale last time"). But since the pushback itself offers nothing substantive, there's nothing to agree with here.

@ainetx ainetx left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: the pilot-side fix is fine, but it doesn't close out the actual production risk, and the PR's own new comment names that risk explicitly without addressing it.

  • Production agent model matrix still bakes in the withdrawn gpt-5.4-mini slugcodex_provider.py is updated to a working default, but skills/studio/scripts/studio/commands/agents.py's _MODEL_MATRIX (the resolver that generates real end-user agent configs) still hard-codes gpt-5.4-mini for both ('codex','openai') and ('cursor','openai'), plus related gpt-5.4 overrides — meaning any agent generated through this path picks a model that ChatGPT-account Codex sessions will reject at runtime. This needs the same fix applied here before merge. (comment)

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.

2 participants