Area#
apps/server (Codex provider, thread title generation)
Environment#
- T3 Code (local dev)
- Provider: Codex CLI (OpenAI)
- Auth: ChatGPT account
Steps to reproduce#
- Start a new thread with a message that triggers automatic title generation
- Use Codex with a ChatGPT account
Expected behavior#
Title generation uses a model supported by the account or fails gracefully.
Actual behavior#
Fails with: "The 'gpt-6-luna' model is not supported when using Codex with a ChatGPT account."
Observed in trace dabe9710bbc13ec7683c43cc182776e1 (CodexTextGeneration.generateThreadTitle / runCodexJson.runCodexCommand). The user message referenced trace ID 902d19edcd12f7982494422162620eb2, but that ID was not found as a local trace span.
Root cause#
One-shot text generation defaults may pick gpt-6-luna which is unsupported for ChatGPT-authenticated Codex sessions. Similar to #12651 (model fallback issue).
Suggested fixes#
- For Codex, use a model compatible with ChatGPT accounts for one-shot generation, or derive from instance/default config
- Surface stdout JSON error when CLI exits non-zero (avoid masking stderr)
- Make title generation resilient (fallback/skip on failure)
Workaround#
Configure an appropriate Codex model for text generation that matches your account type.
Related: #12651, #14321
Note
Grok responding on behalf of Julius.
Triage#
Thanks @protocedvill for the report and the trace pointer. I confirmed this on current
main. A new thread's automatic title asks Codex forgpt-6-luna, and a ChatGPT-authenticated Codex session rejects that slug with the sentence you quoted. The thread itself still starts, but the title stays as the placeholder.Why it happens#
gpt-6-lunais the schema default, not a one-off selection.DEFAULT_TEXT_GENERATION_MODELinpackages/contracts/src/model.tsis"gpt-6-luna"(set by the merged #13115), and an unsettextGenerationModelSelectioninpackages/contracts/src/settings.tsdecodes to thecodexinstance plus that slug.ThreadTitleRegenerationServicepasses that selection straight intogenerateThreadTitle, which is theCodexTextGeneration.generateThreadTitle→runCodexJson.runCodexCommandspan you saw, and that always appends--modelwith the resolved slug.Dispatch doesn't swap out a slug the account can't run. In
apps/server/src/textGeneration/CodexTextGeneration.ts, it keeps an exact catalog hit, otherwise a non-custom slug in the same family, otherwise the requested slug unchanged.gpt-5.6-lunaisn't a family match, so a missinggpt-6-lunastill goes out as--model gpt-6-luna.With Connect with ChatGPT this always happens. The managed runtime's snapshot only includes list-visible models, and #14321 already found that this catalog omits
gpt-6-lunawhile keepinggpt-6-astraandgpt-5.6-luna. Text generation reads that snapshot (CodexManagedProvider.ts) and then ignores the miss. An existingcodex loginChatGPT account can get the same rejection even whenmodel/liststill containsgpt-6-luna.Settings can also show a different model from the one that runs. The picker substitutes a selectable slug when
gpt-6-lunaisn't available, but the server only rewritestextGenerationModelSelectionwhen the instance is disabled or is ACP Registry (resolveTextGenerationProvider). So the picker can showgpt-6-astrawhilecodex execstill getsgpt-6-luna. That's the same display-versus-dispatch split as #12651, with a different trigger.Related#
Thread title generation failedand leaves "New thread". Commit, PR, and branch generation sharerunCodexJson, so they fail the same way with this selection.Likely fix area#
A maintainer will decide on the fix direction. One option: when the requested Codex text-generation slug isn't in that instance's snapshot, fall back to a model the snapshot does contain (the instance default, or the first list-visible slug), and keep Luna when the account's catalog has it.
Workaround#
In Settings, under text generation, pick a model your account lists. Resetting that setting writes
gpt-6-lunaback.