From 746425528fcdf7ae3423a9e607bc68707a49d155 Mon Sep 17 00:00:00 2001 From: Leon Date: Mon, 13 Jul 2026 19:12:08 +0800 Subject: [PATCH] fix: disable thinking and extend timeout for filename translation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qwen3.6-plus on DashScope uses extended thinking by default, causing filename translation to timeout at 10s (reasoning tokens add latency). - enable_thinking: false → skip CoT for this simple one-word task - timeout: 10 → 30s as safety net for slower environments --- docutranslate/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docutranslate/app.py b/docutranslate/app.py index 6dbb17c..92fc904 100644 --- a/docutranslate/app.py +++ b/docutranslate/app.py @@ -668,8 +668,9 @@ async def _translate_filename_stem( "messages": [{"role": "user", "content": prompt}], "max_tokens": 60, "temperature": 0, + "enable_thinking": False, }, - timeout=10, + timeout=30, ) resp.raise_for_status() translated = resp.json()["choices"][0]["message"]["content"].strip().strip("\"'")