mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-19 14:41:24 +08:00
fix(AssistantService): adjust reasoning effort
Set reasoning effort to 'none' only if supported by model, otherwise use 'default'.
This commit is contained in:
parent
00e800454d
commit
64efef7435
@ -6,6 +6,7 @@ import {
|
||||
MAX_CONTEXT_COUNT,
|
||||
UNLIMITED_CONTEXT_COUNT
|
||||
} from '@renderer/config/constant'
|
||||
import { getModelSupportedReasoningEffortOptions } from '@renderer/config/models'
|
||||
import { isQwenMTModel } from '@renderer/config/models/qwen'
|
||||
import { UNKNOWN } from '@renderer/config/translate'
|
||||
import { getStoreProviders } from '@renderer/hooks/useStore'
|
||||
@ -73,7 +74,9 @@ export function getDefaultTranslateAssistant(
|
||||
throw new Error('Unknown target language')
|
||||
}
|
||||
|
||||
const reasoningEffort = 'none' // 翻译不需要思考模式,直接禁用
|
||||
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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user