youngkermit8-coder opened a new pull request, #1567:
URL: https://github.com/apache/rocketmq-dashboard/pull/1567

   ## Summary
   
   - consume OpenAI-compatible SSE response bodies on a JDK 21 virtual reader;
   - bound response-body consumption by the configured provider request timeout;
   - close the response stream and cancel the reader on timeout or caller 
interruption;
   - preserve normal token delivery and the existing structured 504 timeout 
contract;
   - add a post-header stall regression test.
   
   ## Root cause
   
   `HttpResponse.BodyHandlers.ofInputStream()` returns after the response 
headers
   are available. The configured `HttpRequest.timeout` therefore did not bound 
the
   subsequent `BufferedReader.readLine()` calls in `parseStream`. A provider 
that
   sent headers or an initial event and then kept the connection open could 
retain
   the gateway worker indefinitely, while the existing `HttpTimeoutException`
   handler was never reached.
   
   ## Impact
   
   Stalled HTTP SSE providers now release the caller and response stream and 
return
   `llm.provider.timeout` with HTTP 504. Successful streams and provider parsing
   errors keep their existing behavior.
   
   ## Validation
   
   The current base branch requires the unrelated compilation fix from #1502. In
   an isolated JDK 21 worktree with #1502 applied:
   
   - `OpenAiCompatibleLlmClientTest`: 13 tests passed;
   - the new post-header stall test passed in 3 additional consecutive runs;
   - Checkstyle reported 0 violations;
   - the Spring Boot package build succeeded.
   
   Closes #1564
   


-- 
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]

Reply via email to