feat: 完善多平台账户管理和API Keys页面展示

- 修复OpenAI路由中的gpt-5模型ID处理
- 增强统一调度器的账户选择日志输出
- 优化OAuth流程中的账户类型处理
- 完善API Keys页面的多平台账户信息展示

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
shaw
2025-08-12 17:55:45 +08:00
parent b250b6ee3b
commit 4ca9674772
6 changed files with 112 additions and 20 deletions

View File

@@ -38,6 +38,8 @@ class UnifiedGeminiScheduler {
logger.info(
`🎯 Using bound dedicated Gemini account: ${boundAccount.name} (${apiKeyData.geminiAccountId}) for API key ${apiKeyData.name}`
)
// 更新账户的最后使用时间
await geminiAccountService.markAccountUsed(apiKeyData.geminiAccountId)
return {
accountId: apiKeyData.geminiAccountId,
accountType: 'gemini'
@@ -62,6 +64,8 @@ class UnifiedGeminiScheduler {
logger.info(
`🎯 Using sticky session account: ${mappedAccount.accountId} (${mappedAccount.accountType}) for session ${sessionHash}`
)
// 更新账户的最后使用时间
await geminiAccountService.markAccountUsed(mappedAccount.accountId)
return mappedAccount
} else {
logger.warn(
@@ -108,6 +112,9 @@ class UnifiedGeminiScheduler {
`🎯 Selected account: ${selectedAccount.name} (${selectedAccount.accountId}, ${selectedAccount.accountType}) with priority ${selectedAccount.priority} for API key ${apiKeyData.name}`
)
// 更新账户的最后使用时间
await geminiAccountService.markAccountUsed(selectedAccount.accountId)
return {
accountId: selectedAccount.accountId,
accountType: selectedAccount.accountType
@@ -378,6 +385,8 @@ class UnifiedGeminiScheduler {
logger.info(
`🎯 Using sticky session account from group: ${mappedAccount.accountId} (${mappedAccount.accountType}) for session ${sessionHash}`
)
// 更新账户的最后使用时间
await geminiAccountService.markAccountUsed(mappedAccount.accountId)
return mappedAccount
}
}
@@ -473,6 +482,9 @@ class UnifiedGeminiScheduler {
`🎯 Selected account from Gemini group ${group.name}: ${selectedAccount.name} (${selectedAccount.accountId}, ${selectedAccount.accountType}) with priority ${selectedAccount.priority}`
)
// 更新账户的最后使用时间
await geminiAccountService.markAccountUsed(selectedAccount.accountId)
return {
accountId: selectedAccount.accountId,
accountType: selectedAccount.accountType