Repository navigation
Description
Follow-up to #1065
This is a follow-up to #1065 and the fix in #1088. The first-byte deadline change is working, but the remaining inter-chunk inactivity limit can still turn a valid DeepSeek V4 Flash turn into a local 502.
Client or integration
Codex App through OpenCodex
Environment
- OpenCodex:
2.10.2 - Platform: macOS
- Provider: built-in
deepseek - Model:
deepseek-v4-flash - Inbound protocol: Responses
- Reasoning effort:
max - Current official registry route: bounded non-streaming JSON upstream, then Responses event synthesis
Observed response
The following sanitized request-log fields were recorded in a real conversation. The prompt, API key, conversation ID, and request ID are intentionally omitted:
{
"model": "deepseek-v4-flash",
"provider": "deepseek",
"inboundProtocol": "responses",
"requestedModel": "deepseek/deepseek-v4-flash",
"requestedEffort": "max",
"status": 502,
"durationMs": 90241,
"errorCode": "upstream_server_error",
"closeReason": "non_stream",
"upstreamError": "upstream JSON response stalled before completing",
"usageStatus": "unreported"
}Why this appears distinct from #1065
PR #1088 gives the first body byte a 180-second allowance while intentionally retaining a 30-second inactivity limit between later body chunks. This failure occurred after the first-byte fix was available and lasted about 90 seconds before the bounded JSON reader returned 502.
The current log does not expose the exact upstream chunk boundaries, but the non_stream close reason and the bounded-JSON error are consistent with a post-first-byte body stall rather than the original early first-byte timeout.
Expected behavior
DeepSeek V4 Flash should either complete the valid Responses turn or return an upstream-specific error. A slow thinking turn should not be converted into a misleading local 502 solely because a later JSON body chunk takes more than 30 seconds.
Suggested investigation
- Add phase-safe diagnostics for headers, first byte, and subsequent body chunks without logging prompt or reasoning content.
- Confirm whether DeepSeek V4 Flash can legitimately pause for more than 30 seconds while producing a non-streaming JSON response at
maxeffort. - Consider a model-scoped/configurable inter-chunk timeout for this bounded JSON path, while preserving a finite total deadline.
- If the native Responses stream now terminates reliably, consider restoring streaming for this model with the existing terminal-event and item-id repairs.
Activity
github-actions commentedon Aug 7, 2026
Automated translation bookkeeping — detected language: unknown.
github-actions commentedon Aug 7, 2026
Issue closed: use an issue template
Thanks for taking the time to submit this issue. It was closed automatically because it was not opened with a recognized issue template (Bug report, Feature request, Documentation, or Provider compatibility). Freeform and API-opened issues cannot skip this check.
Please edit the issue to add:
See the Contributing guide for details.
Once the report passes the automated checks, it will be reopened automatically unless a maintainer has changed its state.