前言¶
DeepSeek Harness (DSH) 提供了原生的子代理調用能力,包括 subagent 和 subagent_fork。原生實現通常繼承父級的模型路由策略,缺乏針對單次調用的細粒度控制,例如指定特定模型或推理力度(如 xhigh)。
dsh-task-models 插件旨在增強 DSH 的原生子代理工具,允許在調用時指定具體的模型和推理力度,同時保持 DSH 的原生兼容性。
插件概況¶
- 名稱: dsh-task-models
- 維護者: TTTPOB
- 許可: MIT
- 核心價值: 增強
subagent和subagent_fork,支持按需選擇模型和推理力度。
安裝與啓用¶
使用以下命令安裝插件。安裝後需重啓 dsh web 以加載新配置。
dsh plugin --profile web add dsh-task-models@https://github.com/TTTPOB/dsh-task-models/releases/download/v0.2.0/dsh-task-models-0.2.0.tgz
核心功能與用法¶
插件覆蓋了原生工具,增加了 model 和 reasoning_effort 參數。
subagent 工具¶
使用 spawn provider 創建子會話。默認爲後臺可繼續的會話,也可設置爲前臺一次性執行。
subagent({
description: "Review authentication",
prompt: "Review the authentication flow and report correctness issues.",
model: "opencode-go/deepseek-v4-pro",
reasoning_effort: "xhigh",
})
subagent_fork 工具¶
使用 fork provider 繼承父會話已完成的對話輪次。模型和推理力度的選擇邏輯同 subagent。
subagent_fork({
description: "Verify prior analysis",
prompt: "Check the previous conclusion and identify counterexamples.",
model: "opencode-go/deepseek-v4-flash",
reasoning_effort: "high",
})
task_models 發現工具¶
用於查詢 provider 下的可用模型及其支持的推理力度。
task_models({ provider: "opencode-go", query: "deepseek" })
行爲說明與兼容性¶
- 參數選擇: 插件支持
model和reasoning_effort參數。若不傳參數,則繼承調用方當前路由和顯式 effort。若指定reasoning_effort: "default",則清除 fork 歷史中的顯式 effort,重新解析模型默認值。 - 依賴限制:
reasoning-effort注入依賴 DSH 本地的 Agent Loop,因此適用於spawn和fork。對於 ACP、Codex、Claude Code 等外部進程 provider,需要各自實現遠程協議支持。 - 版本變更: v0.2.0 版本刪除了獨立的前臺
task工具,該功能已合併增強至subagent和subagent_fork中。建議直接使用subagent並設置run_in_background: false。 - 官方狀態: 該插件已被官方廢棄,DeepSeek Harness 原生已支持類似功能。請根據實際 DSH 版本確認是否需要此插件。
總結¶
dsh-task-models 提供了精細化的子代理模型控制能力。雖然已被官方支持取代,但在特定版本或配置下,它仍是一個增強 subagent 行爲的實用工具。