fix: enableWebSearch logic error (#9730)

fix: 修复enableWebSearch条件判断逻辑错误
This commit is contained in:
Phantom 2025-08-31 20:52:29 +08:00 committed by GitHub
parent 16973fc034
commit 57d9b79e77
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -475,6 +475,7 @@ export async function fetchChatCompletion({
// NOTEassistant.enableWebSearch 的语义是是否启用模型内置搜索功能
const enableWebSearch =
assistant.enableWebSearch ||
(assistant.webSearchProviderId && isWebSearchModel(model)) ||
isOpenRouterBuiltInWebSearchModel(model) ||
model.id.includes('sonar') ||