- 30 Dec, 2025 7 commits
-
-
song authored
旧账户可能没有 project_id,在刷新配额时自动生成并保存。
-
song authored
部分账户类型(如 g1-pro-tier)API 不返回 cloudaicompanionProject, 但实际接受任意格式的 project_id,故添加随机生成逻辑作为兜底。
-
song authored
- 移除 project_id 强制检查,部分账户类型 API 不返回此字段 - 重构:提取 antigravity.NewAPIRequest() 统一创建 API 请求 - quota_refresher: 无 project_id 时仍可更新 tier 信息
-
song authored
- 新增 AntigravityGatewayService.TestConnection 方法,支持 Claude/Gemini 双协议测试 - AccountTestService 改用 AntigravityGatewayService 进行测试连接 - GetAvailableModels 为 Antigravity 账号返回 Claude + Gemini 模型列表
-
shaw authored
格式化以下测试文件以符合 Go 代码风格规范: - fixtures_integration_test.go - user_repo_integration_test.go - api_key_service_delete_test.go
-
yangjianbo authored
修复 rows.Close 失败时的错误返回逻辑 迁移网关路由集成测试到 ent 事务基建 补齐仓储接口变更对应的测试桩方法 新增 backend/Makefile 统一测试命令 测试: GOTOOLCHAIN=go1.24.11 go test ./... 测试: golangci-lint run ./... --timeout=5m 测试: make test-integration
-
刀刀 authored
* 响应流中出现 error, 返回重试 * 响应流中出现 error, 返回重试
-
- 29 Dec, 2025 15 commits
-
-
Junming Chen authored
-
song authored
- 只有 5 次重试全部失败后才标记账户限流 - 使用 Gemini 格式解析 429 响应中的重试时间 - Claude 模型无重试时间时默认 1 分钟,Gemini 默认 5 分钟 - 添加生图模型映射 gemini-3-pro-image-preview
-
song authored
-
song authored
-
song authored
- 删除 client.go 中未使用的 proxyURL 字段 - 删除 AntigravityGatewayService 中未使用的字段和方法 - 修复 gofmt 格式问题
-
song authored
- SA1029: 创建 ctxkey 包定义类型安全的 context key - ST1005: 错误字符串首字母改小写 - errcheck: 显式忽略 bytes.Buffer.Write 返回值 - 修复单元测试中 GatewayService 缺少 cfg 字段的问题
-
yangjianbo authored
避免软删除钩子类型断言失败导致 500\n删除无记录时返回未找到错误并记录日志
-
song authored
-
song authored
添加 /antigravity/v1/* 和 /antigravity/v1beta/* 路由: - 通过 ForcePlatform 中间件强制使用 antigravity 平台 - 跳过混合调度逻辑,仅调度 antigravity 账户 - 支持按分组优先查找,找不到时回退查询全部 antigravity 账户 修复 context key 类型不匹配问题: - middleware 和 service 统一使用字符串常量 "ctx_force_platform" - 解决 Go context.Value() 类型+值匹配导致的读取失败 其他改动: - 嵌入式前端中间件白名单添加 /antigravity/ 路径 - e2e 测试 Gemini 端点 URL 添加 endpointPrefix 支持
-
yangjianbo authored
覆盖管理员创建用户与注册流程的关键失败分支\n完善创建成功路径的断言
-
yangjianbo authored
新增 AdminService 删除路径单元测试与规范场景更新\n同步调整 Google API Key 中间件测试桩与签名
-
yangjianbo authored
- 新增 AccountService.Delete 方法的 4 个测试用例 - 新增 ApiKeyService.Delete 方法的 4 个测试用例 - 使用 stub 模式隔离数据库依赖,验证权限检查和缓存清理逻辑 - 添加详细的中文注释说明测试设计和预期行为
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude Opus 4.5 <noreply@anthropic.com>
-
yangjianbo authored
- 新增 ExistsByID 方法用于账号存在性检查,避免加载完整对象 - 新增 GetOwnerID 方法用于 API Key 所有权验证,仅查询 user_id 字段 - 优化 AccountService.Delete 使用轻量级存在性检查 - 优化 ApiKeyService.Delete 使用轻量级权限验证 - 改进前端删除错误提示,显示后端返回的具体错误消息 - 添加详细的中文注释说明优化原因
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude Opus 4.5 <noreply@anthropic.com>
-
song authored
- 后端:账户模型添加 IsMixedSchedulingEnabled() 方法,读取 extra.mixed_scheduling - 后端:gateway_service 和 gemini_messages_compat_service 支持混合调度逻辑 - 后端:分组创建支持指定 platform 参数 - 前端:账户创建/编辑弹窗添加混合调度开关(仅 antigravity 账户显示) - 前端:混合调度开关添加问号图标和 tooltip 说明 - 前端:GroupSelector 支持根据 mixedScheduling 属性过滤分组 - 前端:分组创建支持选择 platform - 测试:e2e 测试添加 ENDPOINT_PREFIX 环境变量支持混合/隔离模式测试 - 测试:删除过时的 Claude signature 测试用例
-
shaw authored
移除与 PR #66 冲突的旧版简易模式实现(commit 7d4b7dee)。 新版简易模式通过 run_mode 配置文件/环境变量控制,无需数据库设置。 后端变更: - 移除 SettingKeySimpleMode 常量 - 移除 SystemSettings/PublicSettings 中的 SimpleMode 字段 - 移除 setting_handler 中的简易模式切换逻辑 - 移除 userService 依赖(不再需要自动设置管理员并发数) 前端变更: - 移除 appStore.simpleMode 状态 - 移除设置页面的"使用模式"设置区块 - 移除 GroupsView 中的简易模式相关逻辑 - 移除相关国际化文案
-
- 28 Dec, 2025 14 commits
-
-
IanShaw027 authored
**功能概述**: 实现简易模式(Simple Mode),为个人用户和小团队提供简化的使用体验,隐藏复杂的分组、订阅、配额等概念。 **后端改动**: 1. 配置系统 - 新增 run_mode 配置项(standard/simple) - 支持环境变量 RUN_MODE - 默认值为 standard 2. 数据库初始化 - 自动创建3个默认分组:anthropic-default、openai-default、gemini-default - 默认分组配置:无并发限制、active状态、非独占 - 幂等性保证:重复启动不会重复创建 3. 账号管理 - 创建账号时自动绑定对应平台的默认分组 - 如果未指定分组,自动查找并绑定默认分组 **前端改动**: 1. 状态管理 - authStore 新增 isSimpleMode 计算属性 - 从后端API获取并同步运行模式 2. UI隐藏 - 侧边栏:隐藏分组管理、订阅管理、兑换码菜单 - 账号管理页面:隐藏分组列 - 创建/编辑账号对话框:隐藏分组选择器 3. 路由守卫 - 限制访问分组、订阅、兑换码相关页面 - 访问受限页面时自动重定向到仪表板 **配置示例**: ```yaml run_mode: simple run_mode: standard ``` **影响范围**: - 后端:配置、数据库迁移、账号服务 - 前端:认证状态、路由、UI组件 - 部署:配置文件示例 **兼容性**: - 简易模式和标准模式可无缝切换 - 不需要数据迁移 - 现有数据不受影响
-
song authored
-
song authored
- 新增 TestClaudeMessagesWithClaudeSignature 测试 - 验证历史 thinking block 带有 Claude signature 时的处理 - 修复配额刷新服务的次要问题
-
shaw authored
问题: 1. WindowStats 与 API 响应一起缓存 10 分钟,导致费用数据更新延迟 2. 当 5h 窗口未激活(ResetsAt 为空)时,FiveHour 为 nil,导致所有窗口的 WindowStats 都无法显示 修复: - 分离缓存:API 响应缓存 10 分钟,窗口统计独立缓存 1 分钟 - RemainingSeconds 每次请求时实时计算 - FiveHour 对象始终创建(即使 ResetsAt 为空) - addWindowStats 增强防护,支持 FiveHour 为 nil 时仍处理其他窗口
-
song authored
后端: - 新增 AntigravityQuotaRefresher 定时刷新配额 - Client 添加 FetchAvailableModels 方法获取模型配额 - 配额数据存入 account.extra.quota 字段 前端: - AccountUsageCell 支持显示 Antigravity 账户配额 - UsageProgressBar 新增 amber 颜色 - 显示 G3P/G3F/G3I/C4.5 四个配额进度条
-
shaw authored
新增简单模式设置,适合个人使用场景: - 隐藏多用户管理相关菜单(用户管理、兑换码等) - 自动关闭用户注册功能 - 管理员并发数自动设为无限制(99999) - 侧边栏根据模式动态调整菜单项 同时优化分组页面的"专属分组"功能,添加帮助提示说明使用场景
-
song authored
Antigravity 不支持 count_tokens 转发,直接返回估算值, 与 Antigravity-Manager 和 proxycast 实现保持一致。 修复 count_tokens 请求选择到 Antigravity 账户时导致 401 的问题。
-
song authored
- 添加 dummyThoughtSignature 常量,在 thinking 模式下为无 signature 的 tool_use 自动添加 - 增强 cleanJSONSchema:过滤 required 中不存在的属性,确保 type/properties 字段存在 - 扩展 excludedSchemaKeys:增加 $id, $ref, strict, const, examples 等不支持的字段 - 修复 429 重试逻辑:仅在所有重试失败后才标记账户为 rate_limited - 添加 e2e 集成测试:TestClaudeMessagesWithThinkingAndTools
-
song authored
-
song authored
-
song authored
-
shaw authored
问题:当分配订阅天数过大时,expires_at 年份可能超过 9999, 导致 time.Time JSON 序列化失败(RFC 3339 要求年份 <= 9999), 使后台无法显示和删除异常数据。 修复: - handler 层添加 validity_days 最大值验证(max=36500,即100年) - service 层添加 MaxValidityDays 和 MaxExpiresAt 双重保护 - 启动时自动修复已存在的异常数据(expires_at > 2099年)
-
shaw authored
-
noreply authored
Implement deferred batch update mechanism to reduce database load: - Add DeferredService for batching account last_used_at updates - Add TimingWheelService for efficient recurring task scheduling - Integrate with GatewayService and OpenAIGatewayService - Implement BatchUpdateLastUsed repository method using CASE...WHEN SQL - Fix golangci-lint error: Replace interface{} with any Benefits: - Reduces database writes by batching updates (10-second intervals) - Improves request throughput by deferring non-critical updates - Maintains accurate account usage tracking for scheduling
-
- 27 Dec, 2025 4 commits
-
-
shaw authored
-
shaw authored
-
IanShaw027 authored
- 优化使用统计处理逻辑 - 增强API密钥仓储层功能 - 改进账户使用服务 - 完善API契约测试覆盖
-
shaw authored
原逻辑先执行 Update 再验证 GroupIDs,如果验证失败会导致账号已更新但返回错误。 现改为先验证分组是否存在,再执行 Update 和 BindGroups。
-