serve tests: the refused-prompt test runs in strict mode (fit_max_tokens off) so a huge max_tokens is refused, not shortened

This commit is contained in:
Niko1221 committed 2026-10-17 07:00:49 +02:00
1 parent 9a58a4b73a
commit 59cee65da3
1 file changed
+1
+1
View File
@@ -116,6 +116,7 @@ class Served(unittest.TestCase):
def test_a_refused_prompt_is_not_kept(self):
svc = self.service(max_context=4096)
svc.fit_max_tokens = False # the strict mode refuses an over-long max_tokens (the default now shortens it)
msgs = [{"role": "user", "content": "kept " * 20}]
svc.prepare(msgs, None, {}, 16)
refused = msgs + [{"role": "assistant", "content": "a"}, {"role": "user", "content": "more " * 20}]