Preface¶
When integrating the llm-pi-ai inference service in DeepSeek Harness (DSH), the model dropdown in Settings → Models often requires manual entry of IDs. Whenever a new model is added or an old one is removed on the server, you have to manually cross-reference GET {baseURL}/models or the directory catalog and update the list again. The dsh-model-sync plugin by maintainer mpetruc (Community Category: Model Inference) addresses this by populating the settings area with models from each provider’s published list, ensuring the dropdown matches the inference endpoint without requiring manual entry for every entry.
Below is an introduction to what the plugin does, the sync rules, how to manually refresh, and the configuration options within the bundle. For versions and licenses, please refer to the repository: the current package version is 0.7.1, licensed under MIT.
What is this¶
dsh-model-sync mirrors the model lists published by each configured llm-pi-ai provider into Settings → Models in DSH, ensuring the model dropdown displays the provider’s complete list without manual entry.
Model discovery uses the llm service’s discoverModels('llm-pi-ai', …): OpenAI-compatible routes use GET {baseURL}/models, and catalog routes use the installed catalog.
- Maintainer: mpetruc
- Community Catalog: skillhub.cn/plugins/mpetruc/dsh-model-sync
- Source Code: github.com/mpetruc/dsh-model-sync
The community catalog is an independent site with no official affiliation with DeepSeek or Hunyuan; the plugin is distributed and enabled following DSH’s “everything is a plugin” approach.
Core Features¶
Auto-sync on Activation¶
Every time the plugin is activated, a sync runs: this happens on first launch and when manually re-enabled from the Plugins page. It executes approximately 1.5 seconds after the llm / settings services are ready; if intervalMinutes is a positive number in the configuration, it will also sync repeatedly at that interval.
Settings sections are written back only if a specific sync results in changes to at least one provider’s models.
Manual On-demand Refresh¶
To pull the latest list immediately:
- Open the sidebar Plugins
- Expand the dsh-model-sync card
- Toggle the switch for the model-sync row off and then back on
Re-enabling restarts the plugin, which re-reads the lists published by each provider after about 1.5 seconds.
How to View Sync Results¶
Logs: Every activation sync logs [dsh-model-sync] activation summary: …, listing added (or deleted, if prune: true) model IDs per provider, or no models added or removed. Scheduled interval syncs do not log a summary. The trigger type is also recorded: activation sync (startup/restart) or interval sync.
Plugins Page: Results are written to lastSync within the model-sync settings namespace, and a Last sync panel is displayed on the card (between the description and Components). This panel includes the runtime and a one-line summary per provider; the panel updates with the settings document approximately 1.5 seconds after toggling the switch to trigger a sync.
Sync Rules (Adds / Prune / Rejected)¶
Adds: Discovered IDs that are not yet configured are appended with owner: 'model-sync'; metadata such as name, contextWindow, maxTokens, input, etc., is also written if provided by the listing. Manually entered items do not have an owner; existing items are not overwritten, and IDs, order, and manual capacities are preserved after each sync.
Prune (requires prune: true): Only removes items that still have owner: 'model-sync' and are no longer published by the provider; manually entered items are never pruned.
Rejected: Within the same activation cycle, and when intervalMinutes > 0, if an ID with owner: 'model-sync' that is still published disappears from the configuration between two consecutive syncs, it is treated as an intentional user deletion, recorded in the plugin state, and will not be automatically added back in the future. Manually adding the ID back to the configuration clears the rejection. Manually toggling the plugin off and on resets the in-memory baseline, and a single activation sync will add mistakenly deleted owned IDs back; deletion detection only remains active when intervalMinutes is positive.
Bookkeeping such as the rejection list is stored in the state file <dshHome>/storages/model-sync/state.json (can be overridden with stateFile), not in the settings document. Settings only retain lastSync for UI display. Items from older versions without an owner are treated as manual; clearing a provider’s models and letting the plugin rebuild allows all entries to be tracked. Since 0.7.0, the original model-sync.providers in settings is migrated to the state and removed from settings on the next sync.
Installation and Activation¶
The README does not provide a standalone CLI installation command; you can install the bundle from the community catalog page or the GitHub repository (consistent with how you install other community plugins in DSH). It is recommended to read the source code and the MIT license before installing: the plugin runs with the current DSH process permissions, calls llm discovery APIs, and modifies models-related settings.
Once enabled, the bundle inserts a model-sync component row; the first activation triggers a sync. Node runtime: engines requires >=18.
Configuration¶
Example of the model-sync row inserted by the bundle (refer to the README for field meanings):
- id: model-sync
name: dsh-model-sync
config:
intervalMinutes: 0 # 0 = sync only on activation (startup or restart);
# N = additionally repeat every N minutes
# NB: intervalMinutes > 0 is required to enable rejected deletion detection
prune: false # true = remove IDs added by sync that are no longer published
# providers: [amd-server] # Optional: only sync the listed providers
# stateFile: # Optional: path for rejection state
# # Default: <dshHome>/storages/model-sync/state.json
Adjust intervalMinutes and prune as needed, and use providers to limit the scope if necessary.
Typical Usage¶
- Configure an llm-pi-ai provider in DSH (including an accessible baseURL or catalog).
- Install and enable dsh-model-sync, and wait for the first activation sync (approx. 1.5 seconds).
- Open Settings → Models and confirm that models published by the server appear in the dropdown; manual entries should be preserved and not overwritten.
- After the inference endpoint updates the model list, go to Plugins, toggle the model-sync switch off and on, or set
intervalMinutesfor periodic sync. - If you want deprecated models to be automatically removed from the list, set
prunetotrue; if you need to identify “auto-items deleted by the user” during periodic syncs,intervalMinutesmust be set to> 0.
If an endpoint is unavailable, that provider is skipped with a warning; discovery failures do not cause the entire plugin row to fail.
Use Cases and Notes¶
Ideal for: Self-hosted or frequently changing OpenAI-compatible inference services and catalog routes; DSH / agent developers who want the Settings model list to align with discoverModels results without manually maintaining dozens of model IDs.
Notes:
- Automatically added items carry
owner: 'model-sync', distinguishing them from manual entries; before enablingprune, ensure you do not accidentally delete auto-items you still wish to keep but which have been deprecated by the server (manual entries are unaffected). - The
rejectedlogic relies on periodic syncs; if you only perform “startup + manual restart,” consecutive diffs are not performed outside a single activation cycle. - Check host logs to verify
[dsh-model-sync] activation sync/interval syncand summary lines.
Conclusion¶
dsh-model-sync syncs the model lists published by llm-pi-ai providers into Settings → Models, reducing manual entry and manual cross-referencing. Use the Plugins switch or intervalMinutes to control refreshes, and utilize owner / prune / the rejected list in the state to distinguish between manual entries, automatic items, and user-deleted items.
- Catalog Page: https://www.skillhub.cn/plugins/mpetruc/dsh-model-sync
- GitHub: https://github.com/mpetruc/dsh-model-sync