Environment
- LM Studio: 0.4.15+2
- OS: macOS (Apple Silicon M4)
- Model: qwen3.5-9b (Q4_K_M GGUF, 5.2GB)
- Backend: llama.cpp
Bug Description
When sending a simple text-generation request to the local OpenAI-compatible API (/v1/chat/completions), enableThinking: false is completely ignored. The model still outputs reasoning_content (thinking), and when max_tokens is limited, the thinking process consumes all tokens, leaving message.content empty.
This breaks any downstream consumer that reads message.content for non-structured-output use cases (e.g., summarization, compression, classification).
Reproduction
1. enableThinking: false via API — FAILS
curl -s -X POST http://localhost:1234/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.5-9b",
"messages": [
{"role": "system", "content": "直接输出结果,不要思考,简洁回答。"},
{"role": "user", "content": "1+1等于几?"}
],
"max_tokens": 100,
"temperature": 0.1,
"enableThinking": false
}'
Response:
{
"choices": [{
"message": {
"content": "",
"reasoning_content": "Thinking Process:\n1. Analyze the Request..."
}
}],
"usage": {
"completion_tokens": 100,
"completion_tokens_details": {
"reasoning_tokens": 99
}
}
}
content = empty
reasoning_tokens = 99 out of 100 tokens
- The only reason content is empty is that max_tokens ran out during thinking
2. chat_template_kwargs workaround — ALSO FAILS
Following the workaround from #1559:
curl -s -X POST http://localhost:1234/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.5-9b",
"messages": [
{"role": "user", "content": "写一句关于春天的诗"}
],
"max_tokens": 100,
"temperature": 0.1,
"chat_template_kwargs": {"enable_thinking": false}
}'
Result: Same behavior — reasoning_content still present, content empty.
3. defaultValue: false in model.yaml — ALSO FAILS
Edited ~/.lmstudio/hub/models/qwen/qwen3.5-9b/model.yaml:
customFields:
- key: enableThinking
defaultValue: false # ← explicitly set to false
Then reloaded the model. API behavior unchanged — thinking still fires.
Root Cause Analysis
Even with all three layers of suppression (API parameter, chat_template_kwargs, defaultValue in model.yaml), the Qwen3.5 model still generates a \<think>...\ block and outputs it as reasoning_content in the API response.
The key distinction from existing issues:
Our bug is different: This is plain text generation (no response_format). The symptom is:
When max_tokens is set, thinking eats the entire token budget, leaving content empty.
This is catastrophic for automated pipelines that rely on message.content — summarization scripts, classification pipelines, compression agents, etc.
Expected Behavior
When enableThinking: false is set (by any means — API param, chat_template_kwargs, or model.yaml defaultValue), the model should:
- Not produce any
<think> blocks or reasoning_content
- Output the final response directly in
message.content
If suppressing thinking is technically impossible for Qwen3.5, then at minimum LM Studio should:
- Honor a token budget split: reserve some tokens for
content even if thinking overflows
- Or document clearly that
enableThinking: false has no effect on Qwen3.5
Workaround Found by Community
Changing chat template to ChatML in LM Studio Developer → Inference → Prompt Template suppresses thinking, but this is a blunt workaround that may break vision/tool-use capabilities.
Environment
Bug Description
When sending a simple text-generation request to the local OpenAI-compatible API (
/v1/chat/completions),enableThinking: falseis completely ignored. The model still outputsreasoning_content(thinking), and whenmax_tokensis limited, the thinking process consumes all tokens, leavingmessage.contentempty.This breaks any downstream consumer that reads
message.contentfor non-structured-output use cases (e.g., summarization, compression, classification).Reproduction
1.
enableThinking: falsevia API — FAILSResponse:
{ "choices": [{ "message": { "content": "", "reasoning_content": "Thinking Process:\n1. Analyze the Request..." } }], "usage": { "completion_tokens": 100, "completion_tokens_details": { "reasoning_tokens": 99 } } }content= emptyreasoning_tokens= 99 out of 100 tokens2.
chat_template_kwargsworkaround — ALSO FAILSFollowing the workaround from #1559:
Result: Same behavior —
reasoning_contentstill present,contentempty.3.
defaultValue: falseinmodel.yaml— ALSO FAILSEdited
~/.lmstudio/hub/models/qwen/qwen3.5-9b/model.yaml:Then reloaded the model. API behavior unchanged — thinking still fires.
Root Cause Analysis
Even with all three layers of suppression (API parameter,
chat_template_kwargs,defaultValuein model.yaml), the Qwen3.5 model still generates a\<think>...\block and outputs it asreasoning_contentin the API response.The key distinction from existing issues:
content, and the content goes toreasoning_contentin the response #1698,response_format: json_schemaapplies schema constraint to reasoning stream on Qwen 3.5, leaving content empty #1773, [Bug]: qwen3.5-4b-mlx structured output returns JSON in reasoning_content while content is empty #1971 discuss structured output (response_format: json_schema) where JSON ends up inreasoning_contentOur bug is different: This is plain text generation (no response_format). The symptom is:
This is catastrophic for automated pipelines that rely on
message.content— summarization scripts, classification pipelines, compression agents, etc.Expected Behavior
When
enableThinking: falseis set (by any means — API param,chat_template_kwargs, ormodel.yamldefaultValue), the model should:<think>blocks orreasoning_contentmessage.contentIf suppressing thinking is technically impossible for Qwen3.5, then at minimum LM Studio should:
contenteven if thinking overflowsenableThinking: falsehas no effect on Qwen3.5Workaround Found by Community
Changing chat template to ChatML in LM Studio Developer → Inference → Prompt Template suppresses thinking, but this is a blunt workaround that may break vision/tool-use capabilities.