server : do not parse when flushing http headers (#24281)

This commit is contained in:
Aldehir Rojas
2026-06-08 13:32:41 -05:00
committed by GitHub
parent a66d50588b
commit 42a0afd594
+3
View 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)