fan56/dsh-model-sync0

@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

包名
@aiwayds/dsh-model-sync
版本
0.1.5
最近更新
2026年8月29日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:fan56/dsh-model-sync

Usage

Configure the plugin under the model-sync namespace in settings.yaml — every key is optional:

KeyDefaultDescription
writeMode'overlay''settings' for the zero-patch pipeline; 'overlay' for the legacy patched-adapter mode
intervalMinutes240 (4h)Auto-refresh interval in minutes; 0 = startup-only
startupDelaySeconds5Delay before the first auto refresh, so the llm adapter is ready
refreshTimeoutMs120000Abort budget for one refresh round's network request (min 1000)
managedRoutes[]Routes to sync; empty = the default pi.dev routes
keepBuiltinOnlytrueKeep built-in-only models not present on pi.dev (smooth migration)
dropUnserviceabletrueDrop unserviceable entries; false aborts the route instead
forceMaxReasoningEffortfalseForce 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.