fix(coding-agent): keep Codex models on empty discovery - #1152
Closed
sethkarten wants to merge 1 commit into
Closed
Conversation
Treat an empty successful Codex catalog as inconclusive while keeping non-empty account catalogs authoritative. Add registry and Sol-to-Luna RLM regressions plus a changelog entry. Fixes PrimeIntellect-ai#1011 Refs PrimeIntellect-ai#696 Co-authored-by: Ayush Nangia <ayushnangia16@gmail.com> Co-authored-by: cskwork <csk917work@gmail.com>
This was referenced Aug 10, 2026
Contributor
Author
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.
This consolidates and supersedes #717 and #1012, with co-author credit retained in the commit.
Evidence
On Prime Agent 0.7.1 with the same authenticated Codex account:
openai-codex/gpt-5.6-lunaexecution succeeded;rlm.find_models("luna")returned no result;The inconsistent behavior comes from treating
HTTP 200 {"models":[]}as an authoritative no-model entitlement response. The inference request remains the authoritative check when discovery is empty.Safety
Verification
env -u GEMINI_API_KEY npx tsx ../../node_modules/vitest/dist/cli.js --run test/suite/regressions/696-empty-codex-catalog.test.ts test/suite/regressions/1011-luna-subagent-selector.test.ts test/suite/regressions/4649-subagent-model-selection.test.tsnpm run checkRelated
Note
Medium Risk
Changes Codex model gating used by RLM and model selection; behavior is narrower (less aggressive filtering) but still fails closed on bad auth, missing account ID, and failed discovery without a usable cache.
Overview
OpenAI Codex executable-model filtering no longer treats a successful discovery response with an empty
modelslist as “no entitlements.” IngetExecutableModels, a newfilterByCataloghelper skips Codex ID filtering when the catalog set is empty, so locally known authenticated models (e.g. GPT-5.6 Luna) stay selectable; non-empty catalogs still restrict Codex models to returned slugs, including cache hits and error fallbacks.Adds regression tests for empty, cached-empty, and subset catalogs in the model registry, plus an RLM harness test that finds and spawns a Luna child from a Sol parent when discovery returns
[]. Changelog entry documents the user-visible RLM/subagent fix (#696, #1011).Reviewed by Cursor Bugbot for commit 5bc67f4. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix
ModelRegistry.getExecutableModelsto keep Codex models when discovery returns empty cataloggetExecutableModelspreviously filtered out allopenai-codexmodels when the discovered model ID set was empty, effectively hiding authenticated Codex child models.filterByCataloghelper in model-registry.ts that treats an empty discovered set as inconclusive, skipping the filter entirely.Macroscope summarized 5bc67f4.