RockteMQ-AI commented on issue #1008: URL: https://github.com/apache/rocketmq-dashboard/issues/1008#issuecomment-5190968475
**Issue Evaluation** Category: `bug` | Status: **Confirmed** The reported issue has been verified against the current codebase. **Root Cause:** `OpenAiCompatibleLlmClient` reads upstream LLM provider responses without any size limit — `complete()` and `listModels()` use `HttpResponse.BodyHandlers.ofString()`, streaming error paths call `InputStream.readAllBytes()`, and SSE parsing accumulates `data:` lines without per-event or cumulative budgets. A malformed or unexpectedly large upstream response can allocate excessive memory and stall the Studio server. **Impact:** Studio server stability — a single misbehaving LLM provider response can cause OOM or severe memory pressure. **Severity:** medium **Suggested fix:** - Apply configurable size limits to regular completion/model responses, streaming error bodies, individual SSE events, and cumulative streamed responses. - Stop reading and return a structured `llm.provider.response_too_large` error when a limit is exceeded. - Keep normal OpenAI-compatible behavior unaffected for responses within limits. --- *Automated evaluation by RockteMQ-AI* -- 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]
