Repository navigation
[Feature]: Model picker order is capped at 5 routed models (subagentModels .slice(0,5)); no supported way to order a larger catalog #1649
Description
Area
Proxy and routing
What are you trying to accomplish?
I run a large routed catalog (10-20+ models across several OpenAI-compatible providers plus anthropic/responses adapters) and need a stable, deterministic order for the Codex model picker across the whole catalog. I want to pin the full picker order once and have it survive catalog rebuilds (ocx sync, ocx service restart, version upgrades), the same way a user would arrange a long provider/model list and expect it to stay put.
What prevents this today?
There is no supported way to control the model-picker order for more than 5 routed models.
PUT /api/subagent-models (the dashboard "featured / sub-agent models" path) hard-caps the list to 5 with .slice(0, 5), and that same list is the only input the catalog builder uses to assign per-model priority. Every non-featured routed model is emitted with the same fallback priority (routed slugs all get 5), so their relative order in the picker is undefined and reshuffles on each catalog rebuild.
The 5-slot cap conflates two separate concerns: (a) the spawn_agent model-override candidates (MAX_MODEL_OVERRIDES_IN_SPAWN_AGENT = 5, a real upstream limit) and (b) the visual ordering of the whole picker (no upstream limit; priority is just an integer sort key).
Evidence (code path):
src/server/management/agent-settings-routes.ts(PUT/api/subagent-models):const chosen = Array.isArray(body.models) ? body.models.filter(...).slice(0, 5) : [];-- the 5-cap is applied here, at the only user-facing write path.src/codex/convergence.ts:const featured = config.subagentModels ?? [];thenorderForSubagents(enabled, featured)--subagentModelsis the sole ordering input.src/codex/catalog/sync.ts(buildObservedCatalogEntries): featured models getpriority = featuredRank * priorityStride + selectorIndex; every other routed model falls through to((featured?.length ?? 0) + nativeIndex) * ... + selectorIndex, and routed rows otherwise default topriority = 5. Comment at the same site notes: "Codex's models-manager sorts bypriorityASC ... Catalog ARRAY order is discarded."
orderForSubagents itself has no length limit -- it happily ranks an arbitrarily long array -- but the only supported way to populate subagentModels truncates to 5. Writing a longer list directly into config.json works until the next dashboard interaction rewrites and re-truncates it.
What should OpenCodex do?
Either provide a way to declare a full ordering for the picker (independent of the 5-slot spawn_agent candidate list), or document that ordering beyond 5 models is intentionally unsupported so integrators stop trying to drive it through subagentModels.
Concretely, any one of these resolves it:
- Add a separate, uncapped ordering field (e.g.
config.modelPickerOrder: string[]) thatorderForSubagentsconsumes for picker priority, whilesubagentModelskeeps its 5-slot spawn_agent semantics; or - Lift the
.slice(0, 5)onsubagentModelsfor ordering purposes and only apply the 5-cap when deriving spawn_agent candidates downstream; or - If ordering beyond 5 is intentionally out of scope, document that clearly so integrators do not build fragile catalog-rewrite workarounds.
Example usage or interface
A dedicated ordering field consumed by the catalog builder would look like:
{
"modelPickerOrder": [
"combo/JD",
"jd-chat/kimi-k3-joybuilder",
"jd-responses/GPT-5.6-Sol-joybuilder",
"jd-chat/GLM-5.2-joybuilder",
"jd-claude/Claude-Sonnet-5-joybuilder",
"tyler/deepseek-v4-pro"
]
}with subagentModels still limited to 5 for spawn_agent candidates. Today the equivalent effect can only be forced by rewriting every model's priority in the generated catalog after each sync, which is not a supported interface.
Alternatives or workarounds
A post-sync script rewrites every model's priority in ~/.codex/opencodex-catalog.json and models_cache.json directly, reproducing the intended full order. It must be re-run after every ocx sync, ocx service restart, and version upgrade, because catalog rebuild resets all routed priorities back to the flat default. This is brittle and easy to forget: an out-of-order restart silently reverts the picker.
Additional context
- Version: opencodex 2.14.2 (
ocx --version); running local service confirmed viaGET /healthz. - Operating system: macOS 26.5.1 (25F80).
- Providers/models: multiple OpenAI-compatible routed providers (10+ routed models across chat / responses / anthropic adapters). Not provider-specific; reproducible with any catalog of more than 5 routed models.
Activity
coderabbitai commentedon Aug 14, 2026
🔗 Related PRs
#307 - Preserve custom model display names across catalog syncs [merged]
#426 - feat(codex): add account-qualified model namespaces [open]
#763 - fix(catalog): prioritize model names in picker labels [merged]
#1212 - feat(codex): converge account picker catalogs [merged]
#1331 - fix(catalog): keep failover combos when live discovery omits members [merged]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!
github-actions commentedon Aug 14, 2026
Issue reopened
The report now contains the information required by the automated check. Thanks for updating it.
Ingwannu commentedon Aug 14, 2026
Confirmed: the current
subagentModelswrite path couples the real five-model spawn override limit to full picker ordering, so catalogs beyond five routed models have no durable supported order.The correct direction is a separate uncapped picker-order field rather than weakening the five-model subagent constraint. PR #1669 follows that separation, but it is still draft/changes-requested and needs its latest-head config/API/catalog/cache regressions completed before merge. Keeping this issue open as the tracking issue for that PR.
feat(catalog): add modelPickerOrder to customize the Codex model-pick…
docs(agents): document the five-model spawn_agent window and its V1/V…
feat(catalog): add modelPickerOrder to customize the Codex model-pick…
docs(agents): document the five-model spawn_agent window and its V1/V…