mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-30 07:39:06 +08:00
fix(models): some qwen3 models cannot disable thinking (#8854)
* fix(models): 修正qwen3模型thinking系列的支持判断
修复qwen3模型中thinking系列不应支持控制思考的逻辑错误
* Revert "fix(models): 修正qwen3模型thinking系列的支持判断"
This reverts commit 189d878dc3.
* feat(OpenAIApiClient): 添加对Qwen3235BA22B模型的支持
处理Qwen3235BA22B模型的特殊逻辑,当检测到该模型时禁用enable_thinking
This commit is contained in:
parent
a3b8c722a7
commit
c6cc1baae1
@ -7,6 +7,7 @@ import {
|
||||
isDoubaoThinkingAutoModel,
|
||||
isGrokReasoningModel,
|
||||
isNotSupportSystemMessageModel,
|
||||
isQwen3235BA22BThinkingModel,
|
||||
isQwenMTModel,
|
||||
isQwenReasoningModel,
|
||||
isReasoningModel,
|
||||
@ -145,6 +146,9 @@ export class OpenAIAPIClient extends OpenAIBaseClient<
|
||||
return { reasoning: { enabled: false, exclude: true } }
|
||||
}
|
||||
if (isSupportedThinkingTokenQwenModel(model) || isSupportedThinkingTokenHunyuanModel(model)) {
|
||||
if (isQwen3235BA22BThinkingModel(model)) {
|
||||
return {}
|
||||
}
|
||||
return { enable_thinking: false }
|
||||
}
|
||||
|
||||
@ -192,7 +196,7 @@ export class OpenAIAPIClient extends OpenAIBaseClient<
|
||||
// Qwen models
|
||||
if (isSupportedThinkingTokenQwenModel(model)) {
|
||||
const thinkConfig = {
|
||||
enable_thinking: true,
|
||||
enable_thinking: isQwen3235BA22BThinkingModel(model) ? undefined : true,
|
||||
thinking_budget: budgetTokens
|
||||
}
|
||||
if (this.provider.id === 'dashscope') {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user