Repository navigation
Description
Summary
For Codex logins that use a ChatGPT account, the Codex AI service's fallback text model, gpt-5.4-mini, is always rejected. When the primary model (gpt-5.6-luna) is rate-limited, the fallback returns HTTP 400 and the new thread never gets an automatic title. It keeps showing the raw prompt (titleFallback). I expected either a fallback model that works for ChatGPT accounts, or no fallback attempt for those logins.
Versions and environment
- Server: bb
0.43.5-nightly.35773768107.1(npmbb-app, self-hosted on Linux, reached through bb Connect). - Primary host: macOS,
codex-cli 0.156.1, Codex signed in with a ChatGPT account. - Code checked on
mainat9781a2126aefd795ff096b7361bf60f8e962b761.
Steps to reproduce
- Sign Codex in with a ChatGPT account (not an API key) on the primary machine and leave the thread-title AI service on Codex.
- Create threads with prompts of 5 words or more until
gpt-5.6-lunareturns a rate limit (429 /rate_limit_exceeded). On a busy account this happens several times a day. - Run
bb thread show <id> --jsonon the new thread:titlestaysnull.
Unverified on main: I did not rerun this against a main build. The deployed nightly predates #4228, but main still tries the same two models in the same order (see Evidence).
Expected vs actual
Actual server log for thr_x8ysmgwp8t:
{"level":30,...,"attempt":1,"errorCode":"ai_service_rate_limited","fallbackModel":"codex/gpt-5.4-mini","maxAttempts":2,"model":"codex/gpt-5.6-luna","reason":"transient-failure","threadId":"thr_x8ysmgwp8t","msg":"Thread metadata inference failed transiently; using fallback model"}
{"level":40,...,"attempts":2,"durationMs":2787,"maxAttempts":2,"model":"codex/gpt-5.4-mini","threadId":"thr_x8ysmgwp8t","errorCode":"ai_service_request_failed","errorMessage":"Codex inference request failed with HTTP 400: The 'gpt-5.4-mini' model is not supported when using Codex with a ChatGPT account.","errorName":"AiServiceCallError","errorStatus":502,"reason":"failed","msg":"Thread metadata inference failed"}
Expected: the retry succeeds, or is skipped when it cannot work, and a title is applied.
Evidence
- From 2026-09-21 to 2026-09-25, this server logged 50
Thread metadata inference failedentries forcodex/gpt-5.4-mini, every one with the HTTP 400 above. It also logged 48 luna rate limits and 2 luna timeouts that triggered the fallback. Counted by grepping theserver.*.logfiles forThread metadata inference. - In the same window, 38 of 132 new top-level threads have
title IS NULL. A few of those are prompts under 5 words, which skip generation by design (title-generation.ts#L17). - On
main, the Codex AI service hardcodes the model list and moves togpt-5.4-minionrate_limited,service_unavailableandinvalid_response: ai-service.ts#L9-L19, loop at L47-L58. - ChatGPT-account logins go to
chatgpt.com/backend-api/codex/responses, and API-key logins go toapi.openai.com/v1/responses(chatgpt-client.ts#L22-L24). The fallback is only useful on the API-key path. - On
main,BB_INFERENCE_FALLBACKis removed (bb-app-managed-config.ts#L31-L37), so the workaround in Helper inference (titles): let the user pick the Fast service tier; the default fallback model fails on ChatGPT accounts #4262 (override the fallback model) no longer exists after Let plugins serve bb's AI tasks with plain functions, picked per task #4228. - A failed generation is not retried later.
applyGeneratedThreadTitleruns only once, when the thread is created.
What you ruled out
- Not the thread-title code: prompt building, sanitizing and
applyGeneratedThreadTitlework. Manualbb thread update --titlepersists fine. - Not a duplicate of Helper inference (titles): let the user pick the Fast service tier; the default fallback model fails on ChatGPT accounts #4262: that is a Feature request for a Fast service tier. It mentions this failure only in passing, and triage classified it as a Feature without reproducing or fixing the defect.
- Not a host connectivity problem: only 1 of the ~100 failures was
host_unavailable.
Suggested priority and effort
Medium priority, small effort. It hits every ChatGPT-account Codex user whenever luna is rate-limited. No work is lost, but threads stay untitled, and on main users have no workaround. Possible fixes: choose the fallback by auth mode (drop gpt-5.4-mini on the ChatGPT backend or swap in a model it accepts), retry luna after a short backoff on 429, or retry title generation later for threads left untitled.
Found in bb thread thr_x8ysmgwp8t.
AGENT GENERATED
Activity
Use GPT-6 Luna for Codex AI tasks with supported fallback (get-bb#4327)
bb-slop-cop commentedon Sep 25, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotALREADY FIXED · Root-cause confidence: high · Reproduction report
Preserved classification: Bug · Priority Medium · Effort Low; labels:
providers,provider-codex,no-repro(verified).The former retry list selected the rejected fallback; merged #4327 removes that selection. On trusted main
0baa605b3, two clean checkouts each passed eight tests, including retry cases for rate limits, service unavailability, and invalid responses. The second run bypassed the test cache. These checks use simulated host responses; live account model access was not tested.No new PR: the targeted fix is already merged in #4327.