feat: add thinking mode toggle to suppress reasoning-only response loops

Adds `llm.thinking` config option (default: true) that when disabled:
- Injects /no_think into the last user message for Qwen 3.x compatibility
- Sends chat_template_kwargs in API payload for backends that support it
- Silently and immediately nudges on reasoning-only responses instead of
  showing warnings and wasting retry iterations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-11 19:34:36 -05:00
parent 25fa7dc82b
commit f0d8ef8f0a
4 changed files with 46 additions and 11 deletions

View File

@@ -10,13 +10,11 @@ llm:
max_retries: 3
retry_backoff_base: 1.0
retry_backoff_max: 30.0
thinking: false # Disable model thinking/reasoning mode (reduces reasoning-only loops)
# Extra parameters merged into the API request body (model-specific).
# Examples:
# Qwen 3.x: enable_thinking: false
# DeepSeek: enable_thinking: false
# OpenAI: reasoning_effort: "low"
extra_body:
enable_thinking: false
# OpenAI: reasoning_effort: "low"
extra_body: {}
agent:
max_iterations: 25