]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
server : do not parse when flushing http headers (#24281)
authorAldehir Rojas <redacted>
Mon, 8 Jun 2026 18:32:41 +0000 (13:32 -0500)
committerGitHub <redacted>
Mon, 8 Jun 2026 18:32:41 +0000 (13:32 -0500)
tools/server/server-task.cpp

index 842be2ad3d9b642dcdf687c72ea70ea881595730..72a4bd076ad7d2011521fca6f9472e04bf58a517 100644 (file)
@@ -1393,6 +1393,9 @@ json server_task_result_cmpl_final::to_json_anthropic_stream() {
 //
 void server_task_result_cmpl_partial::update(task_result_state & state) {
     is_updated = true;
+    if (is_begin) {
+        return; // begin marker only flushes headers, skip parsing
+    }
     state.update_chat_msg(content, true, oaicompat_msg_diffs);
 
     // Copy current state for use in to_json_*() (reflects state BEFORE this chunk)