mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 00:53:33 +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:
@@ -279,6 +279,10 @@ async function createAccount(accountData) {
|
||||
accountType: accountData.accountType || 'shared',
|
||||
isActive: 'true',
|
||||
status: 'active',
|
||||
|
||||
// 调度相关
|
||||
schedulable: accountData.schedulable !== undefined ? String(accountData.schedulable) : 'true',
|
||||
priority: accountData.priority || 50, // 调度优先级 (1-100,数字越小优先级越高)
|
||||
|
||||
// OAuth 相关字段(加密存储)
|
||||
geminiOauth: geminiOauth ? encrypt(geminiOauth) : '',
|
||||
@@ -292,6 +296,9 @@ async function createAccount(accountData) {
|
||||
|
||||
// 项目编号(Google Cloud/Workspace 账号需要)
|
||||
projectId: accountData.projectId || '',
|
||||
|
||||
// 支持的模型列表(可选)
|
||||
supportedModels: accountData.supportedModels || [], // 空数组表示支持所有模型
|
||||
|
||||
// 时间戳
|
||||
createdAt: now,
|
||||
|
||||
Reference in New Issue
Block a user