Repository navigation
Replies: 1 comment
|
Partial confirmation on master c291e79 (drift note: your report is 09-12, the master snapshot is 09-10). What checks out: (1) OpenCode Go's own announcement in #5495 says requests without an x-opencode-session header error from 09/05 - the 400 you hit matches that; (2) DSH does carry a stable per-session id to the pi-ai adapter (agent-loop/src/agent.ts:614, invariant.ts:24-26, llm-pi-ai/src/adapter.ts:384); (3) but nothing on master emits x-opencode-session: zero hits across the tree and inside the pinned pi-ai 0.85.1 dist (pnpm-workspace.yaml:60), whose opencode-go provider is a thin OpenAI-completions wrapper without sendSessionAffinityHeaders (compare fireworks/cloudflare, which do enable it). The only header seam is requestHeaders (adapter.ts:388), and harness config deliberately withholds pi-ai session affinity (catalog.ts:255-257), so your fix direction is consistent with the existing seam. The 400 itself I cannot reproduce locally【未核实】. Worth cross-linking this thread with #5495 - that announcement is still unanswered. |
Uh oh!
There was an error while loading. Please reload this page.
Symptom
When using an OpenCode Go model in DSH Web, sending a user message fails with this error:
400: {"type":"MissingSessionID","message":"Error from provider (Console Go): Request is missing x-opencode-session and cannot be routed efficiently. Please see https://opencode.ai/docs/go/#where-can-i-use-it"}Root cause
OpenCode Go requires an
x-opencode-sessionheader for request routing. DSH already has a stable per-session id and passes it to pi-ai, but the installed pi-ai 0.85.1 OpenCode Go provider does not emit the provider-specificx-opencode-sessionheader on the Chat Completions path.Proposed fix
When the resolved pi-ai provider is
opencode-go, send the exact DSH session id asx-opencode-session.This keeps each DSH session routed separately by OpenCode Go and avoids sharing one static prompt-cache identity across sessions. A request without a session id omits the header instead of inventing one.
Fix branch:
https://github.com/atomtony/deepseek-harness/tree/codex/opencode-go-session-header
Commit:
atomtony@e4edce0
Verification
The adapter regression test sends two requests with different session ids and verifies they produce different
x-opencode-sessionvalues.The following checks pass locally:
llm-pi-aiadapter suitedoc-syncadapter.tsat 100% statements, branches, functions, and linesAll reactions