server: fix data race in to_json_anthropic (#18283)

This commit is contained in:
Xuan-Son Nguyen
2025-12-22 13:21:43 +01:00
committed by GitHub
parent ee74642982
commit 3997c78e33

View File

@@ -1153,7 +1153,7 @@ json server_task_result_rerank::to_json() {
json server_task_result_cmpl_partial::to_json_anthropic() {
json events = json::array();
bool first = (n_decoded == 1);
static bool text_block_started = false;
bool text_block_started = false;
if (first) {
text_block_started = false;