Skip to content

fix(codex): keep live model inventories authoritative - #15132

Merged
diegosouzapw merged 5 commits into
diegosouzapw:release/v3.8.52from
JxnLexn:dev/codex-live-catalog
Oct 8, 2026
Merged

diegosouzapw merged 5 commits into
diegosouzapw:release/v3.8.52from
JxnLexn:dev/codex-live-catalog

Conversation

@JxnLexn

@JxnLexn JxnLexn commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

A successful Codex account discovery currently appends every static registry entry, including models the account did not advertise. Keep remote IDs authoritative and enrich only matching IDs with local metadata. Preserve conservative token limits and the existing compatibility/retirement filters.

Use the static catalog only as an explicit offline/bootstrap fallback. On refresh failure, prefer the saved account inventory over the generic GitHub manifest. An entirely filtered live response stays empty instead of resurrecting static entries.

Dashboard and /v1/models now use the active synced Codex inventory, including the separate native-ID listing path, so static-only entries cannot leak back into the public catalog.

Validation: 73 focused discovery/route/listing tests, core typecheck, focused ESLint, and 493 Vitest tests pass. Tests cover stale-cache replacement, metadata enrichment, cache priority during outages, offline fallback, and retired-only live responses. The full native unit suite was not rerun; existing main CI remains the merge gate.

This PR targets release/v3.8.52 and is independent of the account-selection change. Per-account routing is submitted separately. Empty/malformed upstream catalogs retain the existing conservative failure/fallback behavior; this change does not claim that every model advertised upstream will accept inference.

Account-aware selection is submitted independently in #15133.

Live validation on LeonAPI (2026-09-29):

  • GitHub image build: https://github.com/JxnLexn/OmniRoute/actions/runs/36609666057 (success).
  • Deployed fork revision 0fa4d3f57cc5bb45b245b9f1ec05674351834151, image digest sha256:444f841dc46af3ee9b2a88c2be6728b7bf451fead9d623637529d2da68653072.
  • Refreshed all five active Codex connections with authenticated GET /api/providers/{connectionId}/models?refresh=true&chatOnly=true: each HTTP 200, source: api, 7 base models instead of 29 entries.
  • GET /api/synced-available-models?provider=codex: HTTP 200, authoritative: true, the same 7 models. GET /v1/models: HTTP 200, exactly 7 cx/ entries; no Codex Spark, auto-review, or static reasoning-suffix aliases. GPT-6 Astra/Sol/Luna remain listed.
  • Container healthy, zero restarts after deployment; public /api/health HTTP 200. Config and consistent SQLite backup retained (integrity_check: ok, zero foreign-key violations), previous image tagged for rollback.

The deployed fork includes both independently submitted changes and the existing retirement fix from #14903. No new inference requests were made during deployment verification. Current live accounts advertise the same seven models; differing subscription entitlements are covered by the isolated routing tests rather than claimed as a live Pro/Plus experiment.

The live/cached Codex inventory no longer gets static effort aliases or the
retired codex-auto-review id appended. Replace the stale positive assertions in
provider-models-route-codex, models-catalog-route and the diegosouzapw#11632 prefix-mode
tests with their explicit negative counterparts, and document the user-visible
removal in the changelog fragment.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
@diegosouzapw
diegosouzapw merged commit 884c7c4 into diegosouzapw:release/v3.8.52 Oct 8, 2026
43 of 51 checks passed
diegosouzapw added a commit that referenced this pull request Oct 8, 2026
* test(translator): expect boolean is_error on tool_result blocks (#15754)

#15754 made the OpenAI-to-Messages translator always emit a boolean is_error on
every tool_result block (strict upstreams such as the Zed hosted proxy
reject requests without it). The older multimodal translation test still
pinned the block shape without the field.

* test(images): include Codex GPT Image models in the image catalog listing (#14976)

#14976 registered gpt-image-2.5-flare and gpt-image-2 under the codex image
provider (routed to the dedicated Codex Images API) and updated the registry
test to the five-id list, but the image catalog route test still pinned the
three GPT-5.6 hosted-tool ids.

* docs(flags): keep RATE_LIMIT_AUTO_ENABLE catalog default in sync with its definition

#15736 changed the catalog Default cell to _(unset)_, but the catalog
documents FEATURE_FLAG_DEFINITIONS 1:1 and the definition (what the
feature-flags API/UI resolves when nothing is set) is still "false".
Restore the code value and keep the corrected runtime explanation in the
description: rateLimitManager reads only the env var and falls back to the
dashboard setting (default on) when it is unset.

* test(combos): pin on-demand per-candidate reads on the tables #15378 left unmemoized

#15353 added a contrast test asserting the on-demand capability path re-reads
the synced catalog per candidate (>50 reads). #15378, merged just before it,
memoized the synced vision verdict behind the catalog version, so that path
now issues 7 synced reads and the contrast went red on the tip.

Keep the contrast on the capability and override tables (still thousands of
per-candidate reads on demand vs <=2 / bounded on the snapshot route) and pin
the memo itself: synced reads stay within the per-provider bound. With the
pre-#15378 module the new assertion fails (336 synced reads).

* test(chatcore): end the prompt-cache fixture on a user turn (#15830)

#15830 re-landed #13572: the first-party Messages provider now strips a trailing
text-only assistant turn (upstream rejects assistant prefill). The prompt-cache
metadata fixture ended on an assistant text block carrying a cache_control
breakpoint, so the strip dropped it and the recorded totalBreakpoints fell from
3 to 2. Append a user turn so the fixture still exercises system, user and
assistant breakpoints; the assertions are unchanged.

* fix(providers): keep discovered Codex effort variants in the exclusive dashboard listing

#13224 lists one <model>-<tier> row per reasoning level the Codex account
advertises (appendSyncedEffortVariants, non-exclusive branch). #15132 then made
Codex an exclusive synced-listing provider, and the exclusive branch returns
before that step, so the provider dashboard / Test All listing lost the
discovered tier rows while /v1/models still advertised them (cx/<model>-max).

Apply the same variant step on the exclusive branch for codex. The variants
come from the live inventory, so #15132's contract (no static aliases the
account does not advertise) still holds; its own tests stay green. The one
assertion in codex-discovered-reasoning that expected a static registry-only
row (gpt-5.6-sol-ultra) next to the live inventory is flipped to #15132's
contract.

* test(providers): keep the custom gpt-6 max_tokens case on an unregistered id (#15164)

The #14869 custom-model case used gpt-6-luna because it was not in the openai
registry, so it stayed on Chat Completions and had to be renamed to
max_completion_tokens. #15164 registered gpt-6-luna with targetFormat
openai-responses, so the request now goes through the Responses translator
(max_output_tokens) and the Chat Completions assertion read undefined.

Use an unregistered gpt-6 id for the custom-model case and add a case for the
registered gpt-6-luna Responses path (max_output_tokens, no max_tokens).

* chore(changelog): add fragment for the v3.8.52 tip unit-red drain
diegosouzapw added a commit that referenced this pull request Oct 8, 2026
Drains 9 v3.8.52 tip unit reds: 1 production fix (combo family-fallback skipped for request-scoped refusals, regression of #13603) + 8 test alignments to intentional contract changes (#15301 #15132 #15035 #15478 #15310 #15710 #15487), each annotated. Validated on a combined board with #15902 after clean npm ci: 32 previously-red files 327/329 (remaining 2 = quality-rail-gate-membership owned by #15682, and route-namespaces fixed in #15902), typecheck/open-sse/api typecheck, lint, 22 gates.
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.

2 participants