Wang1rrr opened a new issue, #6993:
URL: https://github.com/apache/rocketmq-dashboard/issues/6993
### Problem
OpenAiCompatibleLlmClient uses InputStreamReader and checks each line for a
literal `data:` prefix. A valid SSE stream starting with a UTF-8 BOM produces a
first line beginning with U+FEFF, so its first completion chunk is silently
discarded.
### Reproduction
Serve UTF-8 bytes for BOM + `data:
{"choices":[{"delta":{"content":"first"}}]}` followed by a blank line, a second
chunk and `[DONE]`. The current client emits only the second chunk. The
regression uses the local HTTP test fixture and reproduces this on c34535d.
### Expected
Discard exactly one leading BOM before parsing field names, preserving
U+FEFF when it occurs inside message content. The SSE standard specifies this
behavior:
https://html.spec.whatwg.org/multipage/server-sent-events.html#interpreting-an-event-stream
All 30 focused gateway tests pass after the fix, including preservation of
an interior U+FEFF.
--
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]