Skip to content

feat(models): resolve any unknown openai-codex id, not only gpt-5.3-codex - #156

Merged
cryptolir merged 1 commit into
mainfrom
feat/codex-forward-compat-any-id
Sep 7, 2026
Merged

cryptolir merged 1 commit into
mainfrom
feat/codex-forward-compat-any-id

Conversation

@cryptolir

Copy link
Copy Markdown
Owner

Problem

The ChatGPT-subscription path (openai-codex/*) has no usable model on the fleet build. Measured 2026-09-07 on projectmanager (2ndClaw), whose openai-codex:default OAuth profile is valid (token expires 2026-09-17):

id result
gpt-5.1-codex-mini, gpt-5.2, gpt-5.2-codex, gpt-5.3-codex, gpt-5.3-codex-spark, gpt-5.1-codex-max OpenAI: "not supported when using Codex with a ChatGPT account"
gpt-5.1-codex Unknown model (not in the bundled registry)
gpt-5.4-mini, gpt-5.5, gpt-6-astra (current, from the owner's Codex CLI models_cache.json) Unknown model

models.providers cannot add them: zod-schema.core.ts allows seven api values and openai-codex-responses is not one of them — an entry makes the gateway refuse to start (tried; restart loop, reverted).

Change

resolveOpenAICodexGpt53FallbackModel special-cased exactly gpt-5.3-codex. It is now resolveOpenAICodexForwardCompatModel and covers any openai-codex id the registry does not know: clone the newest bundled codex template (gpt-5.3-codex, then gpt-5.2-codex), else synthesize against https://chatgpt.com/backend-api with api: openai-codex-responses — the same body the 5.3 case already produced. Every openai-codex id speaks that one API, and a wrong id is not hidden: OpenAI answers it with an explicit refusal in the reply.

Other providers are untouched (test asserts openai/gpt-5.4-mini still resolves to nothing here).

Tests

src/agents/model-forward-compat.test.ts: +3 (template clone, synthesis with empty registry, other-provider/blank-id negative). 6/6 pass.

Rollout

build-and-push.sh → pilot on projectmanager only (manual OPENCLAW_IMAGE + --force-recreate, verify the dist carries the change before recreating) → set openai-codex/gpt-5.4-mini with Venice fallbacks → real turn. Fleet roll is a separate owner decision.

Separate finding, not fixed here

The Venice fallback does not engage on these refusals: they arrive as a 200-shaped reply body, so fallbacks cannot rescue a misconfigured Codex primary.

🤖 Generated with Claude Code

…odex

OpenAI ships new Codex slugs (gpt-5.4-mini, gpt-5.5, gpt-6-astra, ...) faster
than the bundled catalog follows, and retires the old ones for ChatGPT-account
users. Measured 2026-09-07 on a gateway with a valid openai-codex OAuth profile:
every id the catalog knows (gpt-5.1-codex-mini, gpt-5.2, gpt-5.2-codex,
gpt-5.3-codex, gpt-5.3-codex-spark, gpt-5.1-codex-max) is answered with
"not supported when using Codex with a ChatGPT account", and every current id
is "Unknown model". models.providers cannot bridge the gap: the config schema
has no openai-codex-responses api value, so an entry restart-loops the gateway.

The forward-compat fallback that special-cased gpt-5.3-codex now applies to any
openai-codex id the registry does not know: clone the newest bundled codex
template (gpt-5.3-codex, then gpt-5.2-codex), else synthesize the model against
https://chatgpt.com/backend-api with the openai-codex-responses api. Every
openai-codex id speaks that same API, and a wrong id is not hidden — OpenAI
answers it with an explicit refusal.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@cryptolir
cryptolir merged commit fb7f44e into main Sep 7, 2026
15 of 20 checks passed
@cryptolir
cryptolir deleted the feat/codex-forward-compat-any-id branch September 7, 2026 20:14
cryptolir added a commit that referenced this pull request Sep 7, 2026
…(gpt-5.4-mini on the ChatGPT subscription) (#157)

Co-authored-by: Liran Peretz <[email protected]>
Co-authored-by: Claude Fable 5.1 <[email protected]>
cryptolir added a commit that referenced this pull request Sep 7, 2026
…is v2026.9.7.2 (#158)

The Codex forward-compat build (#156) reused the tag v2026.9.7.1, pushing over
the morning Node 24 build (0057bbe). Repaired: new build re-tagged and
registered as v2026.9.7.2, v2026.9.7.1 pushed back to its original digest,
registry and release ledger verified in agreement. testingbot was unaffected.

Co-authored-by: Liran Peretz <[email protected]>
Co-authored-by: Claude Opus 5 <[email protected]>
cryptolir added a commit that referenced this pull request Sep 29, 2026
…x model test (#169)

* fix(browser): stop 500ing every request on Node 24; update stale codex model test

Node 24 defines IncomingMessage#signal as a getter-only property, so the
browser Express middleware assignment req.signal = ctrl.signal threw and
every request to the browser control server / sandbox bridge got HTTP 500.
Shadow it with an own property instead. This was 19 of the 20 real
checks (node, test) failures on main since #154 moved CI to Node 24.

The 20th: #156 made any unknown openai-codex id resolve via forward-compat,
so the test that expected gpt-4.1-mini to error now asserts it resolves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs(status): record #169

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Liran Peretz <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

1 participant