The DeepSeek Harness (DSH) reasoning effort selector is driven by per-model reasoning metadata. For the official dsh-llm-pi-ai, this metadata is provided out of the box. However, for self-hosted or relay gateways, where the route name may be unknown to the catalog, the models key replaces the catalog rather than extending it, and entries lacking reasoningEfforts are reported as non-reasoning models. This plugin reads these levels from the gateway’s GET {baseURL}/models endpoint and writes them to the configuration file.
Core Features¶
The plugin addresses the issues above by:
- Synchronizing Levels: Syncs the reasoning effort levels of DeepSeek Harness model routes with gateway metadata, eliminating the need to manually write
reasoningEffortsblocks for every model. - Fallback Mechanism: Falls back to the
models.devdataset for models not described by the gateway. - Configuration Support: Supports configuring
routesandmodelsDevoptions, allowing for whitelist control or custom fallback behavior. - Write Validation: Writes validated
reasoningEffortsto the configuration file.
Installation & Enablement¶
Ensure DeepSeek Harness 0.2.0-rc.2 is installed before proceeding.
- Navigate to the DeepSeek Harness Plugins page.
- Install the plugin via registry name, absolute path, Git URL, or tarball.
- Enable the plugin package after installation.
Configuration & Usage¶
The plugin registers an entry in the configuration file with the following default settings:
- id: reasoning-effort-sync
name: dsh-plugin-reasoning-effort-sync
config:
enabled: true
syncOnLoad: true
intervalMinutes: 0 # 0 disables periodic sync
requestTimeoutMs: 10000
dryRun: false
routes: {} # Empty indicates processing all routes declared in pi-ai lines
modelsDev: # Fallback data source, only for models not described by the gateway
enabled: true
url: https://models.dev/api.json
ttlHours: 12
timeoutMs: 30000
minShare: 0.5 # Consensus ratio required for a dominant claim
Route Configuration (routes)¶
- Empty Object
{}: Processes all routes declared inllm-pi-ailines. - Non-empty Object: Acts as a whitelist, processing only the routes named in the list. Setting
enabled: falsefor a route in the list excludes it.
Model Fallback Configuration (modelsDev)¶
When the gateway’s /models endpoint does not provide reasoning effort levels, the plugin queries models.dev.
url: Dataset address (defaults to the full dataset from models.dev).ttlHours: Duration to cache the dataset in memory.timeoutMs: Timeout for fetching the dataset.minShare: Determines whether to accept the claim for a model. A value of 1 requires consensus, while 0.5 accepts majority agreement.
Testing Configuration¶
Using dryRun: true calculates and logs results without writing to the actual configuration, useful for verifying if the levels returned by the gateway are correct.
Notes¶
- Version Requirement: Requires DeepSeek Harness 0.2.0-rc.2.
- Scope: Only processes routes declared in the configuration file.
- Model Management: Does not add or remove models; it only annotates existing model entries.
- Default Values: Does not write default effort values.