fix(coding-agent): handle empty Codex discovery catalogs - #1153
Closed
sethkarten wants to merge 1 commit into
Closed
fix(coding-agent): handle empty Codex discovery catalogs#1153sethkarten wants to merge 1 commit into
sethkarten wants to merge 1 commit into
Conversation
Keep locally known authenticated Codex models selectable when discovery returns an empty successful catalog, while preserving non-empty account catalog filtering. Cover cached discovery and Sol-to-Luna child admission. Fixes PrimeIntellect-ai#1011 Refs PrimeIntellect-ai#696
This was referenced Aug 10, 2026
Contributor
Author
|
Thank you for the report and proposed work. This root cause is now covered by maintainer-owned stacked PR #1164, authored independently from We did not inspect or reuse this PR's diff, branch, commits, implementation code, or tests; its public description/comments were used only as a bug report. To keep one review surface, this PR is superseded by #1164 and is being closed. The complete review stack is #1158–#1165. It is being left unmerged for human review after CI and review-bot findings are cleared. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1011.
Addresses the executable-model behavior in #696; warning and error-message improvements remain separate follow-up work.
Independent implementation
This branch was implemented from
upstream/mainwithout importing commits, source code, or test files from external PRs #717 or #1012. It uses a new module-level catalog application function and adds coverage to the repository's existing ENG-4649 regression suite.It supersedes our earlier aggregation PR #1152, which will be closed.
Behavior
An empty successful discovery result is inconclusive because the same authenticated account can still serve direct model requests. Actual inference remains authoritative in that case. Authentication, account-ID, and discovery failure paths remain fail-closed.
A non-empty discovery result still filters Codex models to the exact IDs returned by the account catalog.
Verification
env -u GEMINI_API_KEY npx tsx ../../node_modules/vitest/dist/cli.js --run test/suite/regressions/4649-subagent-model-selection.test.tsnpm run checkRelated
Note
Low Risk
Narrow change to Codex catalog filtering with preserved fail-closed paths for auth and discovery failures; regression test covers the empty-catalog case.
Overview
Fixes RLM rejecting authenticated OpenAI Codex child models when ChatGPT model discovery succeeds but returns no model slugs (e.g. Luna variants).
getExecutableModelsnow routes Codex filtering throughapplyOpenAICodexCatalog: if the discovered ID set is empty, locally known authenticatedopenai-codexmodels are left in place instead of being filtered out. When discovery returns one or more IDs, behavior is unchanged—Codex models are limited to that account allowlist. Auth failures, missing account ID, and discovery errors remain fail-closed (Codex models dropped unless a valid stale cache applies).Adds a regression test that
findRlmModelsandrunRlmChildstill admitgpt-5.6-lunawhen discovery returns{ models: [] }, plus an unreleased changelog entry for #1011.Reviewed by Cursor Bugbot for commit f844381. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix model registry to retain Codex models when discovery returns an empty catalog
Previously, when OpenAI Codex discovery returned an empty catalog (or the cache held an empty set), all Codex models were filtered out and rejected by RLM. The fix extracts the filtering logic into a new
applyOpenAICodexCataloghelper inmodel-registry.tsthat skips filtering when the model ID set is empty, leaving Codex models available. A regression test covering an empty-catalog discovery response is added in4649-subagent-model-selection.test.ts.Macroscope summarized f844381.