Introduction¶
DeepSeek Harness (DSH) introduced a reasoning intensity selector in 0.2.0-rc.2, but this feature is enabled by default only for built-in DeepSeek models. Third-party gateway models configured via llm-pi-ai (such as OpenCode Go, GOAT, Volcengine Ark, etc.) cannot select reasoning levels in the interface. In addition, the OpenCode Go gateway strictly requires the x-opencode-session HTTP request header; otherwise it returns a 400: MissingSessionID error.
What Is This¶
dsh-reasoning-options is a DeepSeek Harness plugin maintained by user Scorp1o117. It scans the llm-pi-ai namespace to automatically complete the reasoning intensity selector for models that do not declare reasoning levels, and automatically injects the required routing request header for the OpenCode Go provider.
Core Features¶
- Automatic reasoning level completion: Adds a reasoning intensity selector to all pi-ai models, supporting seven levels from off to max.
- Automatic routing header injection: Detects the OpenCode Go gateway and automatically injects the
x-opencode-sessionrequest header. - Native integration: Writes are performed through DSH’s native settings API and are persisted directly to the Profile patch.
- Idempotency and serialization: Operations are idempotent and executed serially to avoid file lock conflicts.
Installation and Enablement¶
Install to the Web profile via the command line:
dsh plugin --profile web add dsh-reasoning-options
After installation, configure it in the DSH interface under Plugins -> Installed -> dsh-reasoning-options.
Typical Usage¶
The plugin provides a configuration page with the following main settings:
* enabled: Controls whether to automatically complete the configuration; defaults to true.
* autoSessionHeader: Controls whether to automatically inject the OpenCode Session header; defaults to true.
* sessionHeaderValue: The Session value to inject; defaults to 'dsh-session'.
* pollIntervalMs: The fallback polling scan interval; defaults to 30000 milliseconds.
Use Cases and Notes¶
- Applicable scenarios: Users who are using
llm-pi-aito configure third-party gateways and need centralized management of reasoning levels, or users who are using OpenCode Go and need automatic handling of the Session header. - Permissions note: The plugin reads and modifies the
llm-pi-ainamespace through DSH process permissions. It is recommended to review the source code and license before installation. - Configuration mechanism: The plugin uses a full replacement mechanism for arrays, so each write rewrites the complete model list. After manually editing
cordis.patch.yml, no dsh restart is required; wait for the next polling cycle for the changes to take effect. - Compatibility: Requires DSH 0.2.0-rc.2 or later.
Conclusion¶
This plugin resolves the missing configuration issue for third-party gateways in DSH and ensures configuration persistence and hot reloading through native interfaces. For more details and source code, please refer to the links below.
- Directory page: SkillHub Directory
- GitHub: Scorp1o117/dsh-reasoning-options