1. 12 Mar, 2026 3 commits
  2. 11 Mar, 2026 6 commits
  3. 09 Mar, 2026 3 commits
  4. 07 Mar, 2026 8 commits
  5. 05 Mar, 2026 7 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
    • erio's avatar
      fix: include upstream error details in usage API error response · 9117c2a4
      erio authored
      When FetchUsageWithOptions receives a non-200 response from the
      Anthropic API (e.g. 429 Rate Limited, 401 Unauthorized), the error
      was wrapped with fmt.Errorf which infraerrors.FromError cannot
      recognize, causing a generic "internal error" message with no details.
      
      Replace fmt.Errorf with infraerrors.New(500, "UPSTREAM_ERROR", msg)
      so the upstream error details (status code + body) are included in
      the 500 response message. The HTTP status remains 500 to avoid
      interfering with frontend auth routing (e.g. 401 would trigger
      JWT expiry redirect).
      9117c2a4
    • shaw's avatar
      33bae6f4
    • guoyongchang's avatar
    • guoyongchang's avatar
      fix: 修复 golangci-lint depguard 和 gofmt 错误 · 9a8dacc5
      guoyongchang authored
      
      
      将 redis leader lock 逻辑从 service 层抽取为 LeaderLocker 接口,
      实现移至 repository 层,消除 service 层对 redis 的直接依赖。
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      9a8dacc5
    • guoyongchang's avatar
      feat: 支持基于 crontab 的定时账号测试 · 3a089242
      guoyongchang authored
      
      
      每个测试计划绑定一个账号和一个模型,按 cron 表达式定期执行测试,
      保存历史结果并在前端账号管理页面中提供完整的增删改查和结果查看功能。
      
      主要变更:
      - 新增 scheduled_test_plans / scheduled_test_results 两张表及迁移
      - 后端 service 层:CRUD 服务 + 后台 cron runner(每分钟扫描到期计划并发执行)
      - RunTestBackground 方法通过 httptest 在内存中执行账号测试并解析 SSE 输出
      - Redis leader lock + pg_try_advisory_lock 双重保障多实例部署只执行一次
      - REST API:5 个管理端点(计划 CRUD + 结果查询)
      - 前端 ScheduledTestsPanel 组件:计划管理、启用开关、内联编辑、结果展开查看
      - 中英文 i18n 支持
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      3a089242
  6. 04 Mar, 2026 6 commits
  7. 03 Mar, 2026 6 commits
  8. 02 Mar, 2026 1 commit
    • 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