homily707/dsh-session-header ↗★ 10
dsh-session-header
Inject an x-session-id HTTP header onto every DeepSeek Harness LLM provider request, carrying the harness session id of that exact call; also covers whitelisted gateway fetches during tool execution.
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:homily707/dsh-session-headerREADME
Read the full README ↗Configuration
| field | type | default | meaning |
|---|---|---|---|
header | string | x-session-id | header name to inject; case-insensitive on the wire |
value | string | — | fixed value; unset = the harness session id of the call in flight |
toolEndpoints | string[] | [] | URL prefixes matched during tool execution. When non-empty, fetches inside a tools/execute waterfall — e.g. a gateway web-search Messages API called from a tool — get the header only when their URL starts with one of these prefixes; third-party tool targets (web_fetch of arbitrary pages, GitHub, MCP servers) stay untouched. Empty (default) keeps the upstream LLM-only injection. |
overwriteHeaders | string[] | [] | Header names this plugin may overwrite when they already carry a value. Everything else keeps the "never overwrite" rule. Some official providers hard-code placeholder values (e.g. dsh-web-search-deepseek sends x-opencode-session: dsh-web-search), which gateways reject as missing; list the header here (overwriteHeaders: [x-opencode-session]) so the live session id replaces that placeholder. Case-insensitive. |