Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

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

Niko122159cee65da3c1
diff --git a/serve/test_prompt_encoder.py b/serve/test_prompt_encoder.py
index 36cc06f29..897ddd675 100644
--- a/serve/test_prompt_encoder.py
+++ b/serve/test_prompt_encoder.py
@@ -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}]