Introduction¶
The reasoning level (Effort) in DeepSeek Harness (DSH) comes from metadata declared by adapters. If an adapter does not declare a reasoning level, DSH directly rejects any request without a declared level. Third-party models, especially those under the llm-pi-ai route, often lack these declarations, making it impossible to enable the reasoning feature.
The dsh-custom-reasoning plugin solves this issue by completing the reasoning-level declaration in adapter metadata. After installation, it automatically attaches the standard five-level reasoning Effort to eligible third-party models, after which the official DSH reasoning-level selector takes over control.
What Is It¶
dsh-custom-reasoning is a DSH plugin maintained by 3likofj. It is designed specifically for the llm-pi-ai route and is responsible for automatically completing the reasoningEfforts declaration for third-party models that do not officially provide reasoning-level options, as well as managing the related compat field.
Core Features¶
The core logic of the plugin is “automatic completion” and “compatibility takeover”:
-
Automatic completion of the five-level reasoning Effort
The plugin listens for model switches and detects whether the current model belongs tollm-pi-aiand has no reasoning metadata. If so, it automatically declares the five levelsoff/low/medium/high/maxfor the model. This requires no manual operation; once the selector appears, it can be used directly. -
Managing the
compatfield
Based on the user-selected wire format (such as openai, deepseek, qwen, etc.), the plugin automatically writes to thecompatfield:
- writessupportsReasoningEffort: true
- writes the correspondingthinkingFormat(such as “openai”)
This ensures that the pi-ai provider can correctly parse and forward reasoning parameters. -
Persistence and fallback
The plugin writes the declaration into host settings viaremote.settings.mutate, landing in the Cordis patch of the current profile. This means the declaration is persisted and becomes ineffective after the plugin is disabled. If a model already declares acompatfield, the plugin preserves the original configuration field by field.
Installation and Enablement¶
Installation requires the official plugin management command. Before installing, ensure your environment has Node >= 20 and that the bundle is enabled in dsh.profile.bundles.
dsh plugin --profile <profile> add github:3likofj/dsh-custom-reasoning
To pin a specific version, append the commit hash at the end.
Verification¶
After installation, you can use the project’s built-in verification script to check whether the plugin logic is executed correctly:
node test/verify.mjs
Applicable Scenarios¶
The use of this plugin has clear boundary conditions:
- Route restriction: It only supports the
llm-pi-airoute (including third-party OpenAI-compatible endpoints such as jagb, amd, platform, nvidia, zai, etc.). - Adapter differences: The official DeepSeek adapter already includes reasoning Effort, so the plugin does not intervene.
- Model scope: It only handles models that appear in the model catalog. Models that cannot be found in the catalog cannot have their capabilities determined, so the plugin does not write values arbitrarily.
Summary¶
dsh-custom-reasoning removes the barrier for third-party models to use the official reasoning-level selector by completing metadata. For developers using the llm-pi-ai route, it is an effective tool for reducing configuration cost and unifying the interaction experience.
- Plugin directory: https://www.skillhub.cn/plugins/3likofj/dsh-custom-reasoning
- Repository: https://github.com/3likofj/dsh-custom-reasoning