coder999o opened a new pull request, #6949: URL: https://github.com/apache/rocketmq-dashboard/pull/6949
## What is the purpose of the change An OpenAI-compatible provider can return HTTP 200 and close its stream without any completion content. The client currently returns normally, allowing an empty chat turn to be recorded as completed. Report the existing `502 / llm.provider.empty_completion` gateway error when the stream ends without emitting content. ## Brief changelog - Track emitted content without buffering the answer or changing token delivery. - Preserve whitespace-only content, final events at EOF, and existing timeout, size-limit and provider-error handling. - Add loopback HTTP regressions for empty, comment-only, DONE-only, metadata-only and non-SSE responses, plus whitespace and EOF compatibility cases. ## Verifying this change - Before the fix, the new tests ran 10 cases: all 7 no-content cases failed because no exception was raised; the 3 compatibility cases passed. - `mvn -B -ntp -f server/pom.xml -Dtest=OpenAiCompatibleLlmClientTest,AiPayloadGuardTest,LlmControllerTest,AiRunExecutorTest,AiRunServiceTest test` — 93 tests passed; Checkstyle reported 0 violations. Run with JDK 22, compiling for Java 21. - `git diff --check` — passed. The client tests use a local HTTP server. No live model provider or full backend suite was exercised. -- 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]
