You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Engine] non-streaming /v1 requests are hard-cancelled at ~300 s and answered 502 Bad Gateway; streaming unaffected (1 119 s completed) #6756
Desktop app (Strata 0.2.20) — the local gateway (node host listening on 127.0.0.1:47831) in front of the bundled engine.
What happened
A non-streamingPOST /v1/chat/completions whose total time exceeds ≈300 s is cancelled upstream and the client receives HTTP 502 Bad Gateway with no body. The engine log shows the gateway sent the cancel while the engine was healthy and mid-prefill:
[strata] reading the prompt: 27,136 of 63,805 tokens, 304 s so far
[strata] done: 0 tokens in 304 s (no speed) (cancel, cancel=True)
client side:
urllib.error.HTTPError: HTTP Error 502: Bad Gateway
502 reads as "upstream is broken"; here the upstream was fine and working — it was cancelled. The boundary is sharp: a 34 378-token prefill finished in 291 s and succeeded, the 63 805-token one was killed at 304 s. With this host's prefill (~169 tok/s falling with depth) the effective non-streaming single-shot ceiling is ≈34k prompt tokens.
Expected: a timeout that says so (504 or an explicit error body, e.g. "request exceeded 300 s — use stream:true"), a configurable gateway timeout, or streaming as the default for long work. As it stands a legitimate long request is indistinguishable from a broken gateway.
Smallest steps or command that reproduce it
POST /v1/chat/completions on 127.0.0.1:47831 with stream absent/false, a ~64k-token prompt, small max_tokens.
Wait ~300 s → client gets HTTP 502; desktop host log (app-1.server.log) shows done: 0 tokens in 304 s ... (cancel, cancel=True).
Control: the same request with "stream": true completes — measured 1 119 s end-to-end for a 63 805-token prompt on the same host.
Reproduction status
Reproduced locally (304 s cancel observed; boundary bisected by a 291 s success against a 304 s cancel)
Strata version
Strata 0.2.20 · engine strata-inkling 0.1.66 (the cancel is issued by the desktop host gateway, logged in app-1.server.log)
Inkling-2-Mini SQ-10 · 128K context (n_ctx=131072) · non-streaming vs streaming A/B on the same endpoint, same prompt
Logs
[strata] reading the prompt: 512 of 63,805 tokens, 3 s so far
... (progress to 27,136 tokens at 304 s)
[strata] done: 0 tokens in 304 s (no speed) (cancel, cancel=True)
urllib.error.HTTPError: HTTP Error 502: Bad Gateway
File "urllib/request.py", line 531, in http_response
Activity