fix: droid增加comm端点

This commit is contained in:
shaw
2025-11-27 20:38:50 +08:00
parent 89238818eb
commit 4aeb47062b
4 changed files with 197 additions and 17 deletions

View File

@@ -13,9 +13,15 @@ class DroidScheduler {
return 'anthropic'
}
const normalized = String(endpointType).toLowerCase()
if (normalized === 'openai' || normalized === 'common') {
if (normalized === 'openai') {
return 'openai'
}
if (normalized === 'comm') {
return 'comm'
}
if (normalized === 'anthropic') {
return 'anthropic'
}
return 'anthropic'
}
@@ -57,6 +63,11 @@ class DroidScheduler {
return true
}
// comm 端点可以使用任何类型的账户
if (normalizedEndpoint === 'comm') {
return true
}
const sharedEndpoints = new Set(['anthropic', 'openai'])
return sharedEndpoints.has(normalizedEndpoint) && sharedEndpoints.has(accountEndpoint)
}