[iOS] Two failures with OpenCode Go: built-in provider blocked before the model test, custom provider streams empty (both work via a reverse proxy)
Correction (2026-09-15): the provider configuration described below is wrong. The desktop side was using the built-in OpenCode Go provider, the iOS side the same endpoint configured as a generic custom provider. A second, separate failure of the built-in provider on iOS is also not covered below. See the correction comment for the full test matrix, the proxy captures and the transport evidence.
Summary
Chatbox Desktop (Electron) sends an x-opencode-session header on requests
to OpenAI-compatible custom providers. The iOS (Capacitor) app does not.
The OpenCode Go endpoint (https://opencode.ai/zen/go/v1/chat/completions)
rejects requests without this header with HTTP 400 MissingSessionID.
Because the iOS app swallows the 400 on the SSE stream, the chat appears
completely silent — no error message, no response.
Related issues
- #3891 (closed as completed, reported fixed in 1.23.2) asked for exactly
this header when calling OpenCode Go / OpenCode Zen. The fix is effective on
desktop 1.23.2, but the iOS app of the same version still sends no
x-opencode-session— the mobile code path appears not to be covered by it. This report is meant as a follow-up for that gap, not as a duplicate. - #3516 (open) reports iOS failures for custom OpenAI-compatible providers
and points at
src/renderer/utils/request.ts: on mobile, requests are only routed throughhandleMobileRequestwhenuseProxyis true, and otherwise fall back to a plainfetch()in the web view. That is consistent with theruntime/browserUser-Agent captured below and may be the same root cause.
Environment
- Desktop: Chatbox 1.23.2, Windows (Electron 35.7.5) — works
- Mobile: Chatbox iOS 1.23.2, iPhone, iOS 18.7 (Capacitor web view) — fails silently
- Provider config (both apps): OpenAI-compatible custom provider, API host
https://opencode.ai/zen/go, modelglm-5.3-flash, OpenCode Go API key
Steps to reproduce
- Create a custom OpenAI-compatible provider pointing to
https://opencode.ai/zen/gowith a valid OpenCode Go API key and modelglm-5.3-flash. - Desktop: chat works. Header dump of a desktop request shows:
x-opencode-session: 00000000-0000-0000-0000-000000000000 <- redacted; the real value is a per-conversation UUID User-Agent: Mozilla/5.0 ... xyz.chatboxapp.app/1.23.2 Chrome/134.0.6998.205 Electron/35.7.5 Safari/537.36 -> HTTP 200 OK - iOS: model list loads fine (
GET /v1/models→ 200; this endpoint does not require the header), but sending a chat message fails. Header dump of an iOS request (captured via a local logging proxy on ):NoPOST /v1/chat/completions Accept: text/event-stream Authorization: Bearer sk-D3...[redacted] User-Agent: ai-sdk/openai-compatible/2.0.62 ai-sdk/provider-utils/4.0.40 runtime/browser -> HTTP 400 BadRequestx-opencode-sessionheader is present. - Direct API test against the endpoint (bypassing Chatbox):
# without header: HTTP/1.1 400 Bad Request {"type":"error","error":{"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"}} # same request with -H "x-opencode-session: test-123": HTTP/1.1 200 OK (full chat completion response) - Injecting the header on the mobile request via a local proxy makes the iOS chat work immediately (200 OK, model responds).
Actual behavior
- iOS: provider setup and model list load successfully, but every chat message silently produces no output (the 400 on the SSE stream is swallowed).
- No error is surfaced to the user.
Expected behavior
- The iOS/Android apps should send a stable
x-opencode-sessionheader (e.g. a UUID generated per conversation, as the desktop app already does) on requests to OpenAI-compatible providers — or at least allow configuring custom HTTP headers per provider so users can satisfy provider requirements like OpenCode Go's. - Additionally: 4xx errors on streamed chat requests should be surfaced as an error message in the chat instead of failing silently.
Likely cause
(Inferred from the captured headers above; not verified against the source.)
The mobile apps use a different network stack (Capacitor + ai-sdk/openai-compatible/2.0.62)
than the desktop app (Electron). The x-opencode-session header support that
exists in the desktop code path is missing in the mobile path. OpenCode Go
documents the requirement here: https://opencode.ai/docs/go/#where-can-i-use-it
("Send a stable session ID in x-opencode-session for each conversation").
Suggested fix
- Generate a stable per-conversation UUID and send it as
x-opencode-sessionon all provider chat requests in the mobile apps (parity with desktop), and/or - add a "custom headers" field to custom provider settings on all platforms, and/or
- surface HTTP errors from streamed requests in the chat UI instead of failing silently.
Workaround
A local/VPS reverse proxy that injects x-opencode-session makes the iOS app
work (verified). This is a workaround only; native support would remove the need.
Source: chatboxai/chatbox