From 8ab375161de4ba39ff6452328bdb986fe86618d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=C2=B7Dong?= <98630204+GeorgeDong32@users.noreply.github.com> Date: Thu, 18 Dec 2025 20:16:09 +0800 Subject: [PATCH] fix: disable reasoning mode for translation to improve efficiency (#11998) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: disable reasoning mode for translation to improve efficiency - 修改 getDefaultTranslateAssistant 函数,将默认推理选项设置为 'none' - 避免 PR #11942 引入的 'default' 选项导致翻译重新启用思考模式 - 显著提升翻译速度和性能 - 符合翻译场景不需要复杂推理的业务逻辑 * fix(AssistantService): adjust reasoning effort Set reasoning effort to 'none' only if supported by model, otherwise use 'default'. --------- Co-authored-by: icarus --- src/renderer/src/services/AssistantService.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/services/AssistantService.ts b/src/renderer/src/services/AssistantService.ts index 91a95d691a..3983483aff 100644 --- a/src/renderer/src/services/AssistantService.ts +++ b/src/renderer/src/services/AssistantService.ts @@ -74,7 +74,9 @@ export function getDefaultTranslateAssistant( throw new Error('Unknown target language') } - const reasoningEffort = getModelSupportedReasoningEffortOptions(model)?.[0] + const supportedOptions = getModelSupportedReasoningEffortOptions(model) + // disable reasoning if it could be disabled, otherwise no configuration + const reasoningEffort = supportedOptions?.includes('none') ? 'none' : 'default' const settings = { temperature: 0.7, reasoning_effort: reasoningEffort,