Skip to content

fix(providers): separate Codex GPT-5.6 image catalog ids - #14216

Merged
diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.51from
domenicomassafra:fix/codex-gpt56-catalog-surfaces
Sep 22, 2026
Merged

diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.51from
domenicomassafra:fix/codex-gpt56-catalog-surfaces

Conversation

@domenicomassafra

Copy link
Copy Markdown
Contributor

Summary

  • give Codex GPT-5.6 image surfaces distinct public catalog IDs (*-image) so they no longer shadow the chat models in /v1/models
  • keep the callable upstream model IDs unchanged and continue accepting the legacy image request IDs for backward compatibility
  • resolve catalog IDs back to the provider model ID before connection eligibility / hidden-model checks

This preserves the chat entries such as codex/gpt-5.6-sol with their 872000 context window while exposing the image surface as codex/gpt-5.6-sol-image.

Closes #13933

Validation

  • npm run typecheck:core
  • node --import tsx/esm --test tests/unit/image-registry-gpt56.test.ts tests/unit/codex-gpt56-catalog.test.ts tests/unit/models-catalog-exact-dup-4424.test.ts tests/unit/model-hidden-modality-scope-12172.test.ts — 16/16 pass
  • node --import tsx/esm --test tests/unit/image-generation-handler.test.ts — 50/50 pass
  • node --import tsx/esm --test --test-force-exit tests/unit/image-generation-route.test.ts — 25/25 pass
  • repository pre-commit hooks: Prettier, ESLint with project suppressions, docs sync, any-budget and tracked-artifact checks all pass

Notes

Running ESLint directly over the entire touched legacy files without the repository suppression config still reports pre-existing unrelated violations outside this diff; the repository pre-commit ESLint invocation passes.

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Thanks @domenicomassafra — merging via the release merge-train. Validated in local merge-train (mt-train10c) on the devbox @ train tip 4d841aa1c740bbaa03868dc0a403c62099a99a42 with the 72 sibling PRs of this batch: typecheck:core, file-size, complexity, cognitive-complexity, changelog-integrity green; changed-area node:test 831/831 (0 failing) and vitest 480/482 — the two reds are autoCombo/provider-family-combos.test.ts timing out at 20s, which reproduces on the PURE release tip under the full vitest suite (and is already tracked by the Release-Green issue #13866), so it is inherited, not this batch's. Merged --admin per merge-gates §3/§4/§7.

@diegosouzapw
diegosouzapw merged commit 4970f5f into cheaper-inference:release/v3.8.51 Sep 22, 2026
7 of 16 checks passed
diegosouzapw added a commit that referenced this pull request Sep 22, 2026
…og suites

Three `/v1` catalog suites answered 503 `catalog_build_timeout` instead of 200 and
died before evaluating a single catalog-shape assertion:

- specialty-model-catalog-routes.test.ts — `listedIds()` aborts on
  `assert.equal(response.status, 200)`
- image-model-not-in-chat-catalog-6457.test.ts — same status check
- model-token-limit-catalog.test.ts — the 503 body has no `data`, so `getModel()`
  throws `Cannot read properties of undefined (reading 'find')`

Root cause is not a catalog defect: every case in these files resets the catalog
cache (or bumps its generation via an override write), so each request is a COLD
build of the full catalog — 460 rows across 42 image providers — and the cold path is
bounded by `CATALOG_BUILD_TIMEOUT_MS` (#12627, default 8000ms). A cold tsx build
already costs ~7s on an idle box; measured here it takes 11.7–22.9s, so the bound
trips deterministically under runner contention. Verified this is not #14216's
`parseImageModel()` call in the image loop: 20 full passes over all 268 image models
cost 105ms total.

Pinned the bound out of the way exactly like the three sibling suites that hit this
before — 9147-catalog-eventloop-yield, 12058-models-catalog-canonical-self-aliased
and models-catalog-route — each carrying the same rationale. No assertion was
changed, removed or weakened; on the contrary, the assertions now actually run
instead of being short-circuited by the status check.
diegosouzapw added a commit that referenced this pull request Sep 22, 2026
…og ids

#14216 (4970f5f, "separate Codex GPT-5.6 image catalog ids") gave the three Codex
GPT-5.6 image models a `catalogId` — `gpt-5.6-sol-image`, `gpt-5.6-terra-image`,
`gpt-5.6-luna-image` — because the callable upstream id collided with the chat
surface of the same model. `imageProviderCatalogEntries()` now publishes the
`catalogId`, while `parseImageModel()`/`findImageModelConfig()` map it back to the
callable `gpt-5.6-sol` on dispatch and for the supported/hidden checks. The
production change is deliberate and correct; three suites still asserted the old
shared ids:

- specialty-model-catalog-routes.test.ts — the image-route catalog listed
  `codex/gpt-5.6-{sol,terra,luna}-image`, not the bare ids.
- image-model-not-in-chat-catalog-6457.test.ts — the #7004 case required the image
  row "under the same model id"; the two rows now live under their own ids.
- model-token-limit-catalog.test.ts — `getModel("codex/gpt-5.6-sol")` now resolves
  the CHAT row (`type` undefined), so `assert.equal(canonical?.type, "image")` failed
  on a row that is no longer the specialty one.

Updated each to the new public ids and kept every invariant they were written for.
Two assertions were added rather than removed: the image row must NOT reappear under
the bare chat id (6457), and a context override targeting the chat id must not bleed
into the image row (token-limit) — both are the point of the #14216 split.
diegosouzapw added a commit that referenced this pull request Sep 24, 2026
…w the Codex image catalog ids

- chatcore-translation-paths / chat-route-coverage: #14316 moved DeepSeek to
  Chat Completions by default and kept Responses as a registry alternate
  format. The five cases that assert a Responses upstream now select it the
  way the connection modal does — providerSpecificData.targetFormat — on every
  DeepSeek call (the replay cases' second turn included). The previous
  apiType attempt never worked: apiType only drives the openai-compatible-*
  family. Coverage stays on DeepSeek's reasoning_content replay.
- model-token-limit-catalog / specialty-model-catalog-routes /
  image-model-not-in-chat-catalog-6457: #14216 gave Codex GPT-5.6 image rows
  their own catalog ids (gpt-5.6-sol-image), so /v1/models no longer lists one
  id twice with two types. parseImageModel() maps both the new and the bare id
  back to gpt-5.6-sol, so image callers of either keep working; the guards now
  assert each entry under its own id, and #6457's "neither entry is dropped".

Refs #14547.
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.

fix(providers): codex/gpt-5.6-{sol,terra,luna} listed only as image models, losing context_length

2 participants