dshbase

插件目录 / Developer / dsh-model-gate

dsh-model-gate

未验证 OPaimon

✓ 持续维护 2 位贡献者 基于 5 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

0Stars
0Forks
0未关闭 issue
语言
2026-08-23最近推送
跨平台平台

功能简介

Developer 类别的 DeepSeek Harness 插件。

我们的评价
未验证 — 尚未实测

Developer 类别的 DeepSeek Harness 插件。 尚未验证——请自行安装测试。

「未验证」表示我们的自动化 CI 尚未安装过该插件。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

你是插件作者? 想拿到「已验证」标签——提交你自己的验证证据(截图、日志或短视频),我们审核通过后即改为「已验证」。

提交验证证据 ↗

README

dsh-model-gate

English | 中文

Single-model disable gate for DSH. Deny whole provider routes or exact
provider/model pairs - denied models disappear from every discovery path and
any dispatch that still reaches them terminates with an in-protocol
MODEL_DISABLED error chunk.

Non-destructive by design: nothing in your provider configuration or
credentials is touched. The denylist is an independent overlay; removing an
entry (or the plugin) restores everything exactly as it was.

Screenshots

Settings panel — the「模型门禁」section reads the UNFILTERED catalog through
the plugin's own typert service: one collapsible group per provider, one switch
per model row, enabled-count badge on the group header.

Model gate settings panel

Discovery hiding — deny a model and it disappears from the web selector and
every other discovery path; the current selection clears with it.

enabled denied
Picker with the model enabled Picker with the model denied

Dispatch backstop — a turn that still reaches a denied model (subagents,
session titles, stale references) ends with the in-protocol MODEL_DISABLED
error chunk; no network request is issued.

Dispatch blocked with MODEL_DISABLED

Install

From npm - one command:

dsh plugin --profile web add dsh-model-gate

Or from a Release tarball -
download dsh-model-gate-<version>.tgz, unpack it, and point the official
installer at the unpacked directory (the tgz ships prebuilt lib/, so no build
step and no pnpm allowBuilds prompt):

tar -xzf dsh-model-gate-0.1.2.tgz    # -> ./package/
dsh plugin --profile web add ./package

Then restart DSH once so the bundle layer picks up the new entry. Every
denylist edit afterwards hot-applies through settings - no further restarts.
Verified against DSH 0.1.x-rc.

Usage

Edit the denylist section in ~/.dsh/settings.yaml - changes hot-apply, no
restart:

llm-model-gate:
  disabledProviders:
    - openrouter
  disabledModels:
    - "*/kimi-k2.7-code"        # deny this model id on every provider
    - "token-rhythm/glm-5"      # deny one exact provider/model pair

Matching is exact and case-sensitive. A disabled provider route hides all of
its models. Model ids listed with a * + slash prefix are denied on every
provider, including dedicated routes (e.g. DeepSeek direct) that accept
explicit directory-external ids.

Settings UI

The web settings page has a dedicated「模型门禁」section (one collapsible group
per provider, one switch per model row). The panel reads the UNFILTERED
catalog through the plugin's own typert service, so currently denied models
render as off and can be turned back on; toggling writes the denylist through
the same hot-apply settings chain as manual YAML editing.

Row-state notes:

  • A row is off when its exact pair, a */model star rule, or the whole
    provider route denies it; the reason is tagged on the row.
  • Turning a star-denied row back on removes the covering star rule for every
    provider (the denylist has no per-provider exceptions); the panel re-renders
    from the returned state, so affected rows visibly flip together.
  • Provider headers show an enabled-count badge; row switches are authoritative.

Semantics

  • Discovery (primary): the web selector, session.models / llm.models
    catalogs, task_models, and API request validation all read the filtered
    view - a disabled model behaves as if it had never been configured.
    Re-enable and it reappears on the next refresh.
  • Dispatch (backstop): any path that still dispatches a denied model -
    subagents, session-title, custom routing, explicit ids - is stopped at the
    public llm/stream waterfall with a single terminal
    finish{kind:"error", code:"MODEL_DISABLED"} chunk. The turn ends with a
    normal model error; no network request is issued.
  • If the disabled model is the current session or default model, the next
    request on it fails; nothing switches automatically. Failover-style plugins
    listening on agent/request-error compose naturally.

Boundaries

  • Vision-router clones are separate route keys: disabling openrouter does
    not disable openrouter-vision - list both if you want both.
  • Providers stay installed; only their public listing is filtered. Provider
    configuration surfaces (adding/editing providers) are unaffected.
  • Bypassing the DSH LLM service entirely (direct HTTP) is outside DSH.
  • Uninstalling removes the bundle entry; the plugin restores the native
    listProviders/listModels methods on unload with zero residue. A
    leftover denylist section in settings.yaml is harmless.

License

MIT. An independently distributed plugin: DSH itself is untouched
and keeps its own license.

Development

bash scripts/build.sh     # requires DSH_CHECKOUT or ~/dsh-harness; also shims node_modules/.bin/tsdown
npm run build:client      # bundle src/client/main.tsx -> lib/client.js (ModuleLoader wrapper)
npm test                  # unit tests (node:test) against lib/ - run the build first on a fresh clone

Tests import the compiled lib/ outputs (relative ESM imports in source need
tsc's .js rewriting, which node's type stripping does not perform), which
resolves the host packages through the symlinks that scripts/build.sh
creates - run the build first on a fresh clone.

Inside a super-injector environment: dev_inject_plugin <this dir> then
dev_reload_package to iterate without restarting.

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-model-gate」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:OPaimon/dsh-model-gate

Headless(CLI)profile:

dsh plugin --profile headless add github:OPaimon/dsh-model-gate

实测报告

尚未 L3 验证——若已跑过,见下方失败备注。

状态:pending · 最近测试 2026-08-27
备注:验证: runtime-fail 浏览全部待验证失败 →
安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7795 个插件 →