yyqdbngt opened a new pull request, #1915:
URL: https://github.com/apache/rocketmq-dashboard/pull/1915

   ## What is the purpose of the change
   
   Harden the LLM gateway against two resource-exhaustion and lifecycle issues:
   
   - The gateway executor was unbounded (`Executors.newCachedThreadPool`), so a 
burst of concurrent LLM requests could spawn unbounded threads.
   - The HTTP error branch of the LLM client read the error body with 
`readAllBytes()` without closing the underlying `InputStream`.
   
   ## Brief changelog
   
   - Bound the LLM gateway executor to a fixed thread pool so concurrent agent 
chats cannot exhaust the thread pool.
   - Close the error response `InputStream` via try-with-resources in 
`OpenAiCompatibleLlmClient`, preventing the stream from leaking on upstream 
error responses.
   
   ## Verifying this change
   
   - `mvn -q compile -DskipTests`
   - `mvn -q 
-Dtest=OpenAiCompatibleLlmClientTest,OpenAiCompatibleLlmGatewayTest test`
   - `git diff --check`
   


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