dsh-subagent-model-picker
Agent 与会话 活跃维护

dsh-subagent-model-picker

Zim9729/dsh-subagent-model-picker

按会话独立为子代理选择模型,支持在编辑器里指定任意已配置的模型服务商,也能自动跟随主代理模型,精细调节每轮对话的成本与输出风格。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
52 KB
仓库大小
3 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:Zim9729/dsh-subagent-model-picker
git clone https://github.com/Zim9729/dsh-subagent-model-picker.git
git clone git@github.com:Zim9729/dsh-subagent-model-picker.git
README.md main

dsh-subagent-model-picker

Per-conversation subagent model selection for DeepSeek Harness Desktop.

中文文档

Features

  • Adds a "Subagent Model" selector beside the conversation composer.
  • Lists all configured provider/model pairs from the llm-pi-ai settings.
  • The default option ("Follow main agent") mirrors the main agent's current model in real time.
  • Applies the selected provider/model to subagent, subagent_fork, and workflow child agents.
  • Keeps the override at the root conversation when a child session is addressed.
  • Restores the override after restart from the DSH home storage directory.
  • Provides the subagent_model_ctl model tool with get, set, and clear actions.
  • Uses a same-origin loopback API with session, model, method, and request-size validation.

Install

CLI

dsh plugin --profile desktop add @zim9729/dsh-subagent-model-picker@0.2.0

DSH Web

Open the DSH web GUI (e.g. http://127.0.0.1:43120), go to Settings → Plugins, search for dsh-subagent-model-picker, and click Install. The web plugin manager resolves the package from npm and adds it to the active profile automatically.

After installation (either method), restart DSH when prompted. The package declares both dsh.bundle.patch and dsh.client, so the Host and browser entries mount automatically. Do not add a duplicate row to the profile's cordis.patch.yml.

How It Works

Selection Subagent model
Follow main agent (default) Mirrors the main agent's current provider/model
A specific provider/model pair Uses the selected pair for all child agents in this conversation

The main agent's model is always controlled by the GUI model selector and is not affected by this plugin.

Storage

Overrides are stored in:

<DSH_HOME>/storages/subagent-model-overrides.json

The file contains a versioned JSON object keyed by root conversation session ID. Invalid or stale records are ignored and removed when the corresponding session is disposed.

Compatibility

Targets DSH 0.1.1-rc.2 service contracts and Node.js 20 or newer. The package uses DSH peer dependencies rather than bundling the Host runtime.

Development

npm install
npm run check
npm pack

npm run check builds the distributable JavaScript files, runs all tests, and performs an npm dry-run package check.

Publishing

  1. Push this repository to GitHub.
  2. Run npm publish --access public from a clean tagged commit.
  3. Submit the npm package/repository URL to the DSH plugin center registry.

The plugin center catalog and npm publication are separate operations.

Security

The local API accepts only loopback same-origin browser requests. Model credentials are never read or returned by this plugin.