antonio-mastropaolo/dsh-model-hub ↗★ 4

@local/dsh-model-hub

DeepSeek Harness plugin: model hub. DSH-native provider sign-in, optional GPU-server dispatch, per-model cost, spend caps, prompt-cache checks, and the dsh-hub CLI.

套件
@local/dsh-model-hub
相容性
待驗證
版本
2.0.0
授權
MIT
最近更新
2026年11月9日

安裝

此插件尚未提供可驗證的 bundle,或相容性檢查未通過。請先閱讀倉庫說明。 閱讀完整 README ↗

Configuration

Everything lives in the data dir: $DSH_HUB_DATA_DIR, else $DSH_HOME/model-hub, else ~/.dsh/model-hub (created 0700; files 0600). dsh-hub doctor prints the one in use.

config.json (optional; re-read whenever it changes; an invalid value never throws — it is ignored and reported by dsh-hub doctor):

{
  "gpuServer": { "id": "mybox", "name": "My GPU box", "url": "http://127.0.0.1:8000", "icon": "nvidia",
                 "hideModels": ["flash-next"], "defaultModel": "my-model" },
  "localProviders": ["mybox", "mac"],
  "hub": { "allowedOrigins": ["http://127.0.0.1:3200"] },
  "priceModels": ["google/gemini-3.8-flash"],
  "extraLedgers": ["/absolute/path/to/another/spend.jsonl"]
}
KeyMeaning
gpuServerthe optional GPU server (see GPU server); null or absent = off
localProvidersDSH provider ids priced as local ($0, never capped); the GPU server's id is always included. The providers with built-in pricing, anthropic, dashscope, deepseek-account, deepseek-official, github-copilot, google, ollama, ollama-cloud, openai-codex, openrouter and xai, are never treated as local even if listed here
hub.allowedOriginsextra exact origins allowed to call the host API (see Security model)
priceModelsup to 50 provider/model ids (the model part may contain /; at most 120 characters) always shown in the Costs panel, besides models you actually used
plansprepaid monthly credits per provider, e.g. {"ollama": {"name": "Pro", "includedUsd": 60, "resetsOnDay": 9}}. See Plans
subscriptionsprovider ids declared as subscription-billed ($0 charged, API value kept, never capped). The Costs panel and dsh-hub prices label them "declared in config.json" so a typo is visible. A provider also in localProviders stays local
extraLedgersother spend ledgers (JSONL rows with ts, usd, optional provider) shown next to DSH's spend, display only

Other files in the data dir: spend.jsonl (ledger), caps.json, prices.json (price overrides), prices.litellm.json (24 h price-table cache), ollama-prices.json (refreshed Ollama Cloud rates), accounts-state.json, provider-health.json.

Environment variableEffect
DSH_HUB_DATA_DIRdata dir override
DSH_HUB_URLwhere the CLI reaches the host API (default http://127.0.0.1:8185)
DSH_HUB_ALLOWED_ORIGINSextra UI origins, comma-separated
DSH_NODE_MODULESthe installed @deepseek-ai/dsh package's node_modules, if not auto-found
DSH_HUB_GPU_URL, DSH_HUB_GPU_NAMEGPU server URL / name override (ROCCO_SHIM_URL is accepted for back-compat)
DSH_HUB_EXTRA_LEDGERSextra ledgers, comma-separated absolute paths (overrides extraLedgers)
DSH_HUB_PRICE_FALLBACKan offline LiteLLM price-table file used when the network fetch fails
DSH_HUB_REFRESH=0account watchdog reports only, never refreshes