compound-engineering-plugin icon indicating copy to clipboard operation
compound-engineering-plugin copied to clipboard

cross-model: Codex peer fails on every run under ChatGPT login because the default model is rejected; no same-family fallback is tried

Open Fetterj opened this issue 2 months ago • 2 comments

Problem

With the Codex CLI logged in through a ChatGPT account, the cross-model adversarial pass in ce-code-review and ce-doc-review fails on every run, and the host falls back to the in-process adversarial reviewer.

The worker requests M_CODEX="gpt-6-luna" (scripts/cross-model-adversarial-review.sh, same in cross-model-doc-review.sh). Under ChatGPT login the API returns:

{"type":"error","status":400,"error":{"type":"invalid_request_error","message":"The 'gpt-6-luna' model is not supported when using Codex with a ChatGPT account."}}

The message names the account, so the host reads it as "this route is unavailable for this user" and records the peer as unsupported. It is actually a model problem. On the same account:

codex exec -m gpt-5.6-sol -c 'model_reasoning_effort="xhigh"' --sandbox read-only --skip-git-repo-check "Reply OK"
# -> OK

references/cross-model-review.md already permits "the closest compatible same-target/same-family replacement" after an observed unavailable model. Nothing prompts the host to try one, so in practice the review loses its independent peer on every run.

Environment: compound-engineering v3.28.2, codex-cli 0.153.4, Claude Code host, ChatGPT login (codex login status → "Logged in using ChatGPT").

Workaround

Set CROSS_MODEL_MODEL_OVERRIDE_TARGET=codex and CROSS_MODEL_MODEL_OVERRIDE=gpt-5.6-sol in the host environment, or set cross_model_model: gpt-5.6-sol in .compound-engineering/config.local.yaml. --emit-adapter codex then shows -m gpt-5.6-sol for both scripts.

Suggestion

  1. In the codex adapter, classify a 400 whose message names the requested model as "model unavailable", not "route unavailable".
  2. On that error, retry once with a configured fallback list (for example cross_model_model_fallbacks: [gpt-5.6-sol]) before failing the route. Record the model that actually served in the receipt.
  3. In the coverage line, name the rejected model so the user can see the fix is a config key.

Related but distinct: #1261 (default model/effort choice), #1500 (namespaced ids), #1565 (effort values).

Fetterj avatar Sep 24 '26 11:09 Fetterj

I'm hitting the same 400, but on gpt-6.1-sol and through ce-work's codex route instead of the review scripts.

Setup: compound-engineering 3.31.0, codex-cli 0.163.0, ChatGPT login. The route goes through acpx, which starts @agentclientprotocol/codex-acp 1.13.1 with CODEX_PATH pointing at my installed CLI.

Through acpx, gpt-6.1-sol fails with "The 'gpt-6.1-sol' model is not supported when using Codex with a ChatGPT account.", right after Codex prints Model metadata for gpt-6.1-sol not found. The same binary run as codex exec -m gpt-6.1-sol answers fine. On the same account, gpt-6-luna and gpt-6-sol both work through acpx. So the model you saw rejected works for me, and one you didn't mention fails.

I don't think a fixed list of blocked models explains that. Something about the ACP path makes the backend refuse models the CLI gets, and I haven't worked out what.

One more thing. #1816 made gpt-6.1-sol the ce-pov default, and ce-pov launches Codex through acpx too. I haven't run it, but I'd expect ChatGPT-login users to hit this there as well. That makes your fallback idea (retry once with a same-family model when the 400 names the model) more pressing than it looked in September.

giuseppebisemi avatar Oct 18 '26 10:10 giuseppebisemi

Thanks @giuseppebisemi . i'm digging in.

tmchow avatar Oct 23 '26 21:10 tmchow