fix: fix model type logic based on provider properties
This commit is contained in:
parent
bc454d4dec
commit
8a94bb05ea
@ -1105,16 +1105,16 @@ export function isWebSearchModel(model: Model): boolean {
|
||||
|
||||
const provider = getProviderByModel(model)
|
||||
|
||||
if (provider.type === 'openai') {
|
||||
if (!provider) {
|
||||
return false
|
||||
}
|
||||
|
||||
if (provider?.type === 'openai') {
|
||||
if (model?.id?.includes('gemini-2.0-flash-exp')) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
if (!provider) {
|
||||
return false
|
||||
}
|
||||
|
||||
if (provider.id === 'gemini' || provider?.type === 'gemini') {
|
||||
return model?.id === 'gemini-2.0-flash-exp'
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user