@aiwayds/dsh-model-sync
dsh plugin: keep llm-pi-ai provider routes' model lists in step with the pi.dev gateway, written through the official settings seam
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:fan56/dsh-model-sync说明文档
阅读完整 README ↗Usage
Configure the plugin under the model-sync namespace in settings.yaml — every key is optional:
| Key | Default | Description |
|---|---|---|
writeMode | 'overlay' | 'settings' for the zero-patch pipeline; 'overlay' for the legacy patched-adapter mode |
intervalMinutes | 240 (4h) | Auto-refresh interval in minutes; 0 = startup-only |
startupDelaySeconds | 5 | Delay before the first auto refresh, so the llm adapter is ready |
refreshTimeoutMs | 120000 | Abort budget for one refresh round's network request (min 1000) |
managedRoutes | [] | Routes to sync; empty = the default pi.dev routes |
keepBuiltinOnly | true | Keep built-in-only models not present on pi.dev (smooth migration) |
dropUnserviceable | true | Drop unserviceable entries; false aborts the route instead |
forceMaxReasoningEffort | false | Force max reasoning effort on models with a non-empty thinkingFormat |
Example:
model-sync:
writeMode: settings
intervalMinutes: 30
managedRoutes:
- opencode-go
- zai-coding-cn
The plugin writes to the llm-pi-ai namespace (providers..models) — the same document the adapter consumes — and only for the routes it manages. During migration, keepBuiltinOnly preserves models that exist in your installed built-in catalog but aren't on pi.dev yet.
Manual refresh: the /model-sync command
Type /model-sync in any interactive UI to force one sync round on the spot. The plugin registers the command in the shared command registry (@deepseek-ai/dsh-commands), and UIs discover it automatically. It returns the same report the scheduled rounds log. The sync scope is decided by managedRoutes; any arguments typed after the command are ignored. Hosts without a command registry degrade gracefully — the scheduled rounds and the modelSync service keep working.