feat(chat): Enhance bypass handling and introduce CC filter naming feature

Fix : Ollam Provider response
This commit is contained in:
decolua
2026-03-13 09:41:40 +07:00
parent 4b5111974a
commit 373b10ebb5
7 changed files with 94 additions and 12 deletions
+3 -1
View File
@@ -162,7 +162,9 @@ export function createSSEStream(options = {}) {
const parsed = parseSSELine(trimmed, targetFormat);
if (!parsed) continue;
if (parsed && parsed.done) {
// For Ollama: done=true is the final chunk with finish_reason/usage, must translate
// For other formats: done=true is the [DONE] sentinel, skip
if (parsed && parsed.done && targetFormat !== FORMATS.OLLAMA) {
const output = "data: [DONE]\n\n";
reqLogger?.appendConvertedChunk?.(output);
controller.enqueue(sharedEncoder.encode(output));