Preface¶
Integrating OpenCode’s free models into DeepSeek Harness (dsh) typically requires installing the community bridge plugin dsh-opencode-xdbridge first, registering the isolated opencode runtime as provider opencode-xdbridge. Billing per token is zero, but the real daily bottlenecks are the full conversation being resent every turn, rate limits, and the shim’s 8 MB request body cap. Below we introduce dsh-opencode-free (Star Bridge mode), released by maintainer SZYTree0312: an agent preset mounted on dsh that only handles agent-side prefix stability and payload control. It does not replace the bridge plugin, nor is it a standalone runtime or a fork.
What Is This¶
dsh-opencode-free is a patch package in the @deepseek-ai/dsh-agent-preset form, with the main artifact being presets/opencode-free.patch.yml. The upstream Harness baseline must be pinned to 0.2.0-rc.2 (upstream explicitly signals breaking changes). The name “Star Bridge”: “Star” refers to the free-model roster such as space-bunny and big-pickle; “Bridge” refers to xdbridge.
The preset shape is the same as the alloying-style presets, but the objective function differs: those focus on saving token costs; here the hard constraints are the free-tier rate limits, per-turn latency (four-layer forwarding + full resend every turn), and the 8 MB request body failure cap. The payoff is in quota and latency, not money.
Route Principles (Why the Preset Tunes Things This Way)¶
In the bridge implementation, a new upstream session is created every turn (POST /session in backend.js). The server keeps no state; the entire conversation is resent each turn. Therefore:
- Payload grows linearly with history; the request body size is determined by session length.
- Prefix matching is the main avenue for “saving compute”; the bridge reports
cached_tokensback asprompt_tokens_details.cached_tokens. dsh-opencode-xdbridgeuses zero-price billing for free models inadapter.js, and only lists a model when every billing dimension reported by the runtime is 0 — “saving token money” is not this preset’s design goal.
The tool catalog must stay fixed throughout: when protocol.js assembles the system prompt it appends Available external tools: …. If the tool set or order changes, the system prompt changes, and the cache prefix is invalidated. Hence the preset requires tool-plugin-manager to remain disabled, and avoids any pattern where tool_choice / parallel_tool_calls flip turn to turn. See docs/how-the-bridge-shapes-the-request.md in the repository for details.
Core Strategy (Differences from Upstream and the Alloying Direction)¶
| Knob | Star Bridge Orientation | Reason Summary |
|---|---|---|
agent-instructions.maxBytes |
32768 (halved from upstream) | Every byte lives in the chunk resent every turn |
tool-result-pruner |
4096/2048/512 | Coordinates with the 8 MB request body hard gate |
compaction.headroomTokens |
32768 | Free-model windows are often 128K; an oversized headroom pushes the compaction trigger too low |
summarizationModel / modelPolicies |
Left blank | The free roster rotates; hard-pinning an id risks compaction failure on delisting day |
tool-fs read limits |
800 lines / 1000 chars / 24 KiB | Controls the payload impact of a single read |
Shared discipline: tool catalog fixed throughout, history is append-only, dynamic state pushed to the tail.
Installation and Activation¶
This preset does not include xdbridge, nor will it install it for you. The two parts have separate authors and responsibilities: XDTrees’ dsh-opencode-xdbridge handles provider, model catalog, isolated runtime, and the 8 MB cap; this repository only handles the agent-side tool surface, prompts, compaction, and payload. The preset YAML does not reference the opencode-xdbridge plugin id; the preset can be installed without the bridge, though no corresponding model will be selectable — it will not break the profile.
Installation order (commands from the repository README):
- Install the bridge plugin first:
dsh plugin --profile web add github:XDTrees/dsh-opencode-xdbridge
- Then install this preset:
dsh plugin --profile web add github:SZYTree0312/dsh-opencode-free
- In the session preset selector, choose Star Bridge mode.
To uninstall the preset:
dsh plugin --profile web remove dsh-opencode-free
The README notes: the bridge plugin’s peer range is dsh >=0.1.1-rc.1 <0.2.0, while this preset is written for the 0.2.0-rc.2 preset mechanism; both can coexist locally, but after upgrading dsh you should check whether the peer and mechanism still match. Before installing, it is recommended to read through the README installation section, or let an Agent execute it step by step per the documentation.
Typical Usage and Adjustments When Hitting Rate Limits¶
Typical usage: enable Star Bridge mode on a profile that already has xdbridge installed, and run sessions with the free models under provider opencode-xdbridge. The tuning philosophy (small payload, stable prefix, minimize compaction triggers) is also useful for any route that “pays linearly by context and resends the full conversation every turn”; when switching providers, revisit the numbers.
When hitting rate limits, the README suggests tightening in the following order (from less capability-damaging to more):
- Disable web fetching: set
fetch: falseontool-web(search can be kept). - Disable subagents and workflow: set
tool-subagent/tool-subagent-fork/workflow-ptc/tool-workflowtodisabled: true. - Further reduce the
tool-fsread limits (e.g., 500 lines / 800 chars / 16 KiB). - Lower the reasoning effort tier: adjust
agent-default-model.reasoningEffortfrommaxdownward.
Tightening readLimit too aggressively may force the model to re-read in chunks, producing more turns instead; it is advisable to run a few real sessions and observe before changing.
Applicable Scenarios and Caveats¶
Who it’s for: Developers already using OpenCode free models on dsh (via xdbridge), who need systematic payload and prefix control at the agent layer, and are willing to maintain versioning separately from the bridge plugin.
Status (as of the repository README): Source-level verification has been done for the bridge’s request assembly, cache reporting, per-turn session creation, and the 8 MB cap; the first preset version has been released; real-machine validation (hit rates, payload curves, how long a session before the 8 MB becomes a threat) and a cross-check of each free model’s window/output caps are still to be added. Preset conclusions must be revisited as the dsh-opencode-xdbridge implementation changes — if protocol.js system assembly, session strategy, NO_COST/window reporting, or the shim body cap changes, return to docs/how-the-bridge-shapes-the-request.md to re-tune.
Security and licensing: The plugin runs with the current dsh process privileges; before installing, review the GitHub repository source code and the MIT license yourself. The community catalog SkillHub plugin page is an independent site with no official affiliation with DeepSeek / High-Flyer.
Closing¶
dsh-opencode-free pins agent behavior on the OpenCode free route to “stable prefix, controllable payload, minimal extra requests,” with a clear division of labor from XDTrees’ xdbridge. For details, installation instructions, and bridge request evidence, the repository README and docs/how-the-bridge-shapes-the-request.md are authoritative.
- Catalog page: https://www.skillhub.cn/plugins/SZYTree0312/dsh-opencode-free
- GitHub: https://github.com/SZYTree0312/dsh-opencode-free