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

   ## What changed
   
   - stream merged CLI stdout/stderr into a bounded 5 MiB buffer instead of 
calling `readAllBytes()`
   - terminate the child process and return a structured 
`llm.provider.output_too_large` gateway error when the cap is exceeded
   - preserve interruption state and terminate the child process if output 
collection is interrupted
   - add regression coverage for output above the cap and output exactly at the 
cap
   
   ## Why
   
   `CliAgentProvider.complete()` previously buffered the child process's entire 
merged output in JVM heap. The existing 180-second timeout limited runtime but 
not memory use, so a CLI provider producing unbounded output could exhaust the 
Studio process heap.
   
   This keeps normal CLI responses unchanged while bounding the maximum memory 
consumed by one completion.
   
   Closes #1719
   
   ## Validation
   
   - baseline regression test failed before the implementation because 
oversized output completed without an exception
   - `mvn -Dtest=CliAgentProviderTest test` ? 3 tests passed
   - `mvn 
-Dtest=AiControllerTest,AiServiceTest,CliAgentProviderTest,LlmConfigServiceTest,LlmControllerTest,OpenAiCompatibleLlmClientTest,OpenAiCompatibleLlmGatewayTest
 test` ? 62 tests passed
   - `mvn -DskipTests package` ? passed; Checkstyle reported 0 violations
   


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