Introduction

In agent development with DeepSeek Harness (DSH), the model’s reasoningEffort parameter determines the depth and cost of reasoning. Fixing it to a single level is often inappropriate: using high for casual chat wastes tokens, while using off for complex tasks may lead to insufficient quality. In addition, peak-hour pricing strategies also need to balance cost and quality.

Plugin Positioning

This is a DSH plugin that automatically decides the model’s reasoningEffort (off/low/high/max) before each LLM call based on the current task content, and applies peak-hour pricing-aware limits. It is maintained by zhangzhenwen1 and categorized under “Model Reasoning”.

Core Features

  1. Automatic Classification and Adjustment: Automatically selects off/low/high/max based on task content (keywords, message length).
  2. Price-Aware Limiting: Recognizes weekday peak hours (09-12/14-18 Beijing Time) and automatically lowers the effort level to reduce cost.
  3. Automatic Error Escalation: If a tool call errors in the current turn, remaining steps are automatically forced to the max level.
  4. Manual Fallback Mechanism: Supports manual control via [effort=...] markers or the GUI, with higher priority than automatic decisions.
  5. Subagent Support: Subagents are treated as max by default, or can be set to off.

Installation and Activation

Install using the official commands:

dsh plugin --profile web add dsh-task-effort
# or install from GitHub
dsh plugin --profile web add github:zhangzhenwen1/dsh-task-effort

After installation, restart dsh web. Configuration can be overridden via the profile’s cordis.patch.yml.

Decision Rules

The plugin reads messages and classifies at agent/pre-step, and applies configuration at agent/request. Priority from high to low:

  1. Explicit Markers: Message contains [effort=off|high|max] (supports low/medium aliases; low maps to off).
  2. Complex Tasks: Matches maxKeywords (e.g., refactor/design/debug/分析/重构).
  3. Continuation Instructions: Matches continuationKeywords (e.g., continue/接着/next) and carries over the previous turn.
  4. Casual Chat: After stripping politeness prefixes (politenessPrefixes), matches offKeywords.
  5. Long Instructions: Message length exceeds longThreshold (default 200).
  6. Short Instructions: Message length is less than shortThreshold (default 4) and there are no signals, carrying over the previous turn.
  7. Default: Uses defaultEffort (default high).

Configuration

Below are the main configuration options:

Key Default Description
enabled true Master switch
providers ["deepseek-official"] Only adjusts requests for these providers
defaultEffort "high" Default level when no signals are present
maxKeywords See source Keywords for complex tasks
offKeywords See source Keywords for casual chat
politenessPrefixes See source Politeness prefixes stripped before matching
continuationKeywords See source Continuation-type instructions
longThreshold 200 If message length exceeds this, set max
shortThreshold 4 If shorter than this and no signals, carry over previous turn
escalateOnError true Escalate to max after in-turn tool errors
costAware true Time-aware: automatically lower the level during peak hours
peakCap "high" Effort cap during peak hours
subagents "auto" Subagent policy: auto/off
notify true Inject explanation when effort changes
log true Print decision logs

Manual Control

  • GUI Model Selector: After manually selecting a model level in the UI, the plugin pauses automatic judgment and respects the manual selection. It resumes automatically after creating a new session or restarting dsh web.
  • Message Markers: Enter [effort=off] or [effort=max] in the message; this has the highest priority and applies only to the current turn.
  • Temporary Disable: Modify enabled: false or remove the patch entry.

UI Visibility

  • The plugin injects <system-reminder> into the conversation to explain the current effort change (including decision reason, level, current time period, and countdown).
  • The capsule next to the model selector displays the actually effective level (Off / Low / High / Max).
  • The Request/header event records actual level changes.

Known Limitations

The decision logic is based on heuristic keyword matching and may misclassify. In case of issues, use [effort=...] markers as fallback.

Summary

This plugin helps DSH users control cost while maintaining reasoning quality by automatically adapting to task intensity and imposing peak-hour limits.
Full catalog and source code: Catalog URL | GitHub URL