inference fixes

This commit is contained in:
Storme-bit
2026-04-10 04:19:14 -07:00
parent 035c02be5a
commit 037a8d5d32
4 changed files with 6 additions and 5 deletions

View File

@@ -66,7 +66,7 @@ export function streamMessage(sessionId, message, model, { onChunk, onDone, onEr
try {
const data = JSON.parse(raw);
if (data.text) onChunk(data.text);
if (data.done) onDone({ model, tokenCount: data.tokenCount ?? 0 });
if (data.done) onDone({ model: data.model ?? model, tokenCount: data.tokenCount ?? 0 });
if (data.error) onError(new Error(data.error));
} catch {
// malformed JSON — skip