dsh-jev-subagent-dispatch: Routing Routine Tasks to Low-cost Sub-agent Models via Jev

Preface

When running agents in DeepSeek Harness (DSH), the primary model often has to write code while also judging in every turn whether “this kind of work should be handed off to a subagent and which model route to use.” The latter itself consumes tokens, yet for tasks like renaming, formatting, researching, or fixing minor bugs, a cheaper sub-model is often sufficient. The community plugin dsh-jev-subagent-dispatch (maintainer vitas, SkillHub category: Model Inference) takes a different path: it uses TypeSafe’s Jev decision model to answer several structured questions within milliseconds, then provides a dispatch recommendation based on your configured routing strategy (suggesting which subagent model should take over). The primary model still completes the handover via DSH’s native subagent tool; the plugin itself does not implement the delegation mechanism but injects suggestions rather than enforcement.

What is this

dsh-jev-subagent-dispatch is a Jev-guided subagent routing plugin for DeepSeek Harness. Jev is not a chat LLM, nor does it write code; it answers typed questions like choice / score / noul in parallel and returns probabilities and confidence. The plugin sends the current turn’s task summary to Jev, applies the strategy from profiles, and appends routing suggestions to the message. The current npm package version is 0.8.0, license MIT, requiring Node ≥ 22.

Core Features

Division of Labor and Prerequisites

The plugin is not responsible for providing subagent capabilities. DSH requires a “three-piece setup”: the subagent service, the backing child provider, and the delegation tools visible to the agent (e.g., subagent / subagent_fork); delegation is completely disabled when the delegation depth is 0. Every routing request re-checks these capabilities at runtime, without relying on installation-time snapshots.

The Subagent plugin must be enabled; otherwise, you may still get classification conclusions, but there will be no executable delegation target. The settings card reads the Subagent-related namespaces and warns if they are missing.

The models written in the routes must be within the session’s allowlist; otherwise, classification may still “look normal,” but dispatching will fail in reality. The settings page provides dropdowns for each role, with options limited to models in the allowlist.

Task Categories and Default Routes (auto profile)

Jev Task Class Role Built-in Example Route Auto Delegation?
mechanical junior openrouter/qwen3.8-flash Yes
bugfix implementer openrouter/deepseek-v4-flash Yes
research researcher openrouter/qwen3.8-flash Yes
review reviewer openrouter/qwen3.8-flash Yes
refactor, feature_work, meta_chat — — No (Not present in profiles.*.delegate.taskClass)

The stricter careful profile delegates only mechanical by default. routeFor maps task classes to roles, while routes maps roles to { provider, model }; the built-in routes are placeholders and should be changed to models actually available in your environment within the card.

Operating Modes

The default is mode: off, where no listeners are registered and no calls are generated. Three modes:

Mode Behavior
off No pre-step listener, zero Jev cost
once Only calls Jev on turns with a trigger prefix
auto Potentially classifies every normal user message (recommended only after proving effectiveness via verdict logs)

Trigger prefixes are configurable via triggers, defaulting to ["/route", "/jev"]. Examples:

/route fix the failing tests        → One Jev call + routing suggestion
/jev should I delegate this?        → Free-form decision request to rubric
/route preview rename everything    → Evaluate only, do not delegate based on this (preview)

Suggestions are not mandatory execution: the primary model may ignore them. The README recommends measuring impact first using Measuring impact before relying on it daily.

Capability Checks and Failure Behavior

When capability checks fail: explicit /route requests inject diagnostics and do not call Jev; normal auto turns are completely silent. When Jev calls fail: /route injects a line of diagnostics; normal turns are also silent. Session or plugin changes take effect on the next request, with no startup cache.

Privacy and Observability

State sent to TypeSafe is redacted before leaving the machine: mainly the user turn text and truncated workspace: lines (default total package limit stateChars 1200), excluding diffs, tool outputs, or full file contents. Built-in patterns replace credential-like strings such as sk-…, ghp_…; logDir and logTurnText control whether to persist to disk and whether to log the original turn text.

Installation and Activation

Add the plugin under the web profile (commands from the official README):

dsh plugin --profile web add /path/to/dsh-jev-subagent-dispatch   # local checkout
# or, once published:
dsh plugin --profile web add dsh-jev-subagent-dispatch

Note: The host side resolves the optional peer @deepseek-ai/dsh-llm via the running DSH; a link: development directory behaves the same as an installed copy when it lacks its own node_modules.

Next, prepare API Keys according to the provider presets (resolved before every call: credential storage takes priority, followed by process environment variables):

provider Jev Endpoint (Preset) Fixed Model Key Env Var Name
typesafe (default) https://api.typesafe.ai/v1/systemone jev-1.13.0 TYPESAFE_API_KEY
openrouter https://openrouter.ai/api/v1/systemone jev-1.13 OPENROUTER_API_KEY
bai https://api.b.ai/v1/decisions jev-1.13.0 OPENROUTER_API_KEY

If the Models page already stores credentials with the same name, you usually don’t need to set environment variables; if using environment variables, they must be visible to the process running dsh web. In once mode, no data is sent to Jev before a trigger is sent.

If you have no Key, you can set mock: true for wiring tests: it returns mock classifications with fixed confidence based on keywords, facilitating the inspection of injection and thresholds, but should not be used for real routing.

Typical Usage

  1. Enable the Subagent plugin and subagent provider, and confirm the agent can see subagent (or the custom tool name you declared in delegationTools).
  2. Install this plugin, set mode to once or auto in the Plugins settings page or the plugin’s Configure form, and select models for each role according to the allowlist.
  3. Try it out in once mode first:
/route fix the failing tests
  1. When you only want to see the classification without automatic delegation:
/route preview rename everything
  1. After enabling logDir, each verdict appends a line of NDJSON, facilitating comparison of latencyMs, usage, and the tokens saved by the primary model to adjust confidenceMin and profile predicates.

Common configuration items (see README table for default values): activeProfile (auto / careful), timeoutMs (default 4000), skipSubagentSessions (default true, routes only primary agent turns).

Use Cases and Notes

Suitable for: Developers who already combine Subagent and sub-model allowlists in DSH, wish to direct identifiable tasks like mechanical / bugfix / research / review to cheaper models, and are willing to iterate on strategies using verdict logs.

Notes:

  • The plugin runs with the permissions of the current DSH process; before installing, please read the GitHub source code and the MIT license, and evaluate whether sending task summaries to TypeSafe / OpenRouter / B.AI complies with your requirements; for sensitive repos, set enabled: false or keep mode: off.
  • Pure ESM, no runtime npm dependencies; development tests target DSH 0.1.5, 0.1.7, 0.2.0 (web profile). The settings UI renders inline within the package page for 0.1.7+, while 0.1.5 uses the Plugins settings tab.
  • SkillHub (https://www.skillhub.cn) is a community plugin directory and has no official affiliation with DeepSeek / High-Flyer; the DSH ecosystem emphasizes “everything is a plugin,” and this plugin serves as an optional routing layer within it.

Conclusion

dsh-jev-subagent-dispatch uses Jev to perform the lightweight decision of “who does it, which sub-model to use” for the primary model, leaving expensive tokens for non-delegated categories like refactor and feature work; the prerequisite is that the Subagent stack is ready and you have verified the suggestion quality via logs. For further information and issue feedback:

  • SkillHub Directory Page: https://www.skillhub.cn/plugins/vitas/dsh-jev-subagent-dispatch
  • GitHub: https://github.com/vitas/dsh-jev-subagent-dispatch
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye