zhuifengqug/dsh-adaptive-reasoning
dsh-adaptive-reasoning
dsh-adaptive-reasoning is a community DeepSeek Harness plugin. Read the repository README before installing.
Install
npx @deepseek-ai/dsh plugin --profile web add dsh-adaptive-reasoningRestart `dsh web` after install. Bundle APIs can change during the developer preview.
README badge
[](https://dshhub.dev/plugins/dsh-adaptive-reasoning)Paste this into your README. The star count updates with every catalog sync.
From the README
Excerpt from zhuifengqug/dsh-adaptive-reasoning, cleaned of badges and images.
dsh-adaptive-reasoning
A capability-aware reasoning-effort slider for the DeepSeek Harness Web GUI.
The plugin keeps DSH's official model selector and /model command intact. Clicking the selector's existing Reasoning effort / 推理等级 row opens an accessible slider panel. The panel reads the selected model's exact reasoning metadata from the Host and writes selections back through the normal session.selectModel RPC.
Install (two ways)
From npm:
dsh plugin --profile web add dsh-adaptive-reasoning
From GitHub (pin to a released tag for reproducibility):
dsh plugin --profile web add github:zhuifengqug/dsh-adaptive-reasoning#v2.0.0
Restart dsh web afterwards. Details, removal, and the optional models.dev enrichment are covered below.
What It Does
- Uses only the current model's advertised
reasoning.efforts; it does not invent a global effort list. - Supports sparse and provider-specific levels such as
off,high,max, or an adapter-defined identifier. - Stepless drag: continuous 0–100 dragging writes
reasoningEffortlive with a 16ms throttle, so requests never pile up during a drag. - Snap on release: releasing, blurring, or ending keyboard navigation snaps to the nearest declared level and issues one confirming write.
- WebGL fire: a three-pass WebGL2 simulation (ignition → blur → composite) whose leading edge follows the slider; the track sits as cool ash until a level is dragged over and "ignites".
- Per-level ember palette: each effort level burns its own colour from ash grey up to burning red.
- Pixel-art UI: 4px-pixelated fire, jagged hard borders, segmented energy cells, and Press Start 2P / Zpix pixel fonts (with system-font fallback).
- Falls back to static energy cells when WebGL2 is unavailable or reduced motion is preferred.
- Uses DSH semantic design tokens and respects
prefers-reduced-motion. - Leaves official model selection, load failures, accessibility behavior, and the
/modelcommand unchanged.
One-Click Auto-Declare
When you open the effort panel on a model that declares no reasoningEfforts, the panel shows a hint and an 自动补全 (Auto-declare) button. Clicking it asks the Host to fill in a conservative declaration for every model of the current provider that lacks one, then reloads the panel so the slider appears.
Source priority follows mode C: a confident models.dev match wins when the catalog is reachable; otherwise a per-family heuristic decides (deepseek/qwen/glm/claude/grok → off/low/high/max; gpt/gemini/minimax/step/kimi/moonshot/mimo/mistral/… → off/low/medium/high; image models are skipped). Models that already declare efforts are never touched.
The button is an explicit per-click user action, so it is not gated behind a config flag; what it writes is the same reasoningEfforts field in llm-pi-ai settings (persisted to settings.yaml) that you would type by hand. It is dispatched as the host command /adaptive-reasoning-declare <provider>, which you can also run directly to backfill a whole provider.
Optional models.dev Enrichment
Some manually configured llm-pi-ai models do not declare reasoningEfforts, so DSH correctly exposes no effort UI. This plugin can optionally enrich those missing declarations from models.dev at startup.
…

