中文EN

dsh-plugin-model-capability

model装不上npmMIT

DSH 网页端模型能力管理插件:控制推理档位、上下文与输出上限、输入模态及网关兼容预设,双语界面。

下载量 / Downloads
1,215
测试时间 / Tested
2026-11-06
DSH 版本 / Version
0.2.2-rc.1

安装

dsh plugin --profile web add dsh-plugin-model-capability

沙箱测试结果

阶段结果
1 安装✗
2 列装—
3 挂载—
4 启动—
第一条错误
dsh: initialized profile web at /home/node/.dsh/profiles/web

四阶段在隔离沙箱里跑:安装(有网)→ 列装 → 挂载 → 启动(后三步断网)。

README

dsh-plugin-model-capability

![npm version](https://www.npmjs.com/package/dsh-plugin-model-capability)

![npm downloads](https://www.npmjs.com/package/dsh-plugin-model-capability)

![License](https://github.com/yuioi666/dsh-plugin-model-capability/blob/main/LICENSE)

![GitHub stars](https://github.com/yuioi666/dsh-plugin-model-capability)

![dsh](https://github.com/yuioi666/dsh-plugin-model-capability)

Model Capability Manager — manage the llm-pi-ai provider routes of DeepSeek Harness (DSH Web) from a dedicated Model Capability page in the in-app settings: per-model thinking levels, context window, output cap, input modalities, per-route defaults, gateway compatibility fields, one-click presets, and an EN/中文 switchable UI.

[简体中文说明](./docs/README-zh.md) · Report Bug · Request Feature


Table of Contents

  • [Why this plugin exists](#why-this-plugin-exists)
  • [Screenshots](#screenshots)
  • [Features](#features)
  • [Installation](#installation)
  • [Quick Start](#quick-start)
  • [Uninstall](#uninstall)
  • [FAQ / Troubleshooting](#faq--troubleshooting)
  • [How it works](#how-it-works)
  • [Development](#development)
  • [Publishing](#publishing)
  • [Contributing](#contributing)
  • [License](#license)

Why this plugin exists

DSH stores provider configuration in the active profile's llm-pi-ai.providers entry. Editing profile patches by hand is error-prone, and two classes of problems bite people often:

1. Gateway incompatibility — not every vendor accepts the same protocol dialect. For example Alibaba Cloud (DashScope) in compatible-mode, Moonshot/Kimi, Zhipu/BigModel, MiniMax, Volcengine Ark, SiliconFlow, Baidu Qianfan and other gateways may reject developer role messages or reasoning_effort echoes the way the OpenAI/Anthropic dialects expect. Turning compat.supportsDeveloperRole on against such a gateway produces 400-style errors.

2. Thinking-level wiring — the 7 levels (off / minimal / low / medium / high / xhigh / max) each need a wire value the upstream provider understands (e.g. low → "low" for one vendor, "h3" for another). Max-thinking configs and per-model reasoningEfforts are tedious to author by hand.

This plugin gives you a GUI for all of it, plus one-click presets that bake in dialect-safe configurations (see [Presets](#presets)).

Screenshots

Settings entry · Section overview (EN)

![Settings entry](img/02-settings-nav.png) · ![Section overview EN](img/03-top-en.png)

Model editor (EN) · Gateway compatibility fold (ZH) · Section overview (ZH)

![Model editor EN](img/04-model-en.png) · ![Compat editor ZH](img/05-compat-zh.png) · ![Section overview ZH](img/06-top-zh.png)

Features

  • Per-model editor for every route:
  • name, contextWindow, maxTokens — capacity fields accept plain numbers or K/M suffixes (262144, 256K, 1M).
  • Supports both explicit models lists and DSH 0.1.7 catalog-preserving modelOverrides entries.
  • input modalities — text / image checkboxes with de-duplication.
  • Thinking toggle — switch the whole model between reasoning off and the full 7-level matrix (off/minimal/low/medium/high/xhigh/max), each level with its own wire value. Empty non-off levels are prevented (the Host rejects them), and a one-click fill all levels with the same value button is included.
  • Apply field to all models of the route (name / contextWindow / maxTokens / input / reasoningEfforts).
  • Per-model compat editor (folded away by default).
  • Per-route editor:
  • displayName, baseURL, api (openai-completions / openai-responses / anthropic-messages).
  • Defaults: defaultContextWindow, defaultMaxTokens, defaultInput, reasoning, thinkingBudgets (minimal/low/medium/high), cacheRetention, transport.
  • Route-level compat editor, including DSH 0.1.7 finish-reason, thinking-budget, max_output_tokens, Baseten and vLLM controls, plus an Advanced fold for timeouts, image limits, headers, and raw JSON.
  • Controlled models.dev synchronization:
  • Reads the cache or fetches api.json only when you click Load catalog; Fetch latest catalog explicitly refreshes it. Each local route can be mapped to a models.dev provider or excluded.
  • Shows a dry-run count before writing. Only existing models whose IDs match (case-insensitively) are updated; no route or model is added or removed.
  • name, context limit, output limit, and supported text/image inputs are independently selectable. Reasoning is opt-in because provider wire semantics vary: explicit effort lists are mapped, reasoning: false disables reasoning, and toggle-only/unknown formats preserve the manual value.
  • A validated, compact copy of the last successful catalog is cached in browser localStorage for 24 hours. A failed refresh can use that stale last-known-good catalog; without a valid cache, the operation stops without touching settings.
  • Applying a preview is one revision-fenced settings mutation. Unmanaged and manually edited fields are preserved.
  • One-click presets — 7 built-in recipes plus your own saved presets:

Preset · What it does

Safe gateway · compat.supportsDeveloperRole=false, supportsReasoningEffort=true — for gateways that reject developer role messages (DashScope compatible-mode, Kimi/Moonshot, Zhipu, Mini

…(truncated)

以上内容来自 npm 上的 README,我们只做格式化,不改内容。

版本

npm 上共发布:14,最后更新 2026-09-27

链接

GitHub · Homepage · npm

同类插件