DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Plugin Team Model Routing — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
P

dsh-plugin-team-model-routing

Plugin Team Model Routing

让 Agent Teams Lead 选择其生成的每位队友所使用的提供商、模型和推理力度。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:Lingrui98/dsh-plugin-team-model-routing#1a1801e551736fe2c457cc7d2b6b05708e732a01
README兼容性版本

兼容性与来源证明

Plugin Team Model Routing 以 dsh-plugin-team-model-routing 发布,当前版本为 1.0.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/10/15

版本

1.0.0stable
2026/10/15

相关插件

正在加载相关插件…

最新版
1.0.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/10/15
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 models-usage 分类下经过校验的插件。

Whale Widgetdsh-whale-widgetDSH Web 界面右下角的 DeepSeek 余额小鲸鱼挂件:余额/今日已用/峰谷定价、自定义泡泡点击序列(文本/余额/今日/峰谷/图片/随机语句与并列加权选择)、逐行样式与字体、悬浮快捷编辑、音效与每轮消耗、自定义角色/动图/音效、吸附与翻转自定义Usage@linxin666/dsh-usage用于 dsh Web GUI 的使用统计插件:检测各提供商的余额和编程套餐配额,并实时记录令牌使用情况;侧边栏 Settings 行上方显示紧凑的价格概览卡片Client Ui Model Capabilities@linxin666/dsh-client-ui-model-capabilities为自定义 pi-ai 提供商声明每个模型的能力(图像输入和推理力度),可直接在 Models 设置卡片中编辑;写入官方 llm-pi-ai 设置命名空间,不更改 DSH 源代码。Codex Subscriptiondsh-codex-subscription通过 OAuth 在 DeepSeek Harness 中使用 ChatGPT 和 Codex 订阅,支持配额管理、安全重置、网页搜索、图像和快速模式

README

Team Model Routing (dsh-plugin-team-model-routing)

Let an Agent Teams Lead choose the provider, model, and reasoning_effort of each teammate it spawns, validated against the Subagent model-selection allowlist.

Why it needs a plugin

spawn_teammate (shipped) carries no route fields, and ctx.agentTeams.spawnTeammate() forwards only a provider name to ctx.subagents.startContinuable(), which is where agentOptions live.

A teammate is a continuable child: the continuation registry materializes it through ctx.agents.create() and never calls a subagent provider's start(). So wrapping a subagent provider (the obvious first idea) can never route a teammate — the wrapper is simply never asked to start it, and the teammate silently ends up on the inherited route.

The seam that works

spawn_teammate_routed            record route by (Lead, teammate name, context)
        ↓
agentTeams.spawnTeammate(...)    shipped Team service, unchanged contract
        ↓
ctx.agents.create()              child materialized; initial prompt queued to inbox
        ↓
agent/pre-step (child scope)     ← plugin: claim route, rewrite child.options
        ↓
AgentLoop.prepareRequest()       reads this.options → request/header + assistant
                                 message source + every later step

Two facts make this work, both verified in the installed sources:

  • agent/pre-step is an awaited waterfall that runs before step() → prepareRequest() (dsh-agent-loop/lib/index.js:902-925 → 978 → 1050).
  • prepareRequest() reads this.options on every step (dsh-agent-loop/lib/index.js:1168-1173), and the loop and the Agent object share one options reference (:774, :1739).

The order matters in the other direction too: the child's initial prompt is submitted after creation and the loop appends it to the transcript only inside that first step, so the teammate name must be read from the step's claimed messages (payload.messages), with the transcript as a fallback for a resumed teammate. Reading the session snapshot at agent/created time finds nothing — that was the first implementation's fatal flaw.

Tools

ToolPurpose
spawn_teammate_routedSame contract as spawn_teammate, plus provider / model / reasoning_effort. Omit all three to inherit the Lead route.
list_teammate_modelsLists selectable providers, then selectable models for one provider, then that model's reasoning efforts.

Both are installed in the Lead's own Agent scope (never globally), so teammates do not see them.

Allowlist

When @deepseek-ai/dsh-tool-subagent/model-selection-settings is enabled: true, explicit routes outside allowedModels are rejected before the teammate is created. Pure inheritance is never restricted. An enabled but empty allowlist makes every route unselectable rather than failing inheritance.

The route is also validated through llm.resolveCallConfig(), so an unknown model or an unsupported reasoning effort fails with the adapter's own message instead of surfacing later as a failed turn.

Config

- id: team-model-routing
  name: 'dsh-plugin-team-model-routing'
  config:
    toolName: spawn_teammate_routed
    listToolName: list_teammate_models
    freshProvider: spawn
    forkProvider: fork
    routeTtlMs: 120000

freshProvider / forkProvider are the provider names handed to the shipped Team service; they must name registered subagent providers (spawn, fork).

Known limits

  • The route is process-local. It lives in the plugin's memory, so it applies while the child is created in this process. A teammate cold-resumed after a Harness restart falls back to the agentOptions recorded in its subagent/descriptor. Making that survive a restart needs a durable record and is the natural follow-up.
  • agent.options is a runtime object, not part of the public Agent interface. The rewrite is the reason this stays a plugin rather than a one-line change; upstream, the clean fix is to let the provider contribute agentOptions through ContinuableCreateSpec (or to accept agentOptions on the team spawn request). The upstream repository does not accept external PRs — publish this as a dsh-plugin, and raise the API gap in Discussions.
  • A recorded route that is never claimed (a spawn that failed before the child existed) expires after routeTtlMs and is harmless.

Test

node packages/team-model-routing/test/logic.test.mjs

18 checks over route validation, allowlist enforcement, discovery rendering, the claim store, and teammate-name extraction. It covers logic.js only — the agent/pre-step seam itself needs a live run.

Install

Published as dsh-plugin-team-model-routing on npm, source at Lingrui98/dsh-plugin-team-model-routing.

npm install dsh-plugin-team-model-routing

or point the plugin manager at the installed package or a workspace directory:

plugin_manager({ action: 'install_bundle', target: 'dsh-plugin-team-model-routing' })

Installing loads the module once; because Node caches ES modules by resolved path, replacing this package's code requires a Harness restart to take effect in a running process.

Repository layout

index.js            Cordis Host plugin: tools, routing hook, Provider wiring
logic.js            dependency-free routing/claim logic (unit-tested)
cordis.patch.yml    Loader patch: this row + the tool-agent-team config
locale/{en,zh}.json Plugin Manager display metadata
test/logic.test.mjs the 18-check logic suite (not shipped in the npm tarball)

npm pack ships index.js, logic.js, cordis.patch.yml, icon.svg, locale/*.json, LICENSE, and both READMEs.

Verified live

Observed on the desktop profile, 2026-10-15, with the profile's subagentModelSelection allowlist enabled:

CheckEvidence
Route reaches the childspawn_teammate_routed({ provider: 'model-server', model: 'glm-5.3', reasoning_effort: 'high' }) → host log team-model-routing: teammate "confirm-route" now runs on model-server/glm-5.3 (effort high), and list_agents reported that teammate as model: "glm-5.3" while the Lead was gpt-6.1-sol and the profile default is bosc/deepseek-flash.
list_agents reads the applied routelist_agents shows the rewritten model for the routed teammate, and gpt-6.1-sol (the inherited route) for teammates created before this plugin existed.
Allowlist rejects before creationspawn_teammate_routed({ provider: 'bosc', model: 'gpt-5.6-luna' }) → Error: teammate LLM route "bosc/gpt-5.6-luna" is not allowed by the Subagent model-selection allowlist; allowed: model-server/glm-5.3, kimi-code/k3, bosc/gpt-5.6-sol, model-server/kimi-k3, bosc/deepseek-flash — no teammate was created.
Both tools are live in the Lead scopeTool.listTools lists spawn_teammate_routed (with provider/model/reasoning_effort) and list_teammate_models.

Not covered by the live run: the fork context, and route survival across a teammate cold-resume (see Known limits).

Releasing a new version

The package is dsh-plugin shaped: dsh.bundle.patch points at cordis.patch.yml, the manifest carries display meta, icon.svg, locale/{en,zh}.json, and it is type: module. To release:

  1. Bump version in package.json (npm rejects a re-publish of an existing version).
  2. node test/logic.test.mjs — 18 checks must pass.
  3. npm pack --dry-run — confirm the tarball is the 10 files listed under Repository layout.
  4. npm publish — the npm account has 2FA enabled, so pass --otp=<code> or use a granular token with bypass 2FA enabled. When a code is needed, ask for one interactively rather than storing it.
  5. git commit and git push the release.
  6. If the package name ever changes, update the name: line in cordis.patch.yml to match — the Loader resolves the row by that string.

Inviting the upstream fix

The agent/pre-step rewrite in this package is a workaround for a missing upstream extension point: a continuable-subagent provider cannot contribute agentOptions, because the provider's start() is never called for continuable children. If that gap is closed, this package keeps its tools and drops the workaround.

The upstream repository does not accept external PRs, so the way to raise it is a GitHub Discussion. Ready-to-post write-ups live in the workspace's proposal/ directory (they are not part of the npm tarball):

  • proposal/discussion-post.zh.md — the post itself (Chinese, copy-paste).
  • proposal/upstream-continuable-agent-options.zh.md — full proposal with the exact code paths and test points.
  • proposal/upstream-continuable-agent-options.md — the same in English.

Post it in deepseek-ai/deepseek-harness → Discussions → Show Your Plugins! (to introduce this package) or Ideas (to raise the API gap). Note that a Discussion there needs write permission on that repository, which an outside contributor does not have — the prepared text is meant to be pasted by a human.