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++

fix(serve): preserve explicit false against reasoning defaults

Tsurye69cbfa56801
diff --git a/serve/server.py b/serve/server.py
index ef41da5cc..78cf3e463 100644
--- a/serve/server.py
+++ b/serve/server.py
@@ -3555,7 +3555,7 @@ class Service:
if effort:
if api == "openai":
ctk = req.get("chat_template_kwargs") if isinstance(req.get("chat_template_kwargs"), dict) else {}
- if not req.get("reasoning_effort") and not req.get("reasoning") and \
+ if req.get("reasoning_effort") in (None, "") and not req.get("reasoning") and \
"enable_thinking" not in ctk and "reasoning_effort" not in ctk:
req["reasoning_effort"] = effort
elif not req.get("thinking") and not req.get("output_config"):
diff --git a/serve/test_effort_paths.py b/serve/test_effort_paths.py
index dbc1ae6fa..15525f6b5 100644
--- a/serve/test_effort_paths.py
+++ b/serve/test_effort_paths.py
@@ -130,6 +130,7 @@ class EffortPaths(unittest.TestCase):
"thinking": {"type": "enabled", "budget_tokens": 20000}}), "xhigh")
self.assertEqual(self.level("/v1/responses", {"input": "hello", "reasoning": {"effort": "high"}}), "xhigh")
self.assertEqual(self.level("/v1/chat/completions", {"messages": MSG, "reasoning_effort": "none"}), "none")
+ self.assertEqual(self.level("/v1/chat/completions", {"messages": MSG, "reasoning_effort": False}), "none")
def test_the_chat_settings_shared_with_apps_beat_the_config(self):
self.svc.config_effort = "low"