fix: model catalog fallback for not_configured status#1325
Open
Marnie0415 wants to merge 3 commits into
Open
Conversation
When /codex-model-catalog returns status 'not_configured' with empty models, the inject script now falls back to reading modelList from the active relay profile via /settings/get. This allows custom models to appear in the Codex model selector even when the Rust backend cannot serve the catalog.
Audit changes: - Added 3s Promise.race timeout on fallback settings request - Replaced silent catch with sendCodexPlusDiagnostic for error tracking - Removed unsafe status='ok' override (keeps original not_configured status) - Added diagnostic event on successful fallback - Only reads modelList/activeRelayId from settings, no sensitive data exposure
When settings.json exists but the active relay profile's modelList is empty or fails to parse, the model catalog now falls through to read from config.toml (including model_catalog_json). Previously it would return not_configured without ever checking config.toml.
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
Two fixes for model whitelist injection failure on Codex App 26.623+:
Rust backend (
model_catalog.rs): When settings.json exists but the active relay profile has no models, fall through to read from config.toml instead of returningnot_configuredimmediately.Inject script (
renderer-inject.js): When/codex-model-catalogreturnsnot_configured, add a fallback that readsmodelListfrom the active relay profile via/settings/get.Problem
On Codex App 26.623+:
app-server-manager-signals-module is not found, breaking one layer of whitelist injection/codex-model-catalogreturns{"status":"not_configured"}even when settings.json has a populatedmodelListin the active relay profileread_codex_model_catalog()returns early from the relay profile path without checking config.toml when models are emptyRoot Cause
In
read_codex_model_catalog()(model_catalog.rs), when settings.json exists, the function always returns from the relay profile path. Ifrelay_profile_model_ids()returns empty (e.g. modelList parsing issue), it returnsnot_configuredwithout ever falling through to readmodel_catalog_jsonfrom config.toml.Fix Details
Rust (model_catalog.rs)
read_codex_model_catalog_from_home()which reads config.tomlJS (renderer-inject.js)
loadCodexModelCatalog(), when bridge returnsnot_configuredwith empty models/settings/getwith 3s timeoutmodelListfrom active relay profilecodexModelCatalog.modelsTesting
Related