dsh-session-header: Inject session header into Harness LLM requests
DeepSeek Harness's GenerateOptions lacks a unified headers extension. When a gateway relies on session headers for routing or auditing, the header is often not sent by default. dsh-session-header patches llm/stream and globalThis.fetch to inject a configurable x-session-id (or a custom header name) into every LLM call and related fetch, isolates context via AsyncLocalStorage, and does not overwrite existing headers. It supports toolEndpoints and overwriteHeaders. The README includes configuration examples for OpenCode Go and headless profiles. Installation: dsh plugin --profile <name> add github:EmotionTowel/dsh-session-header; requires Node ≥ 22.
Read Moredsh-session-header: Add session headers to DSH's LLM requests
`dsh-session-header` is a DeepSeek Harness plugin maintained by homily707 and released under the MIT license. Its core functionality is to automatically inject the `x-session-id` HTTP header into LLM provider requests initiated by DSH, enabling session-based routing in model gateways, proxies, or audit chains. The value defaults to the `sessionId` from the current call's `GenerateOptions` (stripping the `session-` prefix), supports accurate resolution in concurrent sessions via `AsyncLocalStorage`, and does not overwrite existing headers with the same name. The plugin patches `globalThis.fetch`.
Read More