From 4a7a9871fbe7d4e2b155a51fdafe81cb1af9d53a Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Mon, 5 Oct 2026 22:36:05 +0200 Subject: [PATCH] serve tests: the image-marker test no longer pins control-token text as special (#931 makes it text) --- serve/test_server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/serve/test_server.py b/serve/test_server.py index 23a37f7e..590cf05c 100644 --- a/serve/test_server.py +++ b/serve/test_server.py @@ -442,9 +442,9 @@ class ImageMarkers(unittest.TestCase): {"type": "text", "text": "d|>"}, *pictures] with self.assertRaisesRegex(ValueError, "do not match"): svc.prepare([{"role": "user", "content": cut}], None, {}) - # a prompt without the marker strings has exactly the ids it had (other special tokens as well) + # a prompt without the marker strings has exactly the ids it had old = lambda m, t=None: tok.encode(svc.template.render(m, tools=t), parse_special=True) # noqa: E731 - for msgs, tools in (([{"role": "user", "content": "plain <|im_end|> <|endoftext|>"}], None), + for msgs, tools in (([{"role": "user", "content": "plain text, no markers"}], None), # (#931: control-token text is text now) ([{"role": "system", "content": "s"}, {"role": "user", "content": pictures}], None), ([{"role": "user", "content": "x"}, {"role": "assistant", "content": "", "tool_calls": [{"function": {"name": "f", "arguments": {"a": "<|image"}}}]}],