From c85b92c69c955961621193cd51da194f3cbcedf3 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Tue, 29 Sep 2026 15:32:35 +0300 Subject: [PATCH] tests : adjust server string regex to also match m2 utlra results (#29648) --- tools/server/server-context.cpp | 2 +- tools/server/tests/unit/test_completion.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/server/server-context.cpp b/tools/server/server-context.cpp index 2036319c1..fbfcbe512 100644 --- a/tools/server/server-context.cpp +++ b/tools/server/server-context.cpp @@ -3155,7 +3155,7 @@ private: // TODO: support memory-less logits computation if (slot.task->need_logits() && !llama_get_memory(ctx_tgt)) { - send_error(slot, "the current context does not logits computation. skipping", ERROR_TYPE_SERVER); + send_error(slot, "the current context does not support logits computation. skipping", ERROR_TYPE_SERVER); slot.release(); return; } diff --git a/tools/server/tests/unit/test_completion.py b/tools/server/tests/unit/test_completion.py index 01732eb16..09482b75c 100644 --- a/tools/server/tests/unit/test_completion.py +++ b/tools/server/tests/unit/test_completion.py @@ -148,7 +148,7 @@ def test_completion_stream_with_openai_library_stops(): if choice.finish_reason is None: assert choice.text is not None output_text += choice.text - assert match_regex("Sure, here's one for[\\s\\S]*", output_text), f'Unexpected output: {output_text}' + assert match_regex("Sure, here's one for[\\s\\S]*|Sure! Here's one for you[\\s\\S]*", output_text), f'Unexpected output: {output_text}' @pytest.mark.parametrize("n_slots", [1, 2])