deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
GitHub: Scorp1o117/dsh-reasoning-options · npm: dsh-reasoning-options · 中文
A small DeepSeek Harness plugin that automatically adds a reasoning-effort picker to every pi-ai (third-party gateway) model, and auto-injects required routing headers (such as x-opencode-session for OpenCode Go).
llm-pi-ai (OpenCode Go, GOAT, Volcengine Ark, ...) don't — pi-ai only offers effort levels for models that explicitly declare reasoningEfforts, and hand-declared gateway models never do.opencode.ai/zen/go/v1) strictly requires an x-opencode-session HTTP header to route requests and manage prompt cache. Without it, requests fail with 400: {"type":"MissingSessionID", ...}.This plugin closes both gaps: it scans the llm-pi-ai namespace, adds the full level set (off / minimal / low / medium / high / xhigh / max) and default reasoning: high to models without declarations, and injects x-opencode-session into OpenCode Go provider headers if not already set. Writes go through dsh's native settings pipeline (schema-validated → persisted to settings.yaml → hot-applied) — no manual file editing.
The plugin only gives users a convenient way to pick and ensures gateway requirements are satisfied. Which level a model actually supports is the user's call; the plugin does not judge model fitness.
Verified in a DSH 0.1.5-rc.3 (next) disposable Web profile; DSH
0.1.5-rc.2 remains latest. The rc.3 host currently references an
unpublished dsh-client-ui-sidebar-documentpreview@0.1.5-rc.3, so the smoke
profile temporarily used that unrelated UI package at rc.2. A clean rc.3
installation is blocked upstream. Alpha releases remain unknown.
dsh plugin --profile web add dsh-reasoning-options
Or mount manually in a profile patch:
- insert:
- id: reasoning-efforts
name: 'dsh-reasoning-options'
config:
enabled: true
llm-pi-ai namespace (registered by the pi-ai plugin).reasoningEfforts, generate a mutation writing the full seven-level declaration at the exact path.reasoning default, add reasoning: high.baseURL containing opencode.ai), auto-inject x-opencode-session: dsh-session into headers if missing.settings/updated, so models or providers added later are covered automatically.| Field | Default | Meaning |
|---|---|---|
enabled |
true |
Set false to stop auto-patching |
autoSessionHeader |
true |
Auto-inject x-opencode-session for opencode.ai gateways |
sessionHeaderValue |
'dsh-session' |
Value for injected x-opencode-session header |
Want different defaults or wire values? After the patch they live in the
llm-pi-aisection ofsettings.yaml— edit them freely; the plugin never overwrites existing declarations.
llm-pi-ai namespace but does not own it (pi-ai registers it exclusively). All writes use the public settings.mutate API — equivalent to editing via the Web UI.low/medium/high/...). Most OpenAI-compatible gateways accept them; if one expects its own spelling, adjust the values in settings.yaml.CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。