mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 00:53:33 +00:00
feat: 优化API Key批量创建和账户限流状态显示
- 添加 bedrockAccountId 和 rateLimitCost 字段到批量创建 API Key 功能 - 格式化 claudeAccountService 中的日志输出 - 改进账户视图中会话进度条样式,限流状态显示红色 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -688,10 +688,12 @@ router.post('/api-keys/batch', authenticateAdmin, async (req, res) => {
|
||||
claudeConsoleAccountId,
|
||||
geminiAccountId,
|
||||
openaiAccountId,
|
||||
bedrockAccountId,
|
||||
permissions,
|
||||
concurrencyLimit,
|
||||
rateLimitWindow,
|
||||
rateLimitRequests,
|
||||
rateLimitCost,
|
||||
enableModelRestriction,
|
||||
restrictedModels,
|
||||
enableClientRestriction,
|
||||
@@ -735,10 +737,12 @@ router.post('/api-keys/batch', authenticateAdmin, async (req, res) => {
|
||||
claudeConsoleAccountId,
|
||||
geminiAccountId,
|
||||
openaiAccountId,
|
||||
bedrockAccountId,
|
||||
permissions,
|
||||
concurrencyLimit,
|
||||
rateLimitWindow,
|
||||
rateLimitRequests,
|
||||
rateLimitCost,
|
||||
enableModelRestriction,
|
||||
restrictedModels,
|
||||
enableClientRestriction,
|
||||
|
||||
@@ -1200,9 +1200,13 @@ class ClaudeAccountService {
|
||||
accountData.schedulable = 'true'
|
||||
delete accountData.rateLimitAutoStopped
|
||||
logger.info(`✅ Auto-resuming scheduling for account ${accountId} after rate limit cleared`)
|
||||
logger.info(`📊 Account ${accountId} state after recovery: schedulable=${accountData.schedulable}`)
|
||||
logger.info(
|
||||
`📊 Account ${accountId} state after recovery: schedulable=${accountData.schedulable}`
|
||||
)
|
||||
} else {
|
||||
logger.info(`ℹ️ Account ${accountId} did not need auto-resume: autoStopped=${accountData.rateLimitAutoStopped}, schedulable=${accountData.schedulable}`)
|
||||
logger.info(
|
||||
`ℹ️ Account ${accountId} did not need auto-resume: autoStopped=${accountData.rateLimitAutoStopped}, schedulable=${accountData.schedulable}`
|
||||
)
|
||||
}
|
||||
await redis.setClaudeAccount(accountId, accountData)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user