1. 06 Mar, 2026 11 commits
  2. 05 Mar, 2026 15 commits
  3. 04 Mar, 2026 8 commits
  4. 03 Mar, 2026 6 commits
    • shaw's avatar
      feat: 重构 /v1/usage 端点,支持 quota_limited 和 unrestricted 双模式 · 838dad87
      shaw authored
      - quota_limited 模式:返回 Key 级别的总额度、速率限制窗口用量和过期时间
      - unrestricted 模式:返回订阅限额或钱包余额信息(向后兼容)
      - 新增 model_stats 字段,支持 start_date/end_date 参数查询按模型用量统计
      - 提取 buildUsageData/parseUsageDateRange 等辅助方法,减少主函数复杂度
      - 新增 APIKeyService.GetRateLimitData 和 UsageService.GetAPIKeyModelStats
      838dad87
    • QTom's avatar
      feat(gateway): 系统设置控制未分组 Key 调度 — Handler 层中间件拦截 · 0c7cbe35
      QTom authored
      新增系统设置 allow_ungrouped_key_scheduling(默认关闭),
      未分组的 API Key 在网关请求时直接返回 403,
      由 RequireGroupAssignment 中间件统一拦截,
      支持 Anthropic / Google 两种错误格式响应。
      
      全栈实现:常量 → 结构体 → 解析/更新/初始化 → DTO → 管理接口 →
      中间件 → 路由注册 → 前端设置界面 + i18n。
      0c7cbe35
    • alfadb's avatar
      style: fix gofmt formatting in ops_settings.go · 832b0185
      alfadb authored
      
      
      Remove extra space before inline comment to pass golangci-lint gofmt check.
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      832b0185
    • alfadb's avatar
      fix(ops): 默认忽略 count_tokens 404 错误 · b1719b26
      alfadb authored
      
      
      将 IgnoreCountTokensErrors 默认值从 false 改为 true。
      
      count_tokens 返回 404 是预期业务行为(上游不支持 endpoint,
      客户端应 fallback 到本地 tokenizer 估算),不应被视为错误。
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      b1719b26
    • shaw's avatar
      fix: 修复 PR #723 引入的 CI lint 和 test 编译错误 · ccf6a921
      shaw authored
      - wire_gen_test.go: 补充 NewTokenRefreshService 缺失的 tempUnschedCache 参数
      - config.go, token_refresh_service.go: 修复 gofmt 格式问题
      ccf6a921
    • shaw's avatar
      fix: correct migration 061 checksum and add missing BillingCache mock methods · 4a919545
      shaw authored
      - Fix fileChecksum for 061 migration: use TrimSpace hash (66207e7a) instead
        of raw sha256sum (97bdd9a3), matching the actual runtime computation
      - Add 222b4a09 as accepted DB checksum for 061 migration
      - Add missing GetAPIKeyRateLimit/SetAPIKeyRateLimit/UpdateAPIKeyRateLimitUsage/
        InvalidateAPIKeyRateLimit methods to mock BillingCache in test stubs
      - Fix NewBillingCacheService call in singleflight test (add apiKeyRepo param)
      4a919545