mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 02:20:10 +08:00
fix(parameter-builder): avoid enabling built-in web search when external provider is configured (#9995)
This commit is contained in:
parent
d09743d254
commit
b33b14b4b7
@ -67,11 +67,14 @@ export async function buildStreamTextParams(
|
||||
assistant.settings?.reasoning_effort !== undefined) ||
|
||||
(isReasoningModel(model) && (!isSupportedThinkingTokenModel(model) || !isSupportedReasoningEffortModel(model)))
|
||||
|
||||
// 判断是否使用内置搜索
|
||||
// 条件:没有外部搜索提供商 && (用户开启了内置搜索 || 模型强制使用内置搜索)
|
||||
const hasExternalSearch = !!options.webSearchProviderId
|
||||
const enableWebSearch =
|
||||
(assistant.enableWebSearch && isWebSearchModel(model)) ||
|
||||
!hasExternalSearch &&
|
||||
((assistant.enableWebSearch && isWebSearchModel(model)) ||
|
||||
isOpenRouterBuiltInWebSearchModel(model) ||
|
||||
model.id.includes('sonar') ||
|
||||
false
|
||||
model.id.includes('sonar'))
|
||||
|
||||
const enableUrlContext = assistant.enableUrlContext || false
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user