Repository navigation
[desktop] All model requests fail in the Electron desktop app (TRANSPORT) while dsh headless and the web UI succeed with the identical profile, credentials, model and network
#9355
Replies: 3 comments
✅ RESOLVED — root cause found: two plugins monkey-patching
|
|
Follow-up from a plugin author. Your correction is the right one; here are the three source facts that made this failure structurally unattributable, plus the plugin shape that would name it. The cause chain has two silencing stages, not one. Stage one is your root cause (two plugins composing
Why "all providers fail at once" is the composition signature. Provider adapters share no transport, no client and no credential path. The only things they do share in one host process are The plugin I am building. A composition doctor for process-global patching, in the same family as the two we already publish —
If you have a preference between "scan at boot" and "stay silent until the first transport failure", that decides the default. My inclination is the second: a boot scan on a healthy machine is noise, and the notice is far more useful attached to the failure it explains. |
|
The expensive part of this shape is not that the request failed — it is that the session records The cause does exist, but it dies in two steps. The adapter's catch-all ends the stream generator with I published a plugin for the reading half of this: npm install @argszero/dsh-fetch-patch-doctorThe bundle patch mounts it; there is nothing to configure. What it uses is the one seam where the error is still alive — the Two boundaries I kept deliberately:
So it makes the two halves visible at once; it does not fix the adapter. The upstream fix is to keep the cause in the failure the adapter publishes, or to resolve the wrapper it is calling. Same family, if it is useful here: |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
[desktop] All model requests fail in the Electron desktop app (
TRANSPORT) whiledsh headlessand the web UI succeed with the identical profile, credentials, model and networkOn the same machine, at the same moment, with the identical profile config, credentials, model, reasoning effort and network:
dsh headless(desktop profile) → succeeds (2.9 s)Web UI (
http://127.0.0.1:3080, same~/.dsh) → succeedsDesktop app (Electron) → fails every time —
TRANSPORT, retries 5/5, 15–17 s per turnThe DSH engine, provider registration, credential resolution, network stack, model and endpoint are all fine. The failure exists only in the Electron desktop shell.
OS: Windows 10 Pro (
WIN-B045A165KFF, WORKGROUP, not domain-joined)DSH Desktop:
0.2.0-rc.2(%LOCALAPPDATA%\Programs\DeepSeek Harness)Electron: 44.0.0
Bundled Node: 24.18.1
DSH_HOME:
C:\Users\Administrator\.dshProfile:
desktopUpdate channel: nightly (
resources/app-update.yml→https://download.deepseek.com/dsh-desk/feeds/win-x64/)Latest on that channel:
0.2.0-rc.2(nightly.yml, releaseDate2026-09-29T10:35:27Z) — no update availableThird-party plugins in the profile:
@michengai/dsh-automation,@michengai/dsh-im-connect,dsh-auto-memory,dsh-cost-meter,dsh-opencode-session-header,dsh-tavern,dsh-whale-galgame,dshmarket(+ bundles)3.1 Two different error strings, one code
deepseek-official— adapterdsh-llm-deepseek(native) — UI textDeepSeek Messages transport failed— codeTRANSPORTdeepseek— adapterdsh-llm-pi-ai(OpenAI SDK) — UI textConnection error.— codeTRANSPORTopencode-go— adapterdsh-llm-pi-ai— UI textConnection error.— codeTRANSPORT3.2 Consistent failure signature
Retries exhausted at 5/5, total per turn 15–17 s (matches the default backoff
500+1000+2000+4000 ≈ 7.5 s)Retry delays observed:
7581 ms,8056 ms,8167 ms,8088 ms,7508 msOnly a full restart of the app allows a retry — once a session fails, it keeps failing
3.3 Onset
2026-10-10 07:50 (UTC+8) onwards. Up to that point everything worked ("login fine, model fine, streaming with no errors"). The machine boots on schedule (BIOS RTC) at 07:40; the first scheduled tasks at 07:50 failed. No local configuration change was made.
A) headless — SUCCEEDS
B) Desktop app — FAILS
Launch
DeepSeek Harness.exeNew session → select
DeepSeek-V4-Pro(reasoning: Off) → sendtestActual:
本轮运行失败 DeepSeek Messages transport failed[TRANSPORT], retries 5/5, ~16 sBoth read the same
~/.dsh/profiles/desktop/cordis.patch.yml:Invalid model name —
deepseek-flash/deepseek-v4-proreturn HTTP 200 on all three endpoint shapes. (Note: the literal iddeepseek-v4.1-flashis rejected with 400 — see Bug B.)Multi-turn conversation — two-turn conversations tested in both OpenAI and Anthropic formats, all HTTP 200.
Tool calls — full
tool_calls+toolresult two-turn chain, HTTP 200.Thinking-block replay (Anthropic
thinking+signature) — replayed verbatim / thinking dropped / signature blanked: all three HTTP 200.Thinking mode itself — desktop still fails with
reasoning: Off.System proxy / TUN / proxy env vars —
ProxyEnable=0; no TUN adapter; default route normal;HTTP_PROXY/HTTPS_PROXY/ALL_PROXY/NO_PROXYunset in all three .NET scopes;~/.dsh/.envdoes not exist; Clash Vergeenable_tun_mode: false,enable_system_proxy: false.Local HTTPS MITM (AV / enterprise proxy) — disabled the machine's Aliyun SASE agent (service Stopped, driver Stopped, zero processes): problem persisted. Node TLS handshake to
api.deepseek.com/platform.deepseek.com/harness.deepseek.com:authorized=true, real TrustAsia / DigiCert chains.Windows Firewall — no DSH-related rules; no outbound Block rules; all three profiles default-allow outbound.
Endpoint unreachable —
api.deepseek.comHTTP 200 (841 ms);platform.deepseek.comendpoints 200/405;opencode.ai/zen/go/v1200.Bad credentials —
DEEPSEEK_API_KEYin~/.dsh/.credentials.yamlverified working.Polluted host-process environment — read the environment of the live DSH host process (PID 23664) directly: no proxy vars, no
NODE_EXTRA_CA_CERTS, noSSL_CERT_FILE, noDEEPSEEK_BASE_URL.Broken desktop composition config — the identical profile works under
dsh headlessand the web UI.Bug A — The desktop app writes no logs at all
%APPDATA%\@deepseek-ai\dsh-desktop\logs\contains only two crash logs — no regular runtime log. The host process's stdout/stderr go into an internal Electron pipe and are not reachable by the user.The only way I obtained a real error during this investigation was to reconstruct the host launch myself via
dsh headless. Not something an ordinary user can do.Suggested: persist host stderr to disk, or expose a diagnostics export in Settings.
Bug B — The model name shown in the UI does not match the model id actually sent
From the bundled catalog:
The UI shows "DeepSeek V4.1 Flash", but the id sent on the wire is
deepseek-flash. A genuinely different id,deepseek-v4.1-flash(present in theopencode-gocatalog), is rejected by api.deepseek.com:This mismatch cost a great deal of debugging time.
Bug C —
llm-deepseekfolds every non-HTTP failure intoTRANSPORTpackages/llm/llm-deepseek/src/adapter.ts:Credential-resolution failure (outside the
try) → labelledTRANSPORTAny other non-
LlmError→ alsoTRANSPORTThis is the same misclassification family as #8947 and #9262. Listed here because it repeatedly sent this investigation in the wrong direction.
Bug D — Two provider groups in the model picker are both labelled "DeepSeek"
The picker contains
DeepSeek(→deepseek-official),opencode-go, anddeepseek(→ the third-party pi-ai registration). Model display names overlap heavily (both show "DeepSeek V4.1 Flash" / "V4 Pro"). The user cannot tell which route is the account route, which is the API-key route, and which is a third-party gateway.Bug E —
opencode-goreportsConnection error.for what is actually HTTP 400 missingx-opencode-sessionReproduced with the bundled OpenAI SDK 6.40.0:
The UI shows the generic
Connection error.(APIConnectionErrorfallback text). The profile has@michengai/opencode-session-headerinstalled, but the header is not injected.Bug F — The desktop nightly channel has no newer build
nightly.ymlreports0.2.0-rc.2(2026-09-29), identical to what is installed.@deepseek-ai/dsh@0.2.1-alpha.2exists on npm but is a different distribution channel from the desktop app, so it cannot be used to fix the desktop.7. Related reports (checked — none is this bug)
#6934 — Desktop shell: plugin host APIs 403 for the renderer; plugin host routes registered on
webServerare unreachable from the desktop shell (fall through to SPAindex.html/405), while the same plugin set works in the browser UI. Closest match in shape (desktop-only, works in web UI). Worth checking whether the host-side half of our 8 third-party plugins is involved. Our symptom is that the model request fails, and it reproduces withreasoningEffort: offon a brand-new session.#9262 (and #7582, #7834) — Missing attachment object → session permanently fails, misreported as
TRANSPORT. Failure is local, 13–15 ms; ours is 15–17 s with 5 retries.#8947 —
streamIdleTimeoutMscapped by undici's 300 sbodyTimeout, misreported asTRANSPORT. Trigger is a >300 s silent stream; ours fails in ~16 s.#8837 — Desktop 0.2.0-rc.2: BOM in profile
package.jsoncrashes boot; turn-resume crash after interrupted tool call. Different failure points.earendil-works/pi#8838 — Multi-turn/tool-call sessions fail with
Connection error.becausereasoning_contentis echoed back as"". We tested multi-turn + tool calls + all three thinking-replay variants directly against the API: all HTTP 200.I could not find an existing report matching this one.
8. What remains unknown (stated honestly)
I did not identify the specific difference between the Electron shell and the headless run. §5 lists everything excluded.
The only remaining variable is the Electron runtime itself, and it is not observable from outside:
The desktop app writes no logs (Bug A)
Model requests are issued by the host process, so they do not appear in the renderer's DevTools Network panel — that panel only shows UI polling RPCs (
channels,snapshot,getState, …), all returning 200What I need: a way to make the desktop host process's network failures visible — write host stderr to disk, add a diagnostics toggle in Settings, or surface the real
causein the UI.9. Impact
Every provider fails in the desktop app (account route, API-key route, third-party gateway)
Scheduled automations all fail, every day (morning digests, heartbeat, patrol)
No self-service diagnosis is possible: no logs, error codes swallowed, provider groups indistinguishable by name
The only workaround is to use the web UI at
http://127.0.0.1:3080, which shares the same~/.dsh10. Appendix — probe scripts used
10.1 Decide "engine problem" vs "Electron-shell problem"
10.2 Read the live host process's environment (detect pollution)
10.3 TLS chain check (detect local interception)
10.4 Reproduce with the bundled OpenAI SDK (pi-ai route)
All reactions