dsh-opencode-session-header
Run the following command in DeepSeek Harness:
dsh plugin install beihzb/dsh-opencode-session-header
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install beihzb/dsh-opencode-session-header in your terminal, then restart dsh web to load the plugin; source code is available at https://github.com/beihzb/dsh-opencode-session-header.
About this plugin
Since September 2026, OpenCode Go mandates a stable x-opencode-session header on every inference request for routing and prompt-cache optimization. DeepSeek Harness, however, sends no such header on any adapter path, so every opencode-go model call fails with a 400 MissingSessionID. The upstream fix is tracked but has not shipped yet, leaving users unable to call OpenCode Go models in the meantime.
This plugin bridges that gap surgically. It reads the current DSH conversation ID from the LLM stream chain and, at the Fetch transport layer, stamps x-opencode-session only on requests whose host matches the opencode.ai allowlist. Every other host passes through byte-for-byte unchanged. The session ID stays stable across turns, compactions, and retries, while each new conversation, fork, or subagent automatically gets a fresh one, naturally aligning with OpenCode's caching and routing. A single JSON switch file toggles injection at runtime with no restart, and the plugin carries zero runtime dependencies.
It is aimed squarely at DeepSeek Harness users hitting the 400 on OpenCode Go calls. If you previously worked around it with static headers or a global profile rewrite, this plugin offers a cleaner path: no impact on other providers, no user-agent or cross-host header pollution, no third-party client bundle. Once the upstream native support lands, simply uninstall and you are done.
Use Cases
- Fixing 400 MissingSessionID errors when calling OpenCode Go models via DSH
- Injecting per-conversation session headers to enable prompt-cache and routing optimization
- Applying a lightweight, zero-dependency patch scoped to opencode.ai without restarting
Best For
- Any DeepSeek Harness user calling OpenCode Go models
- Users who previously worked around the 400 with static headers or global profiles
- Users who prefer precise, side-effect-free, instantly toggleable plugin solutions
Related Plugins
Free web search plugin for DeepSeek Harness with web search, X search, and page fetch; no signup or API key required, with automatic multi-engine failover.
AnySearch-powered web and vertical search plugin for DeepSeek Harness, offering real-time search, cleaned URL content, concurrent batch search via native web_search/web_fetch, no API key required.
Pixel-perfect webpage clone tool that uses an agent harness to turn any webpage into a scored, full-page React replica.
A bilingual cost-tracking plugin for DeepSeek Harness with session/daily cost, budget, official & custom provider balance, coding plan quotas, peak/off-peak pricing alerts, and history stats.