Skip to content

fix(models): preserve picker order#201

Open
0xCheetah1 wants to merge 4 commits into
BlockRunAI:mainfrom
0xCheetah1:fix/openclaw-picker-order
Open

fix(models): preserve picker order#201
0xCheetah1 wants to merge 4 commits into
BlockRunAI:mainfrom
0xCheetah1:fix/openclaw-picker-order

Conversation

@0xCheetah1

@0xCheetah1 0xCheetah1 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • preserve top-models.json order when building the visible OpenClaw model list
  • reorder the curated picker list so routing profiles and flagship paid models appear first
  • add a regression test that visible picker IDs exactly match top-models.json

Testing

  • npx -y -p node@22 npm test
  • npx -y -p node@22 npm run typecheck
  • npx -y -p node@22 npm run lint
  • npx -y -p node@22 npm run format:check
  • npx -y -p node@22 npm run build

Summary by CodeRabbit

  • Bug Fixes
    • Improved the ordering of featured model listings so they now appear consistently in the intended priority order.
    • Removed an unavailable model from the featured list and updated the display order of several model groups.
  • Tests
    • Added automated checks to ensure the published featured model list matches the configured priority order (including length and element-by-element alignment).

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6ab21165-1e48-4214-b29f-033cbd657e29

📥 Commits

Reviewing files that changed from the base of the PR and between be235a4 and e6fefe2.

📒 Files selected for processing (1)
  • src/models.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/models.test.ts

📝 Walkthrough

Walkthrough

VISIBLE_OPENCLAW_MODELS now follows TOP_MODELS order through an OPENCLAW_MODEL_BY_ID lookup. top-models.json is reordered and one model ID is removed. A test checks ordering and length. PartnerCategory formatting changes to a multi-line union.

Changes

Top models ordering

Layer / File(s) Summary
Top models list reordering
src/top-models.json
Model ID entries are reordered across providers and groups, and google/gemini-3.1-pro is removed.
VISIBLE_OPENCLAW_MODELS derivation and integrity test
src/models.ts, src/models.test.ts
VISIBLE_OPENCLAW_MODELS is now derived from TOP_MODELS order via a new OPENCLAW_MODEL_BY_ID map, and a new test asserts that its length and order match TOP_MODELS.

Partner category type formatting

Layer / File(s) Summary
PartnerCategory formatting
src/partners/registry.ts
The PartnerCategory string-literal union is reformatted into a multi-line vertical-bar layout with no value changes.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant TopModels as TOP_MODELS
  participant ModelsTs as models.ts
  participant ModelMap as OPENCLAW_MODEL_BY_ID
  participant Visible as VISIBLE_OPENCLAW_MODELS

  ModelsTs->>TopModels: iterate ids in order
  ModelsTs->>ModelMap: get(id)
  ModelMap-->>ModelsTs: matched model or undefined
  ModelsTs->>Visible: append matches (flatMap)
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: preserving the model picker order in the models list.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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

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

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.

1 participant