dsh-think-intensity
Manifest valid★ 1DSH 思考强度策略插件:在模型已有档位之上决定每次请求用哪一档,可观测、可回滚。
dsh-think-intensity
Thinking Intensity Strategy Plugin for DeepSeek Harness (DSH)
Decides reasoning effort levels on top of existing model capabilities — observable, self-healing, and fully reversible.
English | 简体中文
What Problem Does It Solve?
In DeepSeek Harness (DSH), thinking intensity is not an arbitrary runtime switch, but a strict capability declaration (reasoningEfforts):
- Official Catalog Models (such as DeepSeek Reasoner, OpenAI o1/o3) ship with built-in effort declarations. Opening the model selector in DSH natively reveals the second-level menu:
Reasoning Effort >; - Custom / Third-Party Models (such as StepFun
step-5-preview, Zhipuglm-5.3, or proxy gateways) do not have reasoning effort fields exposed in the DSH custom model settings UI, leaving them withoutreasoningEffortsdeclarations; - The Result: DSH treats them as plain text models and hides the reasoning effort selector; if parameters are forcefully sent, upstream gateways reject the request with
UNSUPPORTED_REASONING_EFFORT.
dsh-think-intensity solves this elegantly:
- Native Activation: Backfills effort declarations into hand-declared models to natively reveal DSH's built-in
Reasoning Effort >menu; - Explicit Choice Priority: When a user selects a level manually in the UI, the plugin respects the choice 100% and passes it through untouched;
- Default Strategies: Injects configured levels (
defaultLevel,subagentLevelfor subagents, orpurposeLevelsfor compaction) when no manual choice was made; - Self-Healing Fallback: Automatically blacklists rejected levels inside the session to prevent infinite retry loops;
- Sandboxed & Reversible: Zero invasive hacks; clean uninstallation leaves no leftover overrides.
Native UI Interaction
This plugin fully embraces DSH's official native UI components rather than adding intrusive floating widgets or custom sliders. In the chat composer, clicking the active model displays DSH's standard two-row menu:
┌──────────────────────────────────────┐
│ Model step-5-preview / … >│
│ Reasoning Effort High >│
└──────────────────────────────────────┘
Clicking Reasoning Effort expands the native choice list:
Off(Disable thinking / zero parameter)LowMediumHighMax
Strategy Decision Flow
┌───────────────────────┐
│ Agent Request Triggered│
└───────────┬───────────┘
│
▼
Explicit UI Choice? ──(Yes)──► Pass through untouched (100% User Priority)
│ (No)
▼
Origin === 'subagent'? ──(Yes)──► Apply subagentLevel
│ (No)
▼
Purpose Match (compaction)? ──(Yes)──► Apply purposeLevels mapping
│ (No)
▼
Apply defaultLevel
│
▼
Capability Guard (resolveModelInfo)
├── Target model supports effort? ──► Inject and proceed
├── Model is non-reasoning? ──► Strip inherited parameter to prevent errors
└── Level hit gateway error blacklist? ──► Fall back cleanly
Configuration Paths
DSH stores configuration patches in cordis.patch.yml under each profile:
| OS | Desktop App (desktop profile) | Web App (web profile) |
|---|---|---|
| Windows | %USERPROFILE%\.dsh\profiles\desktop\cordis.patch.yml | %USERPROFILE%\.dsh\profiles\web\cordis.patch.yml |
| macOS | ~/.dsh/profiles/desktop/cordis.patch.yml | ~/.dsh/profiles/web/cordis.patch.yml |
| Linux | ~/.dsh/profiles/desktop/cordis.patch.yml | ~/.dsh/profiles/web/cordis.patch.yml |
Configuration
In your profile's cordis.patch.yml, configure the plugin by entry id:
- id: think-intensity
config:
defaultLevel: high # Default effort for unselected requests; empty = pass through
subagentLevel: max # Dedicated level for subagent sessions; empty = fall back to defaultLevel
providers: [] # Whitelisted provider routes; empty = all providers
purposeLevels: # Internal task effort mappings
compaction: low # Save tokens on memory compaction
session-title: off # Disable thinking for session titles
backfillEnabled: true # Automatically backfill declarations to activate the native menu
Options Reference
| Key | Type | Default | Description |
|---|---|---|---|
defaultLevel | string | "" | Global fallback level (low, medium, high, max); empty = no intervention |
subagentLevel | string | "" | Level for subagent sessions (origin === 'subagent'); empty = fall back to defaultLevel |
providers | string[] | [] | Whitelisted provider routes; empty = all routes |
purposeLevels | object | {} | Mapping from internal task purpose to effort level |
statsFlushMs | number | 30000 | Minimum disk flush interval (ms) for $DSH_HOME/storages/think-intensity-stats.json |
backfillEnabled | boolean | false | When true, writes missing reasoningEfforts declarations; default is dry-run |
backfillLevels | object | {} | Effort to wire value table; empty falls back to DEFAULT_BACKFILL_LEVELS |
routeDefaultLevel | string | "" | Route default level; written only if all models in route support it |
Manual Model Declaration (Without Auto-Backfill)
You can also manually declare reasoningEfforts under llm-pi-ai in cordis.patch.yml:
- id: llm-pi-ai
name: "@deepseek-ai/dsh-llm-pi-ai"
config:
providers:
stepfun:
models:
- id: step-5-preview
name: step-5-preview
contextWindow: 1024000
reasoningEfforts:
off: null # off sends nothing to the wire
low: low
medium: medium
high: high
max: max
Restart DSH, and the native reasoning effort menu activates immediately.
Installation & Uninstallation
Option 1: Via npm (Recommended after release)
# Desktop profile
dsh plugin --profile desktop add dsh-think-intensity
# Web profile
dsh plugin --profile web add dsh-think-intensity
Option 2: Via GitHub Release Tag (Pinned version)
dsh plugin --profile desktop add github:fengzhiyushui/dsh-think-intensity#v0.1.0
Option 3: Local directory install
dsh plugin --profile desktop add /path/to/dsh-think-intensity
Uninstallation
dsh plugin --profile desktop remove dsh-think-intensity
# Verify cleanly removed
dsh --profile desktop --dump-config
Development & Testing
# Install dependencies
pnpm install
# Build single ESM bundle (lib/index.js) and types
pnpm run build
# Run 124 unit tests with Vitest
pnpm run test
# Type check
pnpm run typecheck
Core Verified Scenarios (124 Tests)
- Explicit Priority: Manual UI choices are never overridden;
- Default Injections:
defaultLevel,subagentLevel, andpurposeLevelsapplied correctly; - Capability Guard: Models without reasoning skip injection; non-reasoning models strip inherited parameters;
- Wire Value Mapping: Custom wire values (e.g.,
high: ultra) correctly delivered to upstream gateways; - Self-Healing:
UNSUPPORTED_REASONING_EFFORTtriggers in-session blacklisting to prevent request crashes; - Legality Checks: Rejects invalid effort dictionaries and non-standard keys;
- Concurrency & HMR Protection: Handles hot-reloading transactions and config revision conflicts;
- Built-in Standard Levels:
DEFAULT_BACKFILL_LEVELScomplies with catalog schema.
Known Boundaries
- In-Memory Blacklist: Gateway error fallbacks are stored in memory and reset upon DSH restart to prevent transient network issues from persisting;
- Non-Reasoning Stripping: If an unreasoning model carries an inherited effort parameter, the plugin strips it to prevent gateway rejections (the only exception to "Explicit Priority").
License
MIT © 2026 fengzhiyushui and contributors.
Comments
Loading…
From the same category
by awesome-dsh-plugin
A curated list of plugins for DeepSeek Harness (dsh) · DeepSeek Harness 插件精选列表
★ 20.4k
CC0-1.0
Python
Oct 23, 2026
by 0xsline
DeepSeek Harness (DSH) ecosystem: curated plugins, tools, and infrastructure from dsh-external/hub and the public dsh-plugin topic.
★ 1.3k
CC0-1.0
Python
Oct 16, 2026
by pax-beehive
Open-source CLI, schemas, resolver, and DSH agent tools for DSH Plugin Hub
★ 277
MIT
TypeScript
Oct 20, 2026
by xiajiajun516
DeepSeek Harness (DSH) backup & restore plugin — export, import, migrate and sync your complete DSH configuration, plugins, MCP servers, skills and workspace. One-click migration to another machine.
★ 230
MIT
TypeScript
Oct 23, 2026
dsh plugin --profile web add dsh-config-managerby yjh051108
推荐组件(非必须):DeepSeek Harness 运行时注入器;已随 dsh-routing-suite 单仓库化保留,本仓库继续维护/发布。
★ 166
TypeScript
Oct 16, 2026
dsh plugin --profile web add @dsh-external/dsh-super-injectorby jigjoy-ai
A CLI that turns a goal into a pull request - and a sandbox for testing concurrent AI coding agents on the Mozaik runtime.
★ 125
MIT
TypeScript
Oct 22, 2026