400 Request is missing x-opencode-session and cannot be routed efficiently. Please see https://opencode.ai/docs/go/#where-can-i-use-it

Author: ManuelMejiaMtzCreated Sep 27, 2026Updated Sep 29, 2026

[x] Disable all other plugins besides Copilot (required) — Done, only Copilot was enabled during reproduction [x] Diagnostics attached (required) — "Report an issue" auto-diagnostics is desktop-only (confirmed in-app: "Reporting an issue is available on desktop only"). Log generated via "Copilot: Create log file" pasted below instead. [ ] Screenshot of note + Copilot chat pane + dev console added (optional)

Copilot version: 4.0.11 Model used: DeepSeek V4.1 Flash (OpenCode Go, free) Report ID (from Report an issue, if you used it): N/A — used manual log file instead (mobile has no access to the automated Report an issue flow)

Describe how to reproduce

  1. On Obsidian mobile (Android), with only Copilot enabled
  2. Open Copilot Quick Chat
  3. Select DeepSeek V4.1 Flash (free plan, OpenCode provider)
  4. Send any message (e.g. "Hola")
  5. Request fails immediately

Relevant log excerpt (from "Copilot: Create log file"):

2026-09-27T17:36:44.757Z INFO safeFetch request 2026-09-27T17:36:45.357Z ERROR [ChatPersistenceManager] Error generating AI topic: 400 Request is missing x-opencode-session and cannot be routed efficiently. Please see https://opencode.ai/docs/go/#where-can-i-use-it Error: 400 Request is missing x-opencode-session and cannot be routed efficiently. Please see https://opencode.ai/docs/go/#where-can-i-use-it at t.generate (plugin:copilot:3258:2189) at Ln.makeStatusError (plugin:copilot:3288:2084) at Ln.makeRequest (plugin:copilot:3288:6132) 2026-09-27T17:36:45.406Z ERROR Error during LLM invocation: 400 Request is missing x-opencode-session and cannot be routed efficiently.

Since 2026-09-05, OpenCode Go requires a stable x-opencode-session header on every inference request (per the linked docs). Copilot does not appear to send this header when calling the opencode-go provider.

Expected behavior Quick Chat should attach a stable x-opencode-session header on requests to the OpenCode Go provider, so they aren't rejected with this 400 error.

Screenshots

Additional context This same setup (OpenCode provider) works without issues on desktop via Agent Mode. The v4.0.0 release notes state Agent Mode is desktop-only and mobile uses the classic Quick Chat path, which may explain why this only reproduces on mobile. Another Obsidian plugin (OpenAgent, using the same OpenCode Go / deepseek-v4.1-flash combination) fails with the identical error, pointing to the same root cause rather than something Copilot-specific.

Source: logancyang/obsidian-copilot