Introduction¶
When using Our Free Model (OFM) within DeepSeek Harness (DSH) to generate long answers, two common friction points exist: output gets truncated upon hitting the token limit, requiring manual prompts of “Continue” to resume; and multiple free model routes share a set of default parameters, meaning that to set specific thinking levels, output limits, or temperature for a particular model, you have to make temporary changes in the conversation each time.
dsh-ofm-addition is an auxiliary plugin for OFM: it requires no kernel modification, has zero dependencies, and requires no build steps. It automatically continues writing according to policies upon truncation and maintains an independent request parameter table for each configured OFM route. The following section describes its positioning, capabilities, and installation usage.
What is this¶
- Name:
dsh-ofm-addition(npm package name is identical) - Maintainer: DeepseekDays
- Category: Model Inference
- Repository: github.com/DeepseekDays/dsh-ofm-addition (Current version 0.4.0, MIT)
- Community Directory: skillhub.cn/plugins/DeepseekDays/dsh-ofm-addition
The plugin does not wrap or replace the host service; it only listens to events and calls the public agent.followup(). After uninstallation, the setup is identical to when it was not installed. It is installed and upgraded independently of the Our Free Model core.
Core Features¶
Automatic Continuation on Truncation¶
When a model terminates due to the output token limit (finish_reason = length, corresponding to reason.kind === 'max-tokens' in the host’s turn/end), the plugin waits for a short period (default 0.35s) after the session becomes idle, rechecks the conditions, and then sends a continuation prompt (default: “Continue”). The notification you see in the interface stating “Output token limit reached… Send ‘Continue’ to let the model continue output” is sent by this capability.
Process Overview:
Model output hits the limit
↓ turn/end { reason: { kind: 'max-tokens' } }
↓ Session becomes idle (agent/status → idle)
↓ Wait for a short period (default 0.35s)
↓ Recheck all conditions
↓ agent.followup("Continue")
Trigger Scope: “Only apply to Our Free Model” is enabled by default; sessions from other providers will not be continued, collapsed, or annotated. The provider/model whitelist (supporting * wildcards) is only used when this option is turned off. Normal completion, errors, or manual stops will not trigger this; a stop will reset the consecutive count for the current turn to zero.
Two Brakes (At least one should be retained):
| Mechanism | Meaning | Configuration Key Points |
|---|---|---|
| Consecutive Limit | How many times the current truncation chain has been automatically continued | Unlimited / 1 / 3 / 5 / 10 / Custom, default 3 (0 means unlimited since 0.2.0; in 0.1.0, 0 meant no continuation) |
| Context Guard | Whether the prompt for the next request is approaching the model window | Enabled by default, threshold defaults to 90% of the available window |
When set to “Unlimited,” the Context Guard becomes the primary constraint; if both are turned off, the settings page will issue a warning. The protection uses tokenMeter.measure() compared against the route window; if it cannot be measured, it passes. If a CONTEXT_WINDOW_EXCEEDED truly occurs, continuation stops and “Context overflow, stopped” is logged. If you type, stop, queue new input, or switch models during the waiting window, the current continuation will be canceled.
Request Parameters per OFM Route¶
Parameters are written after agent/request assembly is complete but before dispatch. They take effect on the next request without requiring a restart. Only provider|model routes you have configured in the parameter table are modified; the plugin does not touch any fields for unconfigured models.
Each model can be configured individually with:
- Thinking Level (must be a level declared by the model adapter)
- Output Limit (including “Max Config N”, where N is the capacity reported by the adapter)
- Temperature (0–2 or model default)
- Stop Sequences (one per line, max 8 lines)
The settings page provides Apply Max to All, AI Smart Fill (preview before writing), and Undo Last Change; optional “Session Temporary Selection Priority” allows temporary levels in the model selector to override the configuration on this page.
Installation and Activation¶
Run the official installation script in the plugin repository directory (no pnpm required, zero dependencies):
node install.mjs # Install / Repair
node install.mjs --uninstall # Uninstall (keep plugin directory)
node install.mjs --dry # Dry run (show what will be changed)
The script creates directory links under the profile’s node_modules/, writes link: entries into dependencies in package.json, and adds dsh-ofm-addition to dsh.profile.bundles.
After installation, you must fully exit DSH (including the tray) and restart, as bundles and browser module tables are loaded at startup.
Runtime environment requires Node: ^22.19.0 || >=24.0.0 (see engines in package.json).
Settings and Configuration Storage¶
There are two sections in DSH Settings: Settings → OFM Enhancement and Settings → OFM Model Parameters.
- OFM Enhancement: Master switch for auto-continuation, consecutive limit, context guard, wait before sending, continuation prompt (Explicit / Simple / Custom); collapse auto-continuations, show continuation count; effective scope and running status (including “Continue Now”—sends immediately upon click without requiring prior truncation).
- OFM Model Parameters: Per-model table with the four parameter fields mentioned above, plus reset to default / remove rule.
Persistent files are located at $DSH_HOME (default ~/.dsh):
ofm-addition/settings.json— Settings page fieldsofm-addition/stats.json— Counts and last 60 decisionsofm-addition/params.json— Per-model parameter table
You can also preset configuration for the plugin id ofm-addition in the profile’s cordis.patch.yml, for example:
- id: ofm-addition
name: dsh-ofm-addition
config:
maxContinuations: 0 # 0 = Unlimited
contextGuard: true
contextRatio: 0.9
providers: ['our-free-model*']
modelParams:
scope: ['our-free-model*']
entries:
'our-free-model|space-bunny-free':
enabled: true
effort: deep
maxTokens: 32768
temperature: null
stop: []
Initial values in the file take precedence; changes made on the page will override the file.
Typical Usage¶
- Install the plugin and restart DSH, confirming that Our Free Model is enabled.
- Open OFM Enhancement: Keep “Only apply to Our Free Model” enabled, and set the consecutive continuation limit as needed (for long documents, use it with Context Guard; be cautious with “Unlimited” combined with disabled protection).
- Open OFM Model Parameters: Add a row for frequently used routes, setting the thinking level and
maxTokens; use “Apply Max to All” or “AI Smart Fill” for bulk configuration, confirming via preview before writing. - Start a conversation; if the answer is truncated due to output limits, the plugin will automatically send “Continue.” You can view decision logs in the running status or click “Continue Now” to manually prompt.
Offline self-test (No need to start DSH):
node --test test/model-params.test.mjs test/policy.test.mjs test/host.test.mjs test/client.test.mjs
For the full test suite, see scripts.test in the repository’s package.json (includes policy, host, ledger, client, transcript, etc.).
Use Cases and Notes¶
Suitable for: Developers who use DSH + OFM long-term for long answers and switch between multiple models, preferring parameters that are “written once, carried with every request.”
Notes:
- The plugin runs with the permissions of the current DSH process; please read the repository source code and MIT license before installation, and obtain it only from trusted sources.
- Auto-continuation only handles actual output limit truncation and cannot replace your overall planning for context length; when
compaction-basicis not mounted, the Context Guard plays a more significant role. - The community directory SkillHub has no official affiliation with DeepSeek / High-Flyer and is an independent listing site for the DSH ecosystem.
Conclusion¶
dsh-ofm-addition turns “manual continue after truncation” and “multi-model shared default parameters” on OFM into configurable strategies: continuation has consecutive limits and context protection, and the parameter table is injected into the request pipeline acting only on routes you have configured. For details and update notes, see the GitHub README; the installation entry can also be accessed via the SkillHub directory page link to the repository.