Repository navigation
Conversation
…can run The default text-generation model is `gpt-6-luna`. A ChatGPT-login Codex account's catalog can omit it (Connect with ChatGPT always does), but `runCodexJson` still passed `--model gpt-6-luna` when the instance snapshot had neither an exact nor a family match. Thread titles stayed "New thread", and commit, PR, and branch generation failed the same way. When the snapshot omits the requested slug, use the instance's default model, then the first current listed model. The requested slug still wins whenever the snapshot lists it, and is sent unchanged when there is no snapshot. Fixes pingdotgg#15230
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a localized Codex text-generation bug fix that falls back only when the requested model is absent from the account’s catalog, with existing selection behavior preserved and focused runtime tests added. It does not alter product defaults, schemas, deployment behavior, or static-analysis configuration. You can add or adjust custom eligibility rules. Learn more. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughCodex text generation now resolves requested models against the available model catalog. The selection process includes default, non-legacy, and first-listed model fallbacks. New tests cover resolver behavior and fallback to a listed default model. ChangesCodex model fallback
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Fixed issue severity: <fixed_issue_severity>Medium</fixed_issue_severity> Merge Risk: ⚪ Minimal · up to Codex text generation now falls back to a model listed for the account instead of failing on an unsupported default. No concrete merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Problem
The default text-generation selection is Codex with
gpt-6-luna. A ChatGPT-login Codex account's catalog can leave that model out (Connect with ChatGPT always does, see #14321).codex execthen fails with:New threads keep the "New thread" placeholder, and commit message, PR content, and branch name generation fail the same way because they share
runCodexJson.Change
apps/server/src/textGeneration/CodexTextGeneration.ts: model resolution moves intoresolveCodexTextGenerationModel. The exact-match and family-match behavior is unchanged. When the instance's model snapshot lists neither, it now falls back to a model the snapshot does list:This is the fix direction suggested in the triage.
gpt-6-lunais still used whenever the account's catalog has it. Nothing changes in settings, contracts, or the picker.Scope and approval
Fixes #15230, confirmed in triage: #15230 (comment) (I claimed it there before starting).
Out of scope, as the triage notes:
model/listincludes a slug that the API still rejects is not covered. There is no catalog signal to act on for that case.Verification
Focused tests (33 passed):
vp test run apps/server/src/textGeneration/CodexTextGeneration.test.ts apps/server/src/textGeneration/TextGeneration.test.tscodexbinary: the snapshot listsgpt-5.6-lunaandgpt-6-astra(default), and the selection isgpt-6-luna. The spawned command must receive--model gpt-6-astraand must not receive--model gpt-6-luna. Against currentmainthis test fails on the forbidden--model gpt-6-lunaarg, which reproduces the report. With this change it passes.resolveCodexTextGenerationModel: a listed request is kept, an empty snapshot passes the request through, the fallback order with no default (legacy skipped), and custom models used only when requested.gpt-5.6-luna→openai.gpt-5.6-luna) still pass.tsc --noEmitforapps/serverpasses.vp fmtandvp linton the changed files are clean.Not checked: a live Connect with ChatGPT account. My Codex login lists
gpt-6-luna, so titles already work on it. The fake-binary test covers the failing catalog shape from #14321.