mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 08:59:16 +00:00
feat: 完善 Gemini 功能与 Claude 保持一致
- 添加 Gemini 账户的 schedulable 字段和调度开关 API - 实现 Gemini 调度器的模型过滤功能 - 完善 Gemini 数据统计,记录 token 使用量 - 修复 Gemini 流式响应的 SSE 解析和 AbortController 支持 - 在教程页面和 README 中添加 Gemini CLI 环境变量说明 - 修复前端 Gemini 账户调度开关限制 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -18,7 +18,7 @@ class UnifiedClaudeScheduler {
|
||||
if (apiKeyData.claudeAccountId.startsWith('group:')) {
|
||||
const groupId = apiKeyData.claudeAccountId.replace('group:', '');
|
||||
logger.info(`🎯 API key ${apiKeyData.name} is bound to group ${groupId}, selecting from group`);
|
||||
return await this.selectAccountFromGroup(groupId, sessionHash, requestedModel, apiKeyData);
|
||||
return await this.selectAccountFromGroup(groupId, sessionHash, requestedModel);
|
||||
}
|
||||
|
||||
// 普通专属账户
|
||||
@@ -370,7 +370,7 @@ class UnifiedClaudeScheduler {
|
||||
}
|
||||
|
||||
// 👥 从分组中选择账户
|
||||
async selectAccountFromGroup(groupId, sessionHash = null, requestedModel = null, apiKeyData = null) {
|
||||
async selectAccountFromGroup(groupId, sessionHash = null, requestedModel = null) {
|
||||
try {
|
||||
// 获取分组信息
|
||||
const group = await accountGroupService.getGroup(groupId);
|
||||
@@ -426,7 +426,7 @@ class UnifiedClaudeScheduler {
|
||||
}
|
||||
} else if (group.platform === 'gemini') {
|
||||
// Gemini暂时不支持,预留接口
|
||||
logger.warn(`⚠️ Gemini group scheduling not yet implemented`);
|
||||
logger.warn('⚠️ Gemini group scheduling not yet implemented');
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user