Electricitysheep/dsh-tool-turbo 预览 preview

Electricitysheep/dsh-tool-turbo

插件Plugin 原生Native ⭐ 7 工具Tools

DeepSeek Harness(dsh)的逐轮推理努力优化器:自动降低简单工具链中工具调用推理的强度,并在面对繁重任务时自动提升。减少工具调用之间的思考时间。

项目介绍Project Overview

dsh-tool-turbo 是 DeepSeek Harness 工具链加速插件,通过在每轮工具调用前后动态调整 reasoning_effort 来降低多步代理任务中的推理耗时。它监听步骤内最近工具记录,判定为简单只读类(如 read、grep、write、bash)则切到 low,混合或重型工作保持 high,超大负载可升级至 max。适合长链路工具流。但 max 升级默认关闭,且需通过 cordis.patch 注入 dsh 配置文件,安装略复杂。

dsh-tool-turbo is a DeepSeek Harness plugin that cuts tool-call latency in multi-step agent tasks by auto-tuning reasoning_effort per round. It watches recent tool records: simple, deterministic tools (read, write, grep, bash) drop effort to low; mixed work keeps high; very heavy payloads may upgrade to max. Useful for long tool chains where reasoning dominates wall-clock time. Caveat: the max upgrade is opt-in and installation requires patching the dsh profile via cordis.

或使用命令行安装(适合开发者)Or use CLI install (for developers)

命令行安装CLI Install

dsh plugin --profile web add github:Electricitysheep/dsh-tool-turbo

Electricitysheep/dsh-tool-turbo 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-tool-turbo

Cut tool-call latency in DeepSeek Harness (dsh) by auto-adjusting reasoning_effort per tool round.

中文文档 · English

In a multi-step tool chain, the model re-thinks before every tool call — and that thinking dominates the wall-clock time (a 50-step agent task can spend minutes in reasoning between tools). dsh-tool-turbo watches the recent tool calls of a step and injects the lowest sensible reasoning effort into the next model request, then lifts it again the moment the work gets heavy.

How it works

DeepSeek's API exposes reasoning_effort in three steps (low / high / max, shipped 2026-08-13). dsh re-resolves the request config for every step through an agent/request waterfall (see packages/core/agent-loop/src/agent.ts — "plugins propose the next request config"). dsh-tool-turbo plugs into that waterfall:

  1. Watch the step's recent tool/call records from the session.
  2. Decide: simple, deterministic tools (write, read, grep, glob, bash, fs_*, …) with small payloads → low; mixed/heavy work → high; very heavy payloads → max (opt-in).
  3. Inject the decision into the agent/request config for the next model call of that step.

Long tool chains keep the cheap rounds cheap, and never starve the hard rounds of reasoning.

Install

# 1. clone + build the plugin
git clone https://github.com/Electricitysheep/dsh-tool-turbo.git
cd dsh-tool-turbo && npm install

# 2. register into your dsh profile (web shown; any profile works)
#    ~/.dsh/profiles/web/package.json dependencies:
#      "dsh-tool-turbo": "link:<absolute path to dsh-tool-turbo>"
#    ~/.dsh/profiles/web/cordis.patch.yml:
#      - insert:
#          - id: tool-turbo
#            name: dsh-tool-turbo
cd ~/.dsh/profiles/web && pnpm install

# 3. restart dsh web
dsh web

Verified

  • Injector works in a live dsh instance (log lines from a real run):
[tool-turbo] agent/request: baseline=high calls=[]                    => reasoningEffort=high
[tool-turbo] agent/request: baseline=high calls=[{"name":"write",…}] => reasoningEffort=low
  • 6/6 unit tests on the effort policy (decideEffort): fresh prompt keeps the baseline, simple-tool chains downgrade to low, downgrades respect the user toggle, heavy payloads upgrade to max (opt-in), mixed tools lift to high.
  • tsc --noEmit clean.

Policy (pure, testable)

Recent tool calls Decision
none (fresh prompt) keep user's selected effort
≥75% simple tools, small args, downgrade allowed low
mixed / heavy tools high (when upgrades allowed)
very heavy payloads, upgrade allowed max
otherwise keep user's selected effort

Toggles (settings namespace planned): allowDowngrade (default on), allowUpgrade (default off — keep max conservative), baseline (default high).

Roadmap

  • effort-decision core + waterfall injection
  • per-tool duration telemetry (host log)
  • settings namespace (dsh-settings) for the toggles
  • tool timing surfaced in the UI / agent context
  • profile-agnostic install docs (headless/tui)

License

MIT

上一个 Prev dafy-whale-theme 下一个 Next dsh-gui