Skip to content

fix(coding-agent): handle empty Codex discovery catalogs - #1153

Closed
sethkarten wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
sethkarten:fix/rlm-empty-codex-catalog-independent
Closed

fix(coding-agent): handle empty Codex discovery catalogs#1153
sethkarten wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
sethkarten:fix/rlm-empty-codex-catalog-independent

Conversation

@sethkarten

@sethkarten sethkarten commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Keep locally known authenticated OpenAI Codex models selectable when a successful discovery response contains no model IDs.
  • Preserve non-empty account catalogs as authoritative model allowlists.
  • Extend the existing subagent model-selection regression suite to cover cached empty discovery and explicit Sol-to-Luna child admission.
  • Add a coding-agent changelog entry.

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/main without 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.ts
    • 13 tests passed.
  • npm run check
    • formatting, linting, type checking, installer rendering, and browser smoke checks passed.

Related


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).

getExecutableModels now routes Codex filtering through applyOpenAICodexCatalog: if the discovered ID set is empty, locally known authenticated openai-codex models 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 findRlmModels and runRlmChild still admit gpt-5.6-luna when 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 applyOpenAICodexCatalog helper in model-registry.ts that skips filtering when the model ID set is empty, leaving Codex models available. A regression test covering an empty-catalog discovery response is added in 4649-subagent-model-selection.test.ts.

Macroscope summarized f844381.

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
@sethkarten

Copy link
Copy Markdown
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 upstream/main.

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.

@sethkarten sethkarten closed this Aug 10, 2026
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.

RLM subagents cannot use GPT-5.6 Luna from a GPT-5.6 Sol parent session

1 participant