Skip to content

Commit e0e69e4

Browse files
Merge pull request #9 from EnragedAntelope/claude/auto-model-discovery-vJqQA
Improve reasoning detection feedback and documentation
2 parents 717c848 + 079daf6 commit e0e69e4

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

LMStudio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def INPUT_TYPES(cls):
199199
# --- Reasoning extraction ---
200200
"reasoning_mode": (REASONING_MODE_OPTIONS, {
201201
"default": "Auto-detect (recommended)",
202-
"tooltip": "How to extract reasoning/thinking from model output. Auto-detect works with DeepSeek, Qwen, QwQ, GLM, GPT-OSS and similar models."
202+
"tooltip": "How to extract reasoning/thinking from model output. Auto-detect works with DeepSeek, Qwen, QwQ, GLM, GPT-OSS and similar models. Note: Models don't always produce thinking output for simple queries. For Qwen3, add '/think' to your prompt to force thinking mode."
203203
}),
204204
"custom_open_tag": ("STRING", {
205205
"default": "<think>",
@@ -588,8 +588,8 @@ def generate(
588588
final_response, reasoning, detected_pattern = self._extract_reasoning_auto(response_text)
589589
if detected_pattern:
590590
troubleshooting_lines.append(f"[INFO] Auto-detected reasoning format: {detected_pattern}")
591-
elif response_text != final_response:
592-
troubleshooting_lines.append("[INFO] Reasoning extracted")
591+
else:
592+
troubleshooting_lines.append("[INFO] No reasoning tags detected (model may not have used thinking for this query)")
593593
elif reasoning_mode == "Custom tags":
594594
final_response, reasoning = self._extract_reasoning_custom(
595595
response_text, custom_open_tag, custom_close_tag

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ Many reasoning models (DeepSeek R1, Qwen3, QwQ, GLM-Z1) wrap their "thinking" pr
7979

8080
This allows you to route reasoning to a separate display or log while keeping the final response clean.
8181

82+
### Forcing Thinking Mode
83+
84+
Models don't always produce thinking output for simple queries. To encourage thinking:
85+
- **Qwen3 models**: Add `/think` to your prompt (e.g., "Explain quantum physics /think")
86+
- **Other models**: Use phrases like "Think step by step" or "Show your reasoning"
87+
8288
## Custom Server Address
8389

8490
Default: `http://127.0.0.1:1234`

0 commit comments

Comments
 (0)