GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(catalog): add modelPickerOrder to customize the Codex model-picker order by tone-leh · Pull Request #1669 · lidge-jun/opencodex

Conversation

@tone-leh

@tone-leh tone-leh commented Aug 14, 2026 •
edited by Wibias
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

What

Add an optional, display-only config.modelPickerOrder: string[] that lets a user
customize the order of the Codex model picker for large routed catalogs.

Fixes #1649. (Supersedes #1666, which carried the exploratory history; this is the
squashed, decoupled implementation.)

Why

With many routed providers (10-20+ models), the picker order is driven only by the
5-slot subagentModels list. Every non-featured routed row is emitted at the same
flat priority, so the picker order is undefined and reshuffles on each catalog
rebuild (ocx sync, ocx service restart, upgrade). There is no supported way to
pin the order of more than five routed models.

Design

modelPickerOrder is display-only. It lists routed <provider>/<model> slugs;
listed rows appear in array order in the picker, unlisted rows and
subagentModels-featured rows keep their positions. Native passthrough and
account-qualified native rows are not reordered (use subagentModels for those).
When unset, catalog priority is byte-identical to before — the codex-catalog
golden oracle is unchanged.

Display order and spawn_agent candidacy are fully decoupled:

  • modelPickerOrder rewrites only the Codex-visible priority.
  • Each moved row records its natural priority in an OpenCodex-private catalog field
    opencodex_spawn_priority.
  • effectiveSubagentRoster ranks the spawn_agent candidate window by that natural
    priority, so the candidate SET is provably unchanged by any display reordering —
    even reversing every routed row. Codex ignores the unknown field (same as
    opencodex_catalog_kind), so it is invisible to Codex.

No config-schema change is needed: the top-level config schema is .passthrough()
(same as subagentModels).

Changes

  • src/types.ts: documented optional modelPickerOrder?: string[] on OcxConfig.
  • src/codex/catalog/sync.ts: apply display order to listed routed rows; record
    opencodex_spawn_priority; effectiveSubagentRoster ranks candidates by the
    natural priority. Adds PICKER_ORDER_PRIORITY_BASE / SPAWN_PRIORITY_FIELD.
  • src/codex/convergence.ts: pass config.modelPickerOrder into the routed build.
  • tests/codex-catalog-model-picker-order.test.ts: unset = flat default; listed
    rows ordered; featured wins; bare native not reordered; and the decisive case —
    six routed rows listed in reverse order leave the candidate set unchanged.

Testing

  • bun x tsc --noEmit clean on top of dev.
  • bun test for codex-catalog-golden, codex-catalog, codex-catalog-sync-hardening,
    codex-catalog-model-picker-order (and broader catalog suites): all pass, 0 fail.
    Golden oracle unchanged.

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • All CI tests are green on my local testing.

  • I pushed my PR to the latest dev commit.

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

Summary by CodeRabbit

  • New Features

    • Added an optional model picker ordering setting for routed models.
    • Configured models now appear in the picker according to the specified display order.
    • Existing featured, native, and account-qualified model ordering remains unchanged.
    • Spawn-agent prioritization and eligible model candidates are preserved independently.
  • Tests

    • Added coverage for custom ordering, default behavior, featured-model precedence, and candidate eligibility.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
TooSpace TooSpace
feat(catalog): add modelPickerOrder to customize the Codex model-pick…
68d44b4
…er order

Large routed catalogs (10-20+ models across several providers) have no
supported way to control the Codex model-picker display order beyond the 5-slot
subagentModels list: every non-featured routed row is emitted at the same flat
priority, so the picker order is undefined and reshuffles on each catalog
rebuild (ocx sync / service restart / upgrade).

Add an optional, display-only config.modelPickerOrder: string[]. Listed routed
<provider>/<model> slugs are shown in array order in the picker; unlisted rows
and subagentModels-featured rows keep their positions. When unset, catalog
priority is byte-identical to before (the codex-catalog golden oracle is
unchanged).

Display and spawn_agent candidacy are fully decoupled: modelPickerOrder rewrites
only the Codex-visible `priority`, while each moved row records its natural
priority in an OpenCodex-private catalog field (opencodex_spawn_priority) that
effectiveSubagentRoster uses to pick candidates. The spawn_agent candidate set
is therefore provably unchanged by any display reordering — even reversing every
row. Codex ignores the unknown field (same as opencodex_catalog_kind), so this
is purely a user-facing picker feature.

Fixes #1649
@tone-leh
tone-leh requested review from Ingwannu, Wibias and lidge-jun as code owners August 14, 2026 05:44
@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the enhancement New feature or request label Aug 14, 2026
@github-actions

github-actions Bot commented Aug 14, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

⏳ DRAFT

  • review readiness checklist open (3/4 boxes ticked).

What to do

  • Tick all four boxes in the PR description once you're done (currently 3/4).

Review readiness checklist

  • ✅ All CI tests are green on my local testing.
  • ✅ I pushed my PR to the latest dev commit.
  • ✅ I resolved all correct Codex and CodeRabbit findings.
  • ⬜ My PR is ready for review.

3/4 boxes ticked.

This PR stays in draft until every box above is ticked.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8f2f5213-d2f3-4067-9f92-8eb002cf1539

📥 Commits

Reviewing files that changed from the base of the PR and between a1e5192 and 68d44b4.

📒 Files selected for processing (4)
  • src/codex/catalog/sync.ts
  • src/codex/convergence.ts
  • src/types.ts
  • tests/codex-catalog-model-picker-order.test.ts

📝 Walkthrough

Walkthrough

The PR adds modelPickerOrder as an uncapped display-order setting for routed models. Catalog generation applies picker priorities separately from spawn-agent priorities. Featured and native rows retain their existing behavior, with tests covering ordering and candidate stability.

Changes

Model picker ordering

Layer / File(s) Summary
Configuration and catalog input
src/types.ts, src/codex/convergence.ts, src/codex/catalog/sync.ts
Adds OcxConfig.modelPickerOrder and passes it through prepareCatalog into catalog entry construction.
Picker and spawn-agent priority separation
src/codex/catalog/sync.ts
Assigns a high display-priority band to listed routed models while preserving natural spawn-agent priority through SPAWN_PRIORITY_FIELD. Featured and native rows are excluded from picker reordering.
Ordering behavior validation
tests/codex-catalog-model-picker-order.test.ts
Tests default and configured ordering, featured and native row behavior, candidate limits, and stable spawn-agent membership.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to 68d44

The change is localized to optional picker ordering and preserves existing behavior when unset; no actionable merge-blocking risk remains after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant Config
  participant prepareCatalog
  participant CatalogBuilder
  participant SpawnAgentSorter
  Config->>prepareCatalog: Read modelPickerOrder
  prepareCatalog->>CatalogBuilder: Pass modelPickerOrder
  CatalogBuilder->>CatalogBuilder: Assign picker display priorities
  CatalogBuilder->>SpawnAgentSorter: Preserve SPAWN_PRIORITY_FIELD
  SpawnAgentSorter->>SpawnAgentSorter: Sort spawn-agent candidates by natural priority
Loading

Possibly related PRs

  • lidge-jun/opencodex#1666: Implements the same modelPickerOrder changes across the catalog, convergence, configuration, and test paths.
  • lidge-jun/opencodex#307: Also modifies display-only catalog metadata for the Codex model picker.
  • lidge-jun/opencodex#1212: Modifies catalog generation and convergence paths used by this picker-ordering change.

Suggested labels: review-ready

Suggested reviewers: ingwannu, lidge-jun, wibias

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes satisfy #1649 by adding uncapped picker ordering, preserving native behavior, and separating display priority from spawn_agent candidacy.
Out of Scope Changes check ✅ Passed All changes support #1649 through configuration, catalog wiring, priority separation, and focused tests; no unrelated changes are evident.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding configurable model-picker ordering through modelPickerOrder.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions
github-actions Bot marked this pull request as draft August 14, 2026 05:45
@tone-leh tone-leh mentioned this pull request Aug 14, 2026
feat(catalog): add modelPickerOrder for full picker ordering beyond 5 models #1666
Closed
4 tasks done
@github-actions github-actions Bot added the review-ready label Aug 14, 2026
@github-actions
github-actions Bot marked this pull request as ready for review August 14, 2026 05:50
Wibias
Wibias suggested changes Aug 14, 2026
View reviewed changes

@Wibias Wibias left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two changes are needed before merge:

  1. Major: modelPickerOrder must be runtime-validated, not only typed.

The PR relies on the top-level config schema's .passthrough() and therefore preserves an unknown modelPickerOrder value exactly as hand-edited. The runtime then does const modelPickerOrder = config.modelPickerOrder ?? [] and later (modelPickerOrder ?? []).filter(...) in the catalog builder.

That means a config such as:

{ "modelPickerOrder": "foo" }

can successfully load and then fail catalog convergence/sync with TypeError: ...filter is not a function. This optional display preference should fail soft rather than take down catalog generation.

Please add modelPickerOrder to the config schema with the same degrade-don't-reject policy used for other optional preferences, and add regressions for at least a scalar, object, malformed array, and valid string array. Normalising/trimming/deduplicating through the existing non-blank string-array helpers would also keep the persisted/runtime representation canonical.

  1. Update the model-ordering documentation for the new public config surface.

docs-site/src/content/docs/guides/model-ordering.md still says subagentModels is the supported ordering field and that there is no general ordering field in OcxConfig. After this PR that is false. Please document modelPickerOrder, its routed <provider>/<model> scope, the fact that subagentModels remains the five-slot featured/spawn-agent list, and that native/account-qualified rows are unaffected.

Also please avoid carrying forward the claim that the current equal-priority routed order is "undefined" or "reshuffles on each rebuild" unless there is evidence for that. The existing guide describes the fallback order as deterministic provider/model alphabetical for equal-priority routed rows. The actual missing capability is user-controlled ordering beyond the five featured slots, not determinism itself.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot removed the review-ready label Aug 14, 2026
@github-actions
github-actions Bot marked this pull request as draft August 14, 2026 06:47
@Ingwannu Ingwannu mentioned this pull request Aug 14, 2026
[Feature]: Model picker order is capped at 5 routed models (subagentModels .slice(0,5)); no supported way to order a larger catalog #1649
Closed
@lidge-jun lidge-jun mentioned this pull request Aug 15, 2026
feat: land six repaired cherry-picks (MiniMax, picker order, terminal guard, streamAborted, imageInput, droid docs) #1744
Merged
@lidge-jun

lidge-jun commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Landed via #1744 (dev merge 656376f). Your commit was cherry-picked with authorship preserved (0889973), plus maintainer repairs: fail-soft runtime normalization of malformed modelPickerOrder values with regression tests, and the model-ordering guide now documents the field. Full gates green. Closing as landed — thank you!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lidge-jun lidge-jun closed this Aug 15, 2026
jonathanli12 pushed a commit to jonathanli12/opencodex-jl-custom that referenced this pull request Aug 15, 2026
@lidge-jun
Merge repair/260815-pr-1669 (PR lidge-jun#1669 cherry-pick+repair)
571521a
This was referenced Aug 15, 2026
[Feature]: grey out zero-credit models/combos in the served model catalog and picker #1711
Closed
Feature request: per-model option to stop advertising synthetic max/ultra reasoning rungs on models that don't support them #1870
Closed
This was referenced Sep 3, 2026
feat(models): add main picker ordering controls #3383
Closed
fix(codex): preserve Go efforts and native-first picker ordering #3571
Closed
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
@lidge-jun
Merge repair/260815-pr-1669 (PR lidge-jun#1669 cherry-pick+repair)
afefffa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@lidge-jun lidge-jun Awaiting requested review from lidge-jun lidge-jun is a code owner
@Ingwannu Ingwannu Awaiting requested review from Ingwannu Ingwannu is a code owner
1 more reviewer
@Wibias Wibias Wibias requested changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

enhancement New feature or request

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@tone-leh @lidge-jun @Wibias
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.