fix: aihubmix provider model proxy rule (#6293)

Update AihubmixProvider.ts

Co-authored-by: zhaochenxue <zhaochenxue@bixin.cn>
This commit is contained in:
chenxue 2025-05-22 14:46:40 +08:00 committed by GitHub
parent 587e1d9971
commit 86b95ee17a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -39,11 +39,12 @@ export default class AihubmixProvider extends BaseProvider {
*/
private getProvider(model: Model): BaseProvider {
const id = model.id.toLowerCase()
if (id.includes('claude')) {
// claude开头
if (id.startsWith('claude')) {
return this.providers.get('claude')!
}
if (id.includes('gemini')) {
// gemini开头 且不以-nothink、-search结尾
if (id.startsWith('gemini') && !id.endsWith('-nothink') && !id.endsWith('-search')) {
return this.providers.get('gemini')!
}
if (isOpenAILLMModel(model)) {