youngkermit8-coder opened a new issue, #1564: URL: https://github.com/apache/rocketmq-dashboard/issues/1564
## Bug `OpenAiCompatibleLlmClient.stream` sends the request with `HttpResponse.BodyHandlers.ofInputStream()` and then consumes the SSE body synchronously in `parseStream`. The configured `HttpRequest.timeout` protects the request until the `HttpResponse<InputStream>` is returned, but it does not impose a deadline on subsequent reads from that input stream. If an OpenAI-compatible provider sends the response headers (or an initial SSE event) and then stops producing data without closing the connection, `BufferedReader.readLine()` can block indefinitely. The existing `HttpTimeoutException` catch cannot handle this post-header stall. ## Impact - an upstream provider can retain a Studio SSE worker indefinitely; - repeated stalled streams can exhaust gateway capacity; - callers never receive the advertised structured 504 timeout response. ## Expected behavior - enforce the configured request timeout while consuming the SSE body; - close the response stream and cancel the reader when the deadline expires; - return the existing `llm.provider.timeout` / HTTP 504 contract; - preserve normal token delivery and interruption handling. ## Proposed validation Add an HTTP fixture that sends a valid SSE event and flushes the response, then keeps the body open past a short test timeout. The client should emit the first token and fail with the structured 504 before the server closes the body. ## Duplicate check Searched issues and PRs for `SSE timeout`, `HTTP stream timeout`, `post-header`, `ofInputStream`, `provider stream hang`, and `HttpTimeoutException`. No matching open or historical fix was found. Closed #1008/#1009 concern payload size limits, while #1517/#1518 concern the Claude CLI subprocess path. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
