Aias00 opened a new issue, #6795: URL: https://github.com/apache/shenyu/issues/6795
- severity: Medium - files: `shenyu-plugin-ai/shenyu-plugin-ai-request-transformer/.../AiRequestTransformerPlugin.java:122-125`, `.../ai-response-transformer/.../AiResponseTransformerPlugin.java:353-356`, `shenyu-plugin-mcp-server/.../response/NonCommittingMcpResponseDecorator.java:85,98` - description: `chatClient.prompt().stream().content().collectList().map(list -> list.stream()...joining)` and `Flux.from(body).collectList()` subscribe to a (potentially unbounded) streaming `Flux` and buffer all emitted chunks into a `List` in heap before any downstream processing — no `.limitRate`, no chunked pass-through. For large LLM/streaming HTTP responses this defeats streaming backpressure and can buffer the entire response body. - impact: Heap pressure and added latency for large AI/streaming responses through the gateway. - suggested_fix: Process chunks incrementally (`concatMap`/`flatMap` per chunk) or add `.limitRate`; stream through rather than aggregating via `collectList`. - confidence: Medium-High --- _Identified during the 2026-08-02 deep re-scan; full list in [`docs/scan2-2026-08-02/06-medium-tiers.md`](docs/scan2-2026-08-02/06-medium-tiers.md)._ -- 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]
