← Back to home@GooDAnDReaDY

dsh-model-sync

Dynamic LLM Model Catalog Synchronization & Automated Balance Monitoring for DeepSeek Harness

Stars
3
Language
JavaScript
Created
Aug 23, 2026
Updated
Oct 6, 2026
GitHub repo

Introduction

📦 @goodandready/dsh-model-sync

Dynamic LLM Model Catalog Synchronization & Automated Balance Monitoring for DeepSeek Harness

npm version license DSH Plugin Node version

All Author Projects

🇬🇧 English • 🇷🇺 Русский • 🇨🇳 中文说明

⭐ If you like this plugin, please star it on GitHub — it shows me that the plugin is useful to you and motivates me to keep developing it.

🐛 If you find a bug or would like to request a feature, open a GitHub issue in any language — I will review your proposal and implement useful suggestions in a future plugin version.

⚡ Overview

dsh-model-sync keeps your DeepSeek Harness model catalog up-to-date with upstream AI providers.

Instead of manually editing YAML configs whenever a provider launches a new model, adjusts context window limits, or changes pricing, dsh-model-sync automatically discovers new releases, updates capability metadata (vision, tools, reasoning, embeddings), tracks account balances, manages model selection visibility, and reconciles models on the fly without server restarts.

graph LR
    subgraph Trigger [Scheduling & Manual Trigger]
        Cron[⏰ Background Polling Scheduler] --> Engine[dsh-model-sync Core Engine]
        WebUI[🖥️ Settings: Sync Now Button] --> Engine
    end

    subgraph Providers [25+ Upstream Providers]
        Engine --> Registry{Adapter Registry}
        Registry -->|Bearer Auth| P1[OpenAI / DeepSeek / OpenRouter / Groq]
        Registry -->|x-api-key Auth| P2[Anthropic Claude / Custom Gateways]
        Registry -->|query-key Auth| P3[Google Gemini]
        Registry -->|Local Probe| P4[Local Ollama / vLLM / SGLang]
        Registry -->|CommandCode API| P5[Command Code / visibleModels]
        Registry -->|Plan Discovery| P6[ClineBot Subscription Plan]
    end

    subgraph Reconcile [Catalog Reconciler & Auditing]
        P1 --> Normalizer[Model Normalizer & Capabilities Tagger]
        P2 --> Normalizer
        P3 --> Normalizer
        P4 --> Normalizer
        P5 --> Normalizer
        P6 --> Normalizer
        Normalizer --> Diff[Sync Diff Tracker: Added / Deprecated]
        Diff --> Catalog[Active DSH Models Catalog & visibleModels]
    end

    style Trigger fill:#1e1e2e,stroke:#89b4fa,stroke-width:2px,color:#cdd6f4
    style Providers fill:#181825,stroke:#cba6f7,stroke-width:2px,color:#cdd6f4
    style Reconcile fill:#11111b,stroke:#a6e3a1,stroke-width:2px,color:#cdd6f4

✨ Key Features

  • 💰 Built-in Reference Pricing Database: Canonical token pricing database automatically enriches models for OpenAI, Anthropic, Groq, Mistral, xAI, and DeepSeek, enabling cost-limit filtering and @cheap auto-resolution even when upstream APIs omit pricing metadata.
  • 🎯 Dynamic Smart Virtual Aliases & Auto-Fallback: Route requests to virtual aliases like @fast, @cheap, and @best-code, with automatic fallback chains when circuit breakers open or health probes fail.
  • 🔔 External Diff Webhooks & Event Dispatching: Real-time webhook notifications with HMAC-SHA256 signature verification and Cordis model-sync/diff events when models are added, deprecated, or prices change.
  • ⚡ High-Performance Policy Filtering: Fast-path evaluation in filterModels bypasses regular expressions and array filtering when no filtering policy is configured, guaranteeing zero-overhead discovery runs.
  • 🔄 One-Click In-App Updates: Built-in update checker in Settings with automatic npm cache bypass on demand (?fresh=1 / Cache-Control: no-cache), ensuring instantaneous discovery of new package releases.
  • 🔄 Automated Catalog Discovery: Syncs model lists, aliases, context windows, and capability flags (vision, tools, reasoning, embeddings) across 25+ providers.
  • 🛡️ Minijinja Chat Template & Role Compatibility: Automatically sets compat.supportsDeveloperRole: false for Groq open-source models (Qwen, Llama, Mistral, Gemma, DeepSeek) and DeepSeek API, preventing 400 Unexpected message role errors with reasoning models while preserving user overrides.
  • 🌐 25+ Built-in Provider Adapters: Pre-configured discovery for OpenAI, Anthropic, Google, DeepSeek, xAI, OpenRouter, Groq, Mistral, Cerebras, Fireworks, HuggingFace, Moonshot, NVIDIA, Qwen, Together, Xiaomi MiMo, SiliconFlow, Command Code, ClineBot, and local Ollama.
  • 🎛️ Command Code Model Selection: Full discovery of Command Code models with granular checkbox selection in the UI, automatically syncing visibleModels to llm-commandcode settings.
  • 🎯 ClineBot Subscription Plan Sync: Dedicated adapter querying GET /users/me/plan to discover only active subscription-included models, eliminating catalog clutter from out-of-plan endpoints.
  • 🔌 Generic / Custom Adapter Support: Connect arbitrary OpenAI-compatible /v1/models endpoints with configurable auth (bearer, x-api-key, query-key, none).
  • 📊 Balance & Quota Monitoring: Queries upstream billing endpoints (where supported) to report account credit balances and prevent unexpected exhaustion.
  • 📜 Sync History & Diff Auditing: Tracks all newly discovered models, deprecated IDs, and modified capabilities with timestamped diff logs in the Web UI.
  • 🖥️ Full Web GUI Panel (Settings → Model Synchronization):
    • Live status cards per provider with active model counters;
    • Instant "Sync Now" button for on-demand catalog refreshes;
    • Granular model checkboxes for selection and visibility management;
    • Provider enable/disable toggles and custom endpoint inputs.

🛠️ Supported Discovery Providers

Provider IdentifierAuthentication FormatCapabilities Auto-Detection & Notes
openaiBearer Tokenvision, tools, reasoning, embeddings
anthropicx-api-key headervision, tools, reasoning
googleQuery parameter / Keyvision, tools, reasoning, embeddings
deepseekBearer Tokentools, reasoning
xaiBearer Tokenvision, tools, reasoning
openrouterBearer TokenMulti-vendor model catalog with pricing & context limits
groqBearer Tokentools, reasoning, vision, supportsDeveloperRole: false
mistralBearer Tokentools, reasoning, vision
commandcodeBearer Tokenhttps://api.commandcode.ai/provider/v1/models catalog with visibleModels selection syncing to llm-commandcode
clinebotBearer TokenActive subscription plan discovery (/users/me/plan), restricting sync strictly to plan-included models
fireworksBearer TokenOpen-weights inference endpoints
huggingfaceBearer TokenServerless Inference API catalog
togetherBearer TokenOpen-source model catalog
ollamaLocal HTTP (none)Local offline model discovery (/api/tags)
customConfigurableAny custom OpenAI or Google compatible gateway

📦 Quick Installation

dsh plugin --profile web add @goodandready/dsh-model-sync

[!IMPORTANT] Restart DSH Web UI after installation (systemctl --user restart dsh-web) to activate background catalog synchronization.


⚙️ Configuration (settings.yaml)

dsh-model-sync:
  enabled: true
  syncIntervalMinutes: 60
  autoReconcile: true
  enableBalanceChecks: true
  providers:
    commandcode:
      enabled: true
    clinebot:
      enabled: true
ParameterTypeDefaultDescription
enabledbooleantrueMaster switch for background synchronization
syncIntervalMinutesnumber60Polling frequency for catalog refreshes
autoReconcilebooleantrueAutomatically apply discovered models to active catalog
enableBalanceChecksbooleantrueQuery billing endpoints where supported
providers.<id>.enabledbooleantrueEnable or disable discovery for specific provider

📄 License

MIT © GooDAnDReaDY