mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-08 22:39:36 +08:00
fix: enable reasoning cot bug (#12342)
This commit is contained in:
parent
d0a1512f23
commit
040f4daa98
@ -183,13 +183,12 @@ function addProviderSpecificMiddlewares(builder: AiSdkMiddlewareBuilder, config:
|
||||
break
|
||||
case 'openai':
|
||||
case 'azure-openai': {
|
||||
if (config.enableReasoning) {
|
||||
const tagName = getReasoningTagName(config.model?.id.toLowerCase())
|
||||
builder.add({
|
||||
name: 'thinking-tag-extraction',
|
||||
middleware: extractReasoningMiddleware({ tagName })
|
||||
})
|
||||
}
|
||||
// 就算这里不传参数也有可能调用推理
|
||||
const tagName = getReasoningTagName(config.model?.id.toLowerCase())
|
||||
builder.add({
|
||||
name: 'thinking-tag-extraction',
|
||||
middleware: extractReasoningMiddleware({ tagName })
|
||||
})
|
||||
break
|
||||
}
|
||||
case 'gemini':
|
||||
|
||||
Loading…
Reference in New Issue
Block a user