Skip to content

feat(codex): safely discover compatible models - #12933

Merged
diegosouzapw merged 4 commits into
cheaper-inference:release/v3.8.51from
TheDemonTuan:feat/codex-safe-auto-discovery-upstream
Sep 18, 2026
Merged

diegosouzapw merged 4 commits into
cheaper-inference:release/v3.8.51from
TheDemonTuan:feat/codex-safe-auto-discovery-upstream

Conversation

@TheDemonTuan

Copy link
Copy Markdown
Contributor

Summary

  • add GPT-6 Astra fallback models and raise the tested Codex compatibility version to 0.153.4
  • classify remote Codex models before activation so hidden, unsupported, retired, or newer-client models cannot enter the active catalog
  • expose optional candidate diagnostics while persisting only active models

Validation

  • node --import tsx/esm --test tests/unit/provider-models-discovery-split.test.ts tests/unit/codex-reasoning-suffix.test.ts
  • npm run typecheck:core
  • npm run lint -- --quiet --pass-on-unpruned-suppressions

⚠️ base-red inherited: #12732

@diegosouzapw

Copy link
Copy Markdown
Collaborator

This is a genuinely valuable safety fix — preventing hidden/unsupported/retired/newer-client
models from silently entering the active catalog is exactly the right instinct, and the
active/candidate split is a clean way to do it without losing the diagnostic signal. I ran your
two test files at the PR head: 36/36 pass. Two things before merge: (1) could you add a
changelog fragment under changelog.d/? I didn't find one in the diff. (2) this overlaps
textually with #13224 and #12893 (same file, same buildCodexDiscoveryModel function) — the
maintainer will need to sequence these three rather than merge them independently. Flagging that
coordination need rather than asking you to guess at a moving target.

@TheDemonTuan

Copy link
Copy Markdown
Contributor Author

Added the changelog fragment under changelog.d/features/12933-codex-safely-discover-compatible-models.md (6d297b9).

Understood regarding the sequencing with #13224 and #12893 on �uildCodexDiscoveryModel — happy to rebase or help adapt if needed once you sequence them. Thanks!

diegosouzapw and others added 2 commits September 15, 2026 16:12
…ream

Resolves conflicts in the reasoning-suffix regex (adopt the already-landed
generic max/ultra matcher), the Codex client version comment (both sides
already agree on 0.153.4), and the GitHub-catalog discovery response (keep
the already-landed buildResponse/source shape while preserving this PR's
active/candidate reconciliation and includeCandidates diagnostics).
…merge

release/v3.8.51 had already landed the seven gpt-6-astra* models, and the
merge kept both copies, so the Codex registry listed every Astra id twice.
Keep the release's entries (same ids, capabilities and timeouts) and drop
this branch's copies.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Thanks @TheDemonTuan — merging via the release merge-train. Validated in local merge-train (merge-train-20260918-120911-suite.log) on the devbox @ train tip 8c305709478b7052fb981a75852bbf88fe3a959d with the sibling PRs of this batch: typecheck:core, file-size, complexity, cognitive-complexity, changelog-integrity green; changed-area node:test 310/311 (the single red, hard-lease inventory, reproduces on the pure release tip) + vitest green (fast parity mode — full suite ran today on the tip via the base-red and 3b trains). Merged --admin per merge-gates §4/§7.

@diegosouzapw
diegosouzapw merged commit d5452d0 into cheaper-inference:release/v3.8.51 Sep 18, 2026
10 of 16 checks passed
@diegosouzapw diegosouzapw mentioned this pull request Sep 21, 2026
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
* feat(codex): safely discover compatible models

* docs(changelog): add fragment for cheaper-inference#12933

* fix(codex): drop the duplicate GPT-6 Astra registry entries from the merge

release/v3.8.51 had already landed the seven gpt-6-astra* models, and the
merge kept both copies, so the Codex registry listed every Astra id twice.
Keep the release's entries (same ids, capabilities and timeouts) and drop
this branch's copies.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>

---------

Co-authored-by: TheDemonTuan <nguyenviettuanbp@gmail.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
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.

3 participants