dsh-session-header:为 Harness 的 LLM 请求注入会话 Header

DeepSeek Harness 的 GenerateOptions 没有统一 headers 扩展,网关若依赖 session header 做路由或审计,默认往往发不出该头。dsh-session-header 通过 llm/stream 与 globalThis.fetch 补丁,在每次 LLM 调用及相关 fetch 上注入可配置的 x-session-id(或自定义头名),用 AsyncLocalStorage 隔离上下文,不覆盖已有 header。支持 toolEndpoints 与 overwriteHeaders,README 含 OpenCode Go 与 headless profile 配置示例。安装:dsh plugin --profile <name> add github:EmotionTowel/dsh-session-header,需 Node ≥ 22。

Read More
dsh-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