fix: handle unknown models in iswebsearchmodel function
This commit is contained in:
parent
9c18b851cc
commit
6af07c278d
@ -1060,5 +1060,10 @@ export function isSupportedModel(model: OpenAI.Models.Model): boolean {
|
||||
|
||||
export function isWebSearchModel(model: Model): boolean {
|
||||
const provider = getProviderByModel(model)
|
||||
|
||||
if (!provider) {
|
||||
return false
|
||||
}
|
||||
|
||||
return (provider.id === 'gemini' || provider?.type === 'gemini') && model?.id === 'gemini-2.0-flash-exp'
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user