This commit is contained in:
SunSeekerX
2026-01-21 11:55:28 +08:00
149 changed files with 15035 additions and 4017 deletions

View File

@@ -207,6 +207,36 @@ class ServiceRatesService {
return 'claude'
}
/**
* 根据账户类型获取服务类型(优先级高于模型推断)
*/
getServiceFromAccountType(accountType) {
if (!accountType) return null
const mapping = {
claude: 'claude',
'claude-official': 'claude',
'claude-console': 'claude',
ccr: 'ccr',
bedrock: 'bedrock',
gemini: 'gemini',
'openai-responses': 'codex',
openai: 'codex',
azure: 'azure',
'azure-openai': 'azure',
droid: 'droid'
}
return mapping[accountType] || null
}
/**
* 获取服务类型(优先 accountType后备 model
*/
getService(accountType, model) {
return this.getServiceFromAccountType(accountType) || this.getServiceFromModel(model)
}
/**
* 获取所有支持的服务列表
*/