feat: 添加账户状态监控和自动恢复机制

- 实现账户健康度监控系统,支持30分钟内错误率检测
- 添加自动恢复机制,失败账户在30分钟后自动尝试恢复
- 优化账户选择策略,优先选择健康账户
- 增强Redis键管理,添加账户状态和错误追踪功能
- 改进Gemini服务错误处理和重试逻辑
- 新增standardGeminiRoutes标准化路由支持

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
shaw
2025-09-11 22:02:53 +08:00
parent b6b16d05f0
commit 7c4feec5aa
8 changed files with 912 additions and 10 deletions

View File

@@ -961,4 +961,10 @@ router.post(
handleStreamGenerateContent
)
// 导出处理函数供标准路由使用
module.exports = router
module.exports.handleLoadCodeAssist = handleLoadCodeAssist
module.exports.handleOnboardUser = handleOnboardUser
module.exports.handleCountTokens = handleCountTokens
module.exports.handleGenerateContent = handleGenerateContent
module.exports.handleStreamGenerateContent = handleStreamGenerateContent