1. 03 Mar, 2026 1 commit
  2. 02 Mar, 2026 2 commits
    • QTom's avatar
      feat(gateway): 双模式用户消息队列 — 串行队列 + 软性限速 · a9285b8a
      QTom authored
      新增 UMQ (User Message Queue) 双模式支持:
      - serialize: 账号级分布式串行锁 + RPM 自适应延迟(严格限流)
      - throttle: 仅 RPM 自适应前置延迟,不阻塞并发(软性限速)
      
      后端:
      - config: 新增 Mode 字段,保留 Enabled 向后兼容
      - service: 新增 UserMessageQueueService(Lua 锁/延迟算法/清理 worker)
      - repository: 新增 UserMsgQueueCache(Redis Lua acquire/release/force-release)
      - handler: 新增 UserMsgQueueHelper(SSE ping + 等待循环 + throttle)
      - gateway: 按 mode 分支集成 serialize/throttle 逻辑
      - lint: 修复 gofmt rewrite rules、errcheck 类型断言、staticcheck QF1012
      
      前端:
      - 三态选择器 UI(关闭/软性限速/串行队列)替代 toggle 开关
      - BulkEdit 支持 null 语义(不修改)
      - i18n 中英文文案
      
      通过 6 轮专家评审(42 次 review)、golangci-lint、单元测试、集成测试。
      a9285b8a
    • QTom's avatar
      feat(proxy): 集中代理 URL 验证并实现全局 fail-fast · fdcbf7aa
      QTom authored
      提取 proxyurl.Parse() 公共包,将分散在 6 处的代理 URL 验证逻辑
      统一收敛,确保无效代理配置在创建时立即失败,永不静默回退直连。
      
      主要变更:
      - 新增 proxyurl 包:统一 TrimSpace → url.Parse → Host 校验 → Scheme 白名单
      - socks5:// 自动升级为 socks5h://,防止 DNS 泄漏(大小写不敏感)
      - antigravity: http.ProxyURL → proxyutil.ConfigureTransportProxy 支持 SOCKS5
      - openai_oauth: 删除 newOpenAIOAuthHTTPClient,收编至 httpclient.GetClient
      - 移除未使用的 ProxyStrict 字段(fail-fast 已是全局默认行为)
      - 补充 15 个 proxyurl 测试 + pricing/usage fail-fast 测试
      fdcbf7aa
  3. 01 Mar, 2026 3 commits
    • QTom's avatar
      feat(identity): 指纹缓存 TTL 懒续期机制 · d869ac95
      QTom authored
      - TTL 改为 7 天,配合 24 小时自动续期保持活跃账号永不过期
      - 版本升级时采用合并语义,仅更新请求中实际存在的字段
      - 添加产品名验证防止浏览器 UA 误判为更新版本
      d869ac95
    • erio's avatar
      feat(dashboard): add group usage distribution chart to usage page · 65459a99
      erio authored
      Add a doughnut chart showing usage statistics broken down by group on
      the admin usage records page. The chart appears alongside the existing
      model distribution chart (2-column grid), with the token usage trend
      chart moved to a separate full-width row below.
      
      Changes:
      - backend/pkg/usagestats: add GroupStat type
      - backend/service: add GetGroupStatsWithFilters interface method and implementation
      - backend/repository: implement GetGroupStatsWithFilters with LEFT JOIN groups
      - backend/handler: add GetGroupStats handler with full filter support
      - backend/routes: register GET /admin/dashboard/groups route
      - backend/tests: add GetGroupStatsWithFilters stubs to contract/sora tests
      - frontend/types: add GroupStat interface
      - frontend/api: add getGroupStats API function and types
      - frontend/components: add GroupDistributionChart.vue doughnut chart
      - frontend/views: update UsageView layout and load group stats in parallel
      - frontend/i18n: add groupDistribution, group, noGroup keys (zh + en)
      65459a99
    • Gemini Wen's avatar
      c6e26c5a
  4. 28 Feb, 2026 6 commits
    • QTom's avatar
      fix: 修复 gofmt 格式问题 · 115d06ed
      QTom authored
      115d06ed
    • QTom's avatar
      fix: address code review issues for RPM limiting feature · 60723757
      QTom authored
      - Use TxPipeline (MULTI/EXEC) instead of Pipeline for atomic INCR+EXPIRE
      - Filter negative values in GetBaseRPM(), update test expectation
      - Add RPM batch query (GetRPMBatch) to account List API
      - Add warn logs for RPM increment failures in gateway handler
      - Reset enableRpmLimit on BulkEditAccountModal close
      - Use union type 'tiered' | 'sticky_exempt' for rpmStrategy refs
      - Add design decision comments for rdb.Time() RTT trade-off
      60723757
    • QTom's avatar
      c1c31ed9
    • QTom's avatar
    • QTom's avatar
      feat(admin): 完整实现管理员修改用户 API Key 分组的功能 · 9a91815b
      QTom authored
      ## 核心功能
      - 添加 AdminUpdateAPIKeyGroupID 服务方法,支持绑定/解绑/保持不变三态语义
      - 实现 UserRepository.AddGroupToAllowedGroups 接口,自动同步专属分组权限
      - 添加 HTTP PUT /api-keys/:id handler 端点,支持管理员直接修改 API Key 分组
      
      ## 事务一致性
      - 使用 ent Tx 保证专属分组绑定时「添加权限」和「更新 Key」的原子性
      - Repository 方法支持 clientFromContext,兼容事务内调用
      - 事务失败时自动回滚,避免权限孤立
      
      ## 业务逻辑
      - 订阅类型分组阻断,需通过订阅管理流程
      - 非活跃分组拒绝绑定
      - 负 ID 和非法 ID 验证
      - 自动授权响应,告知管理员成功授权的分组
      
      ## 代码质量
      - 16 个单元测试覆盖所有业务路径和边界用例
      - 7 个 handler 集成测试覆盖 HTTP 层
      - GroupRepo stub 返回克隆副本,防止测试间数据泄漏
      - API 类型安全修复(PaginatedResponse<ApiKey>)
      - 前端 ref 回调类型对齐 Vue 规范
      
      ## 国际化支持
      - 中英文提示信息完整
      - 自动授权成功/失败提示
      9a91815b
    • yangjianbo's avatar
      feat(sync): full code sync from release · bb664d9b
      yangjianbo authored
      bb664d9b
  5. 26 Feb, 2026 1 commit
    • shaw's avatar
      fix: 将 DriveClient 注入 GeminiOAuthService,消除单元测试中的真实 HTTP 调用 · c75c6b68
      shaw authored
      FetchGoogleOneTier 原先在方法内部直接创建 DriveClient 实例,
      导致单元测试中对 googleapis.com 发起真实 HTTP 请求,在 CI 环境
      产生 401 错误。
      
      将 DriveClient 作为依赖注入到 GeminiOAuthService,遵循项目
      端口与适配器架构规范:
      - 新增 repository/gemini_drive_client.go 作为 Provider
      - 注册到 repository Wire ProviderSet
      - 测试中使用 mockDriveClient 替代真实调用
      c75c6b68
  6. 24 Feb, 2026 2 commits
  7. 23 Feb, 2026 1 commit
  8. 22 Feb, 2026 2 commits
  9. 19 Feb, 2026 1 commit
  10. 17 Feb, 2026 1 commit
  11. 14 Feb, 2026 2 commits
  12. 12 Feb, 2026 8 commits
  13. 11 Feb, 2026 2 commits
    • kyx236's avatar
      feat(admin): Add group filtering for account listings · fe1d46a8
      kyx236 authored
      - Add groupID parameter to ListAccounts and ListWithFilters methods
      - Implement account filtering by group ID in repository query
      - Add group query parameter parsing in account handler
      - Update all ListAccounts/ListWithFilters call sites with groupID parameter
      - Add group filter UI component to AccountTableFilters
      - Add i18n translations for group filter label in English and Chinese
      - Update API contract and test stubs to reflect new signature
      - Enable filtering accounts by their assigned groups in admin panel
      fe1d46a8
    • kyx236's avatar
      feat(admin): Add email search and rate limit filtering for accounts and redeem codes · 04a1a7c2
      kyx236 authored
      - Add used_by_email column to redeem code export CSV for better user identification
      - Implement rate_limited status filter in account listing with RateLimitResetAt check
      - Extend redeem code search to include user email in addition to code matching
      - Add API key search capability to user listing filters
      - Display user email in redeem code table used_by column for improved visibility
      - Update search placeholders in UI to reflect expanded search capabilities (email, username, notes, API key)
      - Improve Chinese and English localization strings for search hints
      04a1a7c2
  14. 10 Feb, 2026 2 commits
    • yangjianbo's avatar
      fix(backend): 修复代码审核发现的 8 个确认问题 · 54fe3632
      yangjianbo authored
      
      
      - P0-1: subscription_maintenance_queue 使用 RWMutex 防止 channel close/send 竞态
      - P0-2: billing_service CalculateCostWithLongContext 修复被吞没的 out-range 错误
      - P1-1: timing_wheel_service Schedule/ScheduleRecurring 添加 SetTimer 错误日志
      - P1-2: sora_gateway_service StoreFromURLs 失败时降级使用原始 URL
      - P1-3: concurrency_cache 用 Pipeline 替代 Lua 脚本兼容 Redis Cluster
      - P1-6: sora_media_cleanup_service runCleanup 添加 nil cfg/storage 防护
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      54fe3632
    • Edric Li's avatar
      feat: 错误透传规则支持 skip_monitoring 跳过运维监控记录 · d95e04fd
      Edric Li authored
      在每条错误透传规则上新增 skip_monitoring 选项,开启后匹配该规则的错误
      不会被记录到 ops_error_logs,减少监控噪音。默认关闭,不影响现有规则。
      d95e04fd
  15. 09 Feb, 2026 3 commits
    • QTom's avatar
      feat(admin): 新增 CRS 同步预览和账号选择功能 · 5e0d7894
      QTom authored
      - 后端新增 PreviewFromCRS 接口,允许用户先预览 CRS 中的账号
      - 后端支持在同步时选择特定账号,不选中的账号将被跳过
      - 前端重构 SyncFromCrsModal 为三步向导:输入凭据 → 预览账号 → 执行同步
      - 改进表单无障碍性:添加 for/id 关联和 required 属性
      - 修复 Back 按钮返回时的状态清理
      - 新增 buildSelectedSet 和 shouldCreateAccount 的单元测试
      - 完整的向后兼容性:旧客户端不发送 selected_account_ids 时行为不变
      5e0d7894
    • yangjianbo's avatar
      fix: 修复代码审核发现的安全和质量问题 · d7011163
      yangjianbo authored
      
      
      安全修复(P0):
      - 移除硬编码的 OAuth client_secret(Antigravity、Gemini CLI),
        改为通过环境变量注入(ANTIGRAVITY_OAUTH_CLIENT_SECRET、
        GEMINI_CLI_OAUTH_CLIENT_SECRET)
      - 新增 logredact.RedactText() 对非结构化文本做敏感信息脱敏,
        覆盖 GOCSPX-*/AIza* 令牌和常见 key=value 模式
      - 日志中不再打印 org_uuid、account_uuid、email_address 等敏感值
      
      安全修复(P1):
      - URL 验证增强:新增 ValidateHTTPURL 统一入口,支持 allowlist 和
        私网地址阻断(localhost/内网 IP)
      - 代理回退安全:代理初始化失败时默认阻止直连回退,防止 IP 泄露,
        可通过 security.proxy_fallback.allow_direct_on_error 显式开启
      - Gemini OAuth 配置校验:client_id 与 client_secret 必须同时
        设置或同时留空
      
      其他改进:
      - 新增 tools/secret_scan.py 密钥扫描工具和 Makefile secret-scan 目标
      - 更新所有 docker-compose 和部署配置,传递 OAuth secret 环境变量
      - google_one OAuth 类型使用固定 redirectURI,与 code_assist 对齐
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      d7011163
    • erio's avatar
      refactor: replace scope-level rate limiting with model-level rate limiting · fc095bf0
      erio authored
      Merge functional changes from develop branch:
      - Remove AntigravityQuotaScope system (claude/gemini_text/gemini_image)
      - Replace with per-model rate limiting using resolveAntigravityModelKey
      - Remove model load statistics (IncrModelCallCount/GetModelLoadBatch)
      - Simplify account selection to unified priority→load→LRU algorithm
      - Remove SetAntigravityQuotaScopeLimit from AccountRepository
      - Clean up scope-related UI indicators and API fields
      fc095bf0
  16. 08 Feb, 2026 3 commits