fix: API would be stringified twice. That is now fixed.

This commit is contained in:
simosmik
2025-12-29 23:18:38 +00:00
parent 60c8bda755
commit babe96eedd
5 changed files with 84 additions and 54 deletions

View File

@@ -451,6 +451,7 @@ class SSEStreamWriter {
constructor(res) {
this.res = res;
this.sessionId = null;
this.isSSEStreamWriter = true; // Marker for transport detection
}
send(data) {
@@ -458,7 +459,7 @@ class SSEStreamWriter {
return;
}
// Format as SSE
// Format as SSE - providers send raw objects, we stringify
this.res.write(`data: ${JSON.stringify(data)}\n\n`);
}