fix(openai-compatible-builder): ignore embed & gemini-2.5-pro model (#658)
This commit is contained in:
@@ -122,7 +122,19 @@ export function buildOpenAICompatibleProvider(
|
||||
Authorization: `Bearer ${apiKey}`,
|
||||
},
|
||||
})
|
||||
if (models && models.length > 0)
|
||||
.then(models => models.filter(model =>
|
||||
[
|
||||
// exclude embedding models
|
||||
'embed',
|
||||
// exclude tts models, specifically for OpenAI
|
||||
'tts',
|
||||
// bypass gemini pro quota
|
||||
// TODO: more elegant solution
|
||||
'gemini-2.5-pro',
|
||||
].every(str => !model.id.includes(str)),
|
||||
))
|
||||
|
||||
if (models.length > 0)
|
||||
model = models[0].id
|
||||
}
|
||||
catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user