fix(openai-compatible-builder): ignore embed & gemini-2.5-pro model (#658)

This commit is contained in:
藍+85CD
2025-10-17 16:12:08 +08:00
committed by GitHub
parent a32cd262ce
commit bda3a5f317
@@ -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) {