dsh-session-header
Run the following command in DeepSeek Harness:
dsh plugin install homily707/dsh-session-header
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install homily707/dsh-session-header in your project directory; source code is available at https://github.com/homily707/dsh-session-header
About this plugin
The LLM call path inside DeepSeek Harness exposes no per-request header seam: GenerateOptions carries no headers field, and every adapter assembles its wire headers internally. If your model gateway, reverse proxy, or audit middleware keys routing, caching, or log correlation on a session-identifying header, Harness cannot send it out of the box — dsh-session-header closes exactly that gap.
The plugin composes two official interception points — the llm/stream waterfall and a globalThis.fetch patch — and uses AsyncLocalStorage to track precisely which fetch belongs to which LLM call. In practice this means the main session, compaction and title helper calls, and spawned subagents each carry their own session UUID; any header already present (case-insensitively) is never overwritten; non-LLM traffic such as Web RPC, telemetry, and tool calls passes through untouched; and unloading the plugin restores the original fetch. A fixed-value mode is available for gateways that expect a single static token.
It is a fit for teams running self-built gateways or enterprise proxies that perform session-level canary routing, cache-hit optimization, or call auditing, and for anyone who needs a consistent session identifier across multiple LLM providers without touching adapter source code.
Use Cases
- Gateways and proxies that perform canary routing, cache-hit optimization, or rate-limiting keyed on a session ID
- Audit middleware that needs to correlate every LLM call within one conversation into a single log chain
- Unified session identifier across multiple LLM providers without modifying adapter source code
- Concurrent sub-agent scenarios where each child session carries its own independent session ID
Best For
- Platform teams building self-hosted model gateways or enterprise proxy layers
- LLM architects who need session-level routing, caching, or audit trails
- Developers using multiple LLM providers and unwilling to patch adapter code
Related Plugins
A service-oriented sidebar framework for DSH, offering a full workbench with file explorer, embedded browser, real terminal, Git panel, and extensible plugin services.
A beautiful, practical Claude Code-style TUI plugin with pixel whale top bar, flowing glow title, real-time status line, streaming thought expansion, time rewind, context progress bar and TPS gauge — zero core changes.
The plugin market for DeepSeek Harness: browse/search/one-click install community plugins and themes, with updates, backup/restore, hot disable, diagnostics, and AI fix.
A persistent whale widget on the DSH web UI that shows DeepSeek balance, today's usage, and per-turn cost, with drag-and-snap and sound effects.