Repository navigation
v0.4.0
[0.4.0] - 2026-10-06
Added
- Attach
x-opencode-sessionper conversation for OpenCode / OpenCode Go
routes at request time, without writing settings.llm/streamreadsoptions.provider+ the durableoptions.sessionId.AsyncLocalStoragewraps the downstream chunk stream; aglobalThis.fetch
patch injects the header only while that window is active.- Scoped to OpenCode provider prefixes (
opencode-go/opencode, including
the-responses/-messagessiblings) and to OpenCode hosts. - Default value is an opaque random UUID per DSH session — stable within a
conversation, new on session switch, never the raw internal session id. - Never overrides a header the caller already set (safe on pi-ai 0.86+ and
with staticheaders).
lib/session-header.jsandtests/session-header.test.js.- Config block
sessionHeader({ enabled, mode, providers }), overridable by
id in the profilecordis.patch.yml.
Fixed
400 MissingSessionIDfrom OpenCode Go for routes this plugin declares with
an explicitapi:(which pi-ai's built-in wrapper does not cover).
Changed
package.json:0.3.0->0.4.0; discoveryuser-agent->dsh-model-sync/0.4.0.lib/index.js: stale v1 docstring aligned with the v2 read-only behavior.npm testscript:node --test tests/->node --test(works on Node 24).
Verified
- Unit tests: 32/32 pass.
- Real credential,
POST /zen/go/v1/chat/completions(deepseek-v4.1-flash):
no header ->400 MissingSessionID; withx-opencode-session->200. - Real OpenAI SDK 6.40 end-to-end: patch active ->
200; wrong host scope ->400. - Model reachability:
kimi-k3200;ox-alpha-freeunavailable upstream,
its settings entry repointed to the currentomen-alpha(200).
Compatibility
- DSH kernel
0.1.2-rc.1+; verified on DSH Desktop2.0.11,
dsh-llm-pi-ai@0.1.5-rc.2,@earendil-works/pi-ai@0.85.1. - No effect on non-OpenCode providers.
Full Changelog: v0.3.0...v0.4.0