Repository navigation
MALFORMED_RESPONSE "DeepSeek Messages SSE event type mismatch" hard-fails every in-flight turn in synchronized waves #9721
Replies: 2 comments
|
Evidence update — third wave, same code, with a clear timing signature. Wave 3: 2026-10-15T01:38:39Z - 01:55:18Z, 7 of 7 live sessions, identical New observation: the failures are locked to a ~15-minute streaming duration. +15m02s, +15m03s, +15m03s, +15m07s, +15m03s (wave 3, five measured turns) That is 12 kills within 15m01s-15m09s of continuous streaming, and the waves This strengthens the suggested fix above: on |
|
One more data point, and it may tie the whole picture together: we just got a {"message":"Service is too busy. We advise users to temporarily switch to request_id 8b79906e-08a3-4da6-ab44-4461a17417ca at 2026-10-15T02:11:46Z, if Working hypothesis after 5 waves: the ~15-minute stream cutoff and the 503s |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Environment: dsh 0.2.0-rc.2 (@deepseek-ai/dsh), Node v26.11.1, macOS arm64.
~12 concurrent agent sessions talking to the DeepSeek Messages endpoint.
What happened: twice in one evening, every session with a request in flight was
killed at nearly the same instant. Each turn ended with the same error:
{"kind":"error","error":{"message":"DeepSeek Messages SSE event type mismatch",
"code":"MALFORMED_RESPONSE"}}
Timestamps (UTC):
Wave 1: 2026-10-15T01:14:37Z - 01:14:59Z (7 of 7 live sessions)
Wave 2: 2026-10-15T01:30:03Z - 01:30:37Z (5 of 5 live sessions)
Both waves: synchronized across all streams, twice — 22-second fan-out, no
per-connection variation, including sessions idle between tool calls.
Where it throws (@deepseek-ai/dsh-llm-deepseek, lib/index.js; still identical in
0.2.1-alpha.3):
if (typeof event.type !== "string" || frame.event !== void 0 && frame.event !== event.type)
throw new LlmError("DeepSeek Messages SSE event type mismatch", "MALFORMED_RESPONSE");
Notes:
{"message":"DeepSeek Messages transport failed","code":"TRANSPORT"}; possibly
unrelated, listed for completeness.
Asks:
event:disagrees with the JSONtypehere (proxy/LB frame injection, upstream stream merge)? The synchronized
fan-out suggests a server-side stream fault.
of failing the whole turn — or at least classify this as retryable?
classification is all we have to diagnose with.
Suggested fix (non-maintainer suggestion, from reading the current parser):
Keep MALFORMED_RESPONSE for genuinely unparseable frames only, treat the JSON
body's
typeas authoritative over the frame'sevent:name, skip unknownevent types with a log line, and include the raw frame in any error you do raise.
If you prefer to keep failing on a frame/event mismatch, the minimum that would
help us: classify it as retryable (so the turn layer retries instead of ending
the turn) and include the offending
frame.datain the error message.Additional suggested code changes (same non-maintainer status; based on the
exports visible in the module — LlmError, RetryPolicySchema, resolveRetryPolicy):
MALFORMED_RESPONSE and TRANSPORT end the turn, but both observed failure modes
were transient server-side stream events — several attempts in our waves were
killed while the session was idle between tool calls, and the next request on
the same connection worked fine:
ending in one of these codes as a plain, non-alarming error row with a Retry
action, keeping the session usable. That is much easier to make honest if (1)
and (2) exist upstream: our Retry button would simply re-issue the turn, rather
than guessing whether the failure was stream breakage or a provider refusal.
All reactions