dsh-subagent-model-director: Smart Tiering and Concurrent Dispatching Model for Subagents

Introduction

When using subagents in DeepSeek Harness (DSH) to parallelize task decomposition, the common practice is to use the same sub-model for all tasks or rely on manual specification of the provider/model. However, task complexities vary, and model throughput differs. Mixing simple retrieval with deep reasoning in the same tier either wastes expensive model compute or causes queuing on advanced models. The following introduces the community plugin dsh-subagent-model-director (maintainer: fred-chen): it injects “Model Profiles (Intelligence Level + Concurrency) + Complexity Criteria + Allocation Strategy” into the parent session and provides batch assignment tools, enabling the parent session to select models for each delegation according to rules.

What is this

dsh-subagent-model-director is a bundle plugin for DSH, positioned to select models for each subagent based on intelligence grading and concurrency. The parent session’s current model is responsible for judging task complexity; the plugin injects the profile table and strategy into the parent session’s system prompt and registers subagent_assign_model, supporting batch and concurrency-aware assignment.

In classification, it belongs to the “Model Inference” category. The repository is on GitHub, and the community directory page is on SkillHub. SkillHub is an independent community directory and has no official affiliation with DeepSeek or HFTC (High-Flyer).

Core Features

Model Profiles

Each profile selects a provider/model from the DSH global “Subagent → Model selection” allowlist and configures the following:

Attribute Description
Intelligence Level High (Deep reasoning/planning/design/creation) · Medium (Code analysis/review/inference) · Low (Retrieval/organization)
Concurrency Number of tasks that the model can run simultaneously; once full, it falls back to the next level
Reasoning effort Optional; if left blank, the selected model’s default level is used
Enabled Disabled profiles do not participate in allocation

Profiles can only use models from the global allowlist; this is validated during both saving and runtime. If the list changes, mismatched profiles will be highlighted in yellow on the settings page and skipped at runtime.

Assignment Strategy (Since v0.3.2)

Models are classified solely by intelligence level (High/Medium/Low), no longer relying on legacy fields like tags/speed/loadBalancing (after upgrading, legacy fields will be ignored, profiles are retained with default concurrency of 1; saving once on the settings page can clean up outdated configurations):

  1. High-Level Priority: High-level models can undertake low-level tasks; by default, they are assigned to the “highest available” model.
  2. Hard Tasks First: During batch parallelism, the parent model judges complexity as High/Medium/Low. Difficult tasks occupy high-level slots first, while simple tasks are deferred.
  3. Full Load Fallback: If a level reaches maximum concurrency → move to the next level.
  4. All Full: If task count exceeds the total concurrency of all models → allocate remaining tasks based on difficulty and each model’s concurrency share.
  5. Keyword Rules (Optional): If task text hits a keyword, prioritize assigning to a specific target profile (when slots are available; multiple rules follow priority order).

Complexity criteria are written into the parent session prompt, for example: Architecture plans, complex designs → High; Code review, root cause investigation → Medium; Retrieval, formatting/organization → Low.

Three-Layer Decision

Layer Who Decides Where
Main Path Parent Session LLM Reads injected profile table and strategy, fills in provider/model/reasoning_effort itself
In-Session Fallback LLM + subagent_assign_model Passes planned delegations in batch; the tool returns routing based on strategy and updates concurrency counts
Settings Page “Assignment Test” Pure Code Uses the same allocation kernel as Layer 2 to preview the rule chain (no LLM calls, no concurrency counting)

Concurrency counting is based on subagent_assign_model calls (30-minute half-life, process memory, reset on restart); direct delegations not going through the tool are not counted, primarily affecting load balancing rather than routing correctness.

Other Components

  • Settings Page: Sidebar Plugins → subagent-model-director → Configure, reads/writes configuration via /api/dsh-subagent-model-director/*.
  • System Prompt Section subagent-model-director:profiles: Profile table, criteria, strategy, keyword rules; guidanceMode supports concise/detailed/off.
  • Core logic is in lib/core.js (pure functions, README claims coverage by 53 scenario unit tests).

Note: subagent_fork cannot select sub-model routing; assignment works for subagent (like spawn) that supports agentOptions. The plugin runs under the current DSH process permissions. It is recommended to review the source code and the MIT license before installation.

Installation & Activation

Requirements: DeepSeek Harness ≥ 0.1.7-rc.1 (depends on host settings bridge, tools API, and subagent composition). Node ≥ 20.

  1. Sidebar Plugins → Install (Install bundle);
  2. Input:
github:fred-chen/dsh-subagent-model-director

(Or https://github.com/fred-chen/dsh-subagent-model-director.git)
3. Enabled by default after confirming installation.

Method 2: CLI

dsh plugin --profile <YourProfileName> add github:fred-chen/dsh-subagent-model-director

Method 3: Manual pnpm

cd ~/.dsh/profiles/<YourProfileName>
pnpm add github:fred-chen/dsh-subagent-model-director

And add dsh-subagent-model-director to dsh.profile.bundles in that profile’s package.json.

It is recommended to restart DSH after installation and confirm subagent-model-director is enabled on the plugin page.

Configuration Steps

  1. Settings → Plugins → Subagent → Model selection: Enable and check the models allowed for subagent use (profiles for this plugin can only be selected from this list).
  2. Plugins → subagent-model-director → Configure: Add profiles (provider/model, intelligence level, concurrency, optional reasoning effort); optional keyword rules and prompt injection mode.
  3. Assignment Test at the bottom of the page: One task per line. Use high:/medium:/low: prefixes to indicate complexity. This is a pure code simulation and does not call the LLM.
  4. Takes effect in new sessions after saving; the parent session system prompt will contain the profile table and allocation strategy.

Update bundle example (from README):

pnpm add github:fred-chen/dsh-subagent-model-director#main

Restart DSH. Once published to npm, you can also use pnpm add dsh-subagent-model-director@latest.

Typical Usage

Before the parent session batch spawns subagents, the strategy suggests calling subagent_assign_model first, passing in all planned delegations (including task descriptions and complexity), and then delegating after adopting the provider/model/reasoning_effort returned by the tool for each task.

Use Assignment Test during the configuration phase to verify the rule chain, for example with multi-line tasks:

high: Design cross-service authentication scheme
medium: Review SQL injection risks in PR
low: Organize installation steps in README

After saving the configuration and starting a new session, the parent model fills in the routing for real subagents based on the injected criteria and profile table.

Use Cases

  • Parallelizing various subagents within the same parent session, hoping that hard tasks occupy high-level models and simple tasks occupy low-tier models, constrained by concurrency limits.
  • Multiple models already configured in DSH and allowed in Subagent Model selection, requiring configurable profile tables + prompt injection + tool fallback rather than manually writing model parameters every time.
  • Need for strong keyword signals to pin a specific type of task to a designated profile (when slots are available).

Less suitable for: Processes that only fork subagents, do not spawn, and rely on KV prefixes to reuse the same model; or minimalist environments where subagents only allow a single fixed model.

Conclusion

dsh-subagent-model-director transforms subagent model selection from “everything in the same tier” to a repeatable rule of “Profiles + Complexity + Concurrency”, landing in three places within DSH: Settings Page, System Prompt, and subagent_assign_model. Directory and Documentation:

羽毛球分组比赛记分
小程序二维码

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

Xiaoye