1. 14 Mar, 2026 2 commits
  2. 13 Mar, 2026 1 commit
    • wucm667's avatar
      feat: 账号配额支持固定时间重置模式 · 5b850059
      wucm667 authored
      - 后端新增 rolling/fixed 两种配额重置模式,支持日配额和周配额
      - fixed 模式下可配置重置时刻(小时)、重置星期几(周配额)及时区(IANA)
      - 在 account_repo.go 中使用 SQL 表达式适配两种模式的过期判断与重置时间推进
      - 新增 ComputeQuotaResetAt / ValidateQuotaResetConfig 等辅助函数
      - DTO 层新增相关字段并在 mappers 中完整映射
      - 前端 QuotaLimitCard 新增 rolling/fixed 切换 UI、时区选择器
      - CreateAccountModal / EditAccountModal 透传新配置字段
      - i18n(zh/en)同步新增相关翻译词条
      5b850059
  3. 12 Mar, 2026 1 commit
  4. 11 Mar, 2026 3 commits
  5. 07 Mar, 2026 3 commits
    • kyx236's avatar
      feat(admin): 支持定时测试自动恢复并统一账号恢复入口 · 0c29468f
      kyx236 authored
      - 为定时测试计划增加 auto_recover 配置,补齐前后端类型、接口、仓储与数据库迁移
      - 在定时测试成功后自动恢复账号 error、rate-limit 等可恢复运行时状态
      - 新增 /admin/accounts/:id/recover-state 接口,合并原有重置状态与清限流操作
      - 更新账号管理菜单与定时测试面板,补充自动恢复开关、说明提示和状态展示
      - 补充账号恢复、限流清理与仓储同步相关测试
      0c29468f
    • 神乐's avatar
      101ef0cf
    • erio's avatar
      feat(account): add daily/weekly periodic quota limits for API Key accounts · 1ee17383
      erio authored
      
      
      Extend the existing total quota limit with daily and weekly periodic
      dimensions. Each dimension is independently configurable and uses lazy
      reset — when the period expires, usage is automatically reset to zero on
      the next increment. Any dimension exceeding its limit will pause the
      account from scheduling.
      
      Backend:
      - Add GetQuotaDailyLimit/Used, GetQuotaWeeklyLimit/Used, HasAnyQuotaLimit
      - Rewrite IncrementQuotaUsed with atomic CTE SQL for 3-dimension update
      - Rewrite ResetQuotaUsed to clear all dimensions and period timestamps
      - Update postUsageBilling to use HasAnyQuotaLimit()
      - Preserve daily/weekly used values on account edit
      
      Frontend:
      - Refactor QuotaLimitCard from single v-model to 3-dimension props
      - Add QuotaBadge component for compact D/W/$ display
      - Update AccountCapacityCell with per-dimension badges
      - Update Create/Edit modals with daily/weekly quota fields
      - Update AccountActionMenu hasQuotaLimit to check all dimensions
      - Add i18n strings for daily/weekly/total quota labels
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      1ee17383
  6. 05 Mar, 2026 2 commits
    • erio's avatar
    • erio's avatar
      feat: add quota limit for API key accounts · 05527b13
      erio authored
      - Add configurable spending limit (quota_limit) for apikey-type accounts
      - Atomic quota accumulation via PostgreSQL JSONB operations on TotalCost
      - Scheduler filters out over-quota accounts with outbox-triggered snapshot refresh
      - Display quota usage ($used / $limit) in account capacity column
      - Add "Reset Quota" action in account menu to reset usage to zero
      - Editing account settings preserves quota_used (no accidental reset)
      - Covers all 3 billing paths: Anthropic, Gemini, OpenAI RecordUsage
      
      chore: bump version to 0.1.90.4
      05527b13
  7. 04 Mar, 2026 1 commit
    • kyx236's avatar
      feat: 二次 401 直接升级为错误状态,添加 DB 回退确保生效 · 6aa8cbbf
      kyx236 authored
      账号首次 401 仅临时不可调度,给予 token 刷新窗口;若恢复后再次 401
      说明凭证确实失效,直接升级为错误状态以避免反复无效调度。
      
      - 缓存中 reason 为空时从 DB 回退读取,防止升级判断失效
      - ClearError 同时清除临时不可调度状态,管理员恢复后重新给予一次机会
      - 管理后台账号列表添加"临时不可调度"状态筛选
      - 补充 DB 回退场景单元测试
      6aa8cbbf
  8. 03 Mar, 2026 1 commit
    • QTom's avatar
      fix(gateway): 分组隔离 — 禁止未分组账号被跨组调度 · 530a1629
      QTom authored
      当 API Key 无分组时,调度仅从未分组账号池中选取。
      修复 isAccountInGroup 在 groupID==nil 时的逻辑,
      同时补全 scheduler_snapshot_service 和 gemini_compat_service
      中的 SimpleMode 保护,确保分组隔离在所有调度路径生效。
      
      新增 ListSchedulableUngroupedByPlatform/s 方法,
      使用 Ent 的 Not(HasAccountGroups()) 谓词实现未分组账号隔离。
      新增 17 个单元和端到端隔离测试,覆盖所有分支和边界条件。
      530a1629
  9. 28 Feb, 2026 1 commit
  10. 12 Feb, 2026 1 commit
    • yangjianbo's avatar
      chore(logging): 完成后端日志审计与结构化迁移 · 584cfc3d
      yangjianbo authored
      - 将高密度服务与处理器日志迁移到新日志系统(LegacyPrintf/结构化日志)
      - 增加 stdlog bridge 与兼容测试,保留旧日志捕获能力
      - 将 OpenAI 断流告警改为结构化 Warn 并改造对应测试为 sink 捕获
      - 补齐后端相关文件 logger 引用并通过全量 go test
      584cfc3d
  11. 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
  12. 09 Feb, 2026 2 commits
    • QTom's avatar
      feat(admin): 新增 CRS 同步预览和账号选择功能 · 5e0d7894
      QTom authored
      - 后端新增 PreviewFromCRS 接口,允许用户先预览 CRS 中的账号
      - 后端支持在同步时选择特定账号,不选中的账号将被跳过
      - 前端重构 SyncFromCrsModal 为三步向导:输入凭据 → 预览账号 → 执行同步
      - 改进表单无障碍性:添加 for/id 关联和 required 属性
      - 修复 Back 按钮返回时的状态清理
      - 新增 buildSelectedSet 和 shouldCreateAccount 的单元测试
      - 完整的向后兼容性:旧客户端不发送 selected_account_ids 时行为不变
      5e0d7894
    • 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
  13. 05 Feb, 2026 1 commit
  14. 03 Feb, 2026 1 commit
    • liuxiongfeng's avatar
      fix: jsonb_set 嵌套路径无法创建多层 key 的问题 · f5884d16
      liuxiongfeng authored
      PostgreSQL jsonb_set 在 create_if_missing=true 时无法一次性创建多层嵌套路径。
      例如设置 {antigravity_quota_scopes,gemini_image} 时,如果 antigravity_quota_scopes 不存在,
      jsonb_set 不会自动创建外层 key,导致更新静默失败(affected=1 但数据未变)。
      
      修复方案:嵌套两次 jsonb_set,先确保外层 key 存在,再设置内层值。
      同时在设置限流时更新 last_used_at,使刚触发 429 的账号调度优先级降低。
      
      Cherry-picked from slovx2/sub2api: 4b57e80e
      f5884d16
  15. 02 Feb, 2026 1 commit
  16. 31 Jan, 2026 1 commit
  17. 30 Jan, 2026 1 commit
    • yangjianbo's avatar
      feat(账号): 添加 Sora 账号双表同步与创建 · 99dc3b59
      yangjianbo authored
      - 新增 sora_accounts 表与 accounts.extra GIN 索引\n- OpenAI OAuth 支持同时创建 Sora 账号并同步配置\n- Token 刷新同步关联 Sora 账号凭证与扩展表\n- 增加 Sora 账号连通性测试与前端开关文案
      99dc3b59
  18. 26 Jan, 2026 1 commit
    • song's avatar
      fix: jsonb_set 嵌套路径无法创建多层 key 的问题 · 4b57e80e
      song authored
      PostgreSQL jsonb_set 在 create_if_missing=true 时无法一次性创建多层嵌套路径。
      例如设置 {antigravity_quota_scopes,gemini_image} 时,如果 antigravity_quota_scopes 不存在,
      jsonb_set 不会自动创建外层 key,导致更新静默失败(affected=1 但数据未变)。
      
      修复方案:嵌套两次 jsonb_set,先确保外层 key 存在,再设置内层值。
      
      影响范围:
      - SetAntigravityQuotaScopeLimit: Antigravity 平台按模型 scope 限流
      - SetModelRateLimit: Anthropic 平台 Sonnet 模型限流
      4b57e80e
  19. 21 Jan, 2026 1 commit
    • song's avatar
      fix: 429 限流时更新账号 last_used_at · 3a31fa47
      song authored
      在设置限流标记时同时更新 last_used_at,使得刚触发 429 的账号
      在后续调度中优先级降低,让其他账号有更多被选中的机会。
      3a31fa47
  20. 20 Jan, 2026 4 commits
  21. 19 Jan, 2026 1 commit
    • shaw's avatar
      fix: 修复5小时窗口费用不重置的问题 · de6797c5
      shaw authored
      - 新增 GetCurrentWindowStartTime() 方法,当窗口过期时自动使用新的预测窗口开始时间
      - UpdateSessionWindow 更新窗口时间后触发 outbox 事件同步调度器缓存
      - 统一所有窗口费用查询入口使用新方法
      de6797c5
  22. 16 Jan, 2026 2 commits
  23. 15 Jan, 2026 1 commit
  24. 14 Jan, 2026 1 commit
    • 墨颜's avatar
      feat(计费): 支持账号计费倍率快照与统计展示 · fb99ceac
      墨颜 authored
      - 新增 accounts.rate_multiplier(默认 1.0,允许 0)
      - 使用 usage_logs.account_rate_multiplier 记录倍率快照,避免历史回算
      - 统计/导出/管理端展示账号口径费用(total_cost * account_rate_multiplier)
      fb99ceac
  25. 12 Jan, 2026 1 commit
  26. 09 Jan, 2026 3 commits
    • Song Siyu's avatar
      feat: antigravity 配额域限流 + SSE 上限 (#222) · 7d1fe818
      Song Siyu authored
      * fix: 添加 gemini-3-flash 前缀映射支持 gemini-3-flash-preview
      
      * feat(antigravity): 增强请求参数和注入 Antigravity 身份 system prompt
      
      * feat: antigravity 配额域限流
      
      * chore: 调整 SSE 单行上限到 25MB
      
      * chore: 提升 SSE 单行上限到 40MB
      7d1fe818
    • IanShaw027's avatar
      feat(admin): 添加账号批量调度开关功能 · 5e936fbf
      IanShaw027 authored
      - 后端:支持批量更新账号的 schedulable 字段
        - 在 BulkUpdateAccountsRequest 中添加 schedulable 参数
        - 在 AccountBulkUpdate 中添加 schedulable 字段支持
        - 更新 repository 层批量更新 SQL 逻辑
      - 前端:在账号管理页面添加批量调度控制
        - 新增"批量启用调度"和"批量停止调度"按钮
        - 添加 handleBulkToggleSchedulable 处理函数
        - 显示具体的成功提示信息(包含操作账号数量)
      - 国际化:添加批量调度相关中英文翻译
      - 优化:添加 search 参数标准化和验证(account_handler)
      5e936fbf
    • song's avatar
      feat: antigravity 配额域限流 · da1f3d61
      song authored
      da1f3d61