Introduction¶
In DeepSeek Harness (DSH), the model list seen in the Composer and the model order under a specific route in Settings → Models both originate from the same configuration: the providers.<route>.models array within cordis.patch.yml for that route. The order in the array determines both the numbering in the settings page and the sequence in the Composer groups.
When a route contains many models, frequently used ones often get pushed to the end. Manually editing the YAML requires finding the file and ensuring consistency with the UI. The community plugin dsh-model-order (Maintainer: Wany-i, Category: Model Inference) adds an ordering section to the provider cards for every llm-pi-ai route on the official Models page. It allows users to adjust the order via buttons and writes changes back to the configuration. No separate handling for the Composer model menu is required.
What is this¶
dsh-model-order targets llm-pi-ai routes in DSH that have already declared a models list. The plugin does not create a separate storage for sorting; it only rewrites the sequence of elements within the existing models array. DeepSeek official routes, DeepSeek account routes, and non-pi-ai adapter families are out of scope.
The current plugin version is 0.1.0, licensed under MIT, with the repository at: https://github.com/Wany-i/dsh-model-order. Community directory page: https://www.skillhub.cn/plugins/Wany-i/dsh-model-order (Independent site, not officially affiliated with DeepSeek / High-Flyer).
Core Features¶
The following capabilities are described in the README and align with the DSH model pipeline.
| Action | Description |
|---|---|
| Single-step move | Up/Down buttons swap the model with its neighbor |
| Move to ends | Move a model directly to the top or bottom of the list |
| Sort by name | Natural order (e.g., m2 before m10), case-insensitive and stable |
| Restore | Two distinct paths available, see below |
The sole source of truth for the order is the models array in the configuration. Downstream components—from dsh-llm-pi-ai’s resolveRouteModels(), ctx.llm.listModels(), and buildModelCatalog() to the Models settings page and the Composer model menu—all preserve this order. Therefore, changing the order in the settings page changes the Composer display, and the plugin does not need to patch the Composer.
Restore behavior depends on the route type:
- For routes with pi-ai’s built-in catalog (e.g.,
anthropic,openai, etc.): Restore default order removes the route’smodelslist, reverting to the default order shipped with pi-ai. - For manually declared routes (e.g.,
router, relays, self-hosted endpoints): Undo this change only restores the order as it was when the card was opened; it does not delete the configuration item. Clearingmodelsfor manual routes can lead to zero models and catalog errors, so the plugin does not provide a destructive reset here.
The official editor on the same card can still be used to add or remove models; this plugin’s section only changes the order and does not modify the content of fields like id, name, or contextWindow.
The plugin has no independent configuration namespace and does not access the network. Writes include settings revision validation and only replace the models array for the corresponding route. In read-only deployments, controls will be disabled with an explanation.
Installation and Activation¶
Compatible with DSH >=0.2.0-rc.1 <0.3.0-0 (verified on 0.2.0-rc.2 as noted in the README); Node >=20 is only required for building, as GitHub releases include pre-built lib/. Supports both web and desktop profiles. After installation, restart DSH and perform a hard refresh (Ctrl+F5) to pull the client-side updates.
Install from GitHub (command from the original source, replace --profile with web if applicable):
dsh plugin --profile desktop add github:Wany-i/dsh-model-order
Upgrade: Re-run the add command and restart. Uninstall:
dsh plugin --profile desktop remove dsh-model-order
The plugin runs with the current DSH process privileges. It is recommended to review the repository source code and the MIT license before installing. The DSH ecosystem emphasizes “Everything is a plugin”; this directory is community-driven and not an official app store.
Typical Usage¶
- Open Settings → Models.
- Find a route with configured
models(e.g.,router) and expand the provider card. - Use arrows to move models or select Sort by name.
- Open the Composer model menu and verify that the order within the same route group matches the settings page.
If a card displays “This route has no model list of its own…” instead of the sorting controls, it means the route has not declared models in the configuration and is currently using the pi-ai default catalog. Sorting is unavailable until a model list is manually declared.
Use Cases and Notes¶
Suitable for: DSH users who frequently switch models in the Composer and want their preferred models at the top; scenarios using the llm-pi-ai family where the models array is already maintained in YAML or the settings UI.
Notes:
- Sorting controls do not appear: Confirm the plugin is installed, restarted, and the page is hard-refreshed. If no cards have the controls, the pi-ai family entry id in settings might not be
llm-pi-ai(see README Troubleshooting). - Relies on the
settings.models.provider-cardextension slot declared by the official Models page for external plugins; it does not modify files in the official DSH repository. - No network access or additional persistent preferences. Concurrent edits may be rejected due to revision conflicts; please refresh and retry.
Conclusion¶
dsh-model-order places model order editing directly in the visible Settings → Models page, sharing the providers.<route>.models configuration source with the Composer. This prevents synchronization issues between two separate ordering systems. Visit the community directory page and GitHub repository for more details.
- Directory: https://www.skillhub.cn/plugins/Wany-i/dsh-model-order
- Source Code: https://github.com/Wany-i/dsh-model-order