1. 01 Mar, 2026 3 commits
    • 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
    • erio's avatar
      refactor(docs): move integration doc to docs/ and add download link in settings · 23686b13
      erio authored
      - Move ADMIN_PAYMENT_INTEGRATION_API.md → docs/ADMIN_PAYMENT_INTEGRATION_API.md
      - Update README.md reference path
      - Add payment integration doc download link in admin settings UI (Purchase section)
      - Add i18n keys: integrationDoc / integrationDocHint (zh + en)
      23686b13
    • QTom's avatar
      feat(gateway): 添加 Claude Code 客户端最低版本检查功能 · 4280aca8
      QTom authored
      - 通过 User-Agent 识别 Claude Code 客户端并提取版本号
      - 在网关层验证客户端版本是否满足管理员配置的最低要求
      - 在管理后台提供版本要求配置选项(英文/中文双语)
      - 实现原子缓存 + singleflight 防止并发问题和 thundering herd
      - 使用 context.WithoutCancel 隔离 DB 查询,避免客户端断连影响缓存
      - 双 TTL 策略:60s 正常、5s 错误恢复,保证性能与可用性
      - 仅检查 Claude Code 客户端,其他客户端不受影响
      - 添加完整单元测试覆盖版本提取、比对、上下文操作
      4280aca8
  2. 28 Feb, 2026 4 commits
  3. 27 Feb, 2026 2 commits
  4. 26 Feb, 2026 1 commit
    • cagedbird043's avatar
      fix(frontend): 批量编辑添加跨平台模型映射警告与过滤 · e350aab1
      cagedbird043 authored
      - 新增 selectedPlatforms prop,从父组件传入选中账号的平台集合
      - 根据选中平台过滤模型列表与预设映射按钮,避免误操作
      - 混选多平台时显示 amber 警告横幅,提醒用户注意映射适用性
      - 仅警告不阻断,保持加法兼容
      e350aab1
  5. 22 Feb, 2026 1 commit
  6. 20 Feb, 2026 1 commit
  7. 19 Feb, 2026 1 commit
  8. 17 Feb, 2026 1 commit
  9. 14 Feb, 2026 5 commits
    • shaw's avatar
      feat: 区分 Anthropic 5m/1h 缓存创建 token 的差异化计费 · a817cafe
      shaw authored
      Anthropic API 的 cache_creation 对象区分了 ephemeral_5m 和 ephemeral_1h
      两种缓存创建 token,1h 单价远高于 5m(如 claude-3-5-haiku: 5m=$1/MTok,
      1h=$6/MTok)。此前系统统一按 5m 单价计费,导致计费偏低。
      
      后端:
      - pricing_service: 加载 LiteLLM 的 cache_creation_input_token_cost_above_1hr
      - billing_service: GetModelPricing 启用分类计费(安全守卫 1h>5m),
        CalculateCost 按 5m/1h 分别计费,无明细时回退到 5m 单价
      - gateway_service: parseSSEUsage/handleNonStreamingResponse 用 gjson
        提取嵌套 cache_creation 对象的 ephemeral_5m/1h_input_tokens
      - antigravity_gateway_service: extractSSEUsage/extractClaudeUsage 同步提取
      - usage_log: 修复 GORM column tag 确保写入正确的数据库列
      - 新增迁移 054: 删除 GORM 自动生成的重复列
      
      前端:
      - 使用记录 tooltip 展示 5m/1h 缓存创建明细(带彩色 badge 区分)
      - 表格单元格缓存写入数值旁显示 1h 标识
      a817cafe
    • yangjianbo's avatar
      feat(accounts): 自动刷新改为ETag增量同步并优化单账号更新体验 · 06b0f62e
      yangjianbo authored
      - 前端自动刷新改为 ETag/304 增量合并,减少全量重刷
      
      - 单账号更新后增加静默窗口,避免刚更新即被自动刷新覆盖
      
      - 列表筛选移除时改为待同步提示,不再立即触发全量补页
      
      - 后端账号列表支持 If-None-Match,命中返回 304
      
      - 单账号接口统一补充运行时容量字段并暴露 ETag 头
      06b0f62e
    • yangjianbo's avatar
      f23318fb
    • yangjianbo's avatar
      fix(accounts): 账号管理改为单行增量更新并避免全量刷新 · 9cafa46d
      yangjianbo authored
      
      
      - 将编辑与重新授权成功事件改为回传更新后的账号对象
      - 在账号列表页按 id 就地补丁更新单行数据并保留运行时容量字段
      - 单账号操作(刷新凭证/清错/清限流/临时不可调度重置)改为单行更新
      - 后端增强 clear-rate-limit 接口,返回更新后的账号对象
      - 同步前端 clearRateLimit API 类型定义
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      9cafa46d
    • yangjianbo's avatar
  10. 12 Feb, 2026 5 commits
  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 1 commit
    • 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. 08 Feb, 2026 3 commits
    • bayma888's avatar
      feat(admin): add drag-and-drop group sort order · bac9e2bf
      bayma888 authored
      - Add `sort_order` field to groups table with migration
      - Add `PUT /api/v1/admin/groups/sort-order` API for batch update
      - Implement drag-and-drop UI using vue-draggable-plus
      - All queries now order groups by sort_order
      - Add i18n support (en/zh) for sort-related UI text
      - Update test stubs to satisfy new interface methods
      bac9e2bf
    • shaw's avatar
      feat(ui): 用户列表页显示当前并发数 · e4d74ae1
      shaw authored
      优化 /admin/users 页面的并发数列,显示「当前/最大」格式,
      参考 AccountCapacityCell 的设计风格。
      
      - 后端 UserHandler 注入 ConcurrencyService,批量查询用户当前并发数
      - 新增 UserConcurrencyCell 组件,支持颜色状态(空闲灰/使用中黄/满载红)
      - 前端 AdminUser 类型添加 current_concurrency 字段
      e4d74ae1
    • shaw's avatar
      fix(ui): unify admin table toolbar layout with search and buttons in single row · b1c30df8
      shaw authored
      Standardize filter bar layout across admin pages to place search/filters
      on left and action buttons on right within the same row, improving
      visual consistency and space utilization.
      b1c30df8
  14. 07 Feb, 2026 3 commits
    • shaw's avatar
      chore: /admin/usage页面增加一个刷新按钮 · f3605ddc
      shaw authored
      f3605ddc
    • erio's avatar
      feat(antigravity): comprehensive enhancements - model mapping, rate limiting, scheduling & ops · 5e98445b
      erio authored
      Key changes:
      - Upgrade model mapping: Opus 4.5 → Opus 4.6-thinking with precise matching
      - Unified rate limiting: scope-level → model-level with Redis snapshot sync
      - Load-balanced scheduling by call count with smart retry mechanism
      - Force cache billing support
      - Model identity injection in prompts with leak prevention
      - Thinking mode auto-handling (max_tokens/budget_tokens fix)
      - Frontend: whitelist mode toggle, model mapping validation, status indicators
      - Gemini session fallback with Redis Trie O(L) matching
      - Ops: enhanced concurrency monitoring, account availability, retry logic
      - Migration scripts: 049-051 for model mapping unification
      5e98445b
    • shaw's avatar
      fix(frontend): 优化代理管理页面工具栏布局 · 9e80ed0f
      shaw authored
      - 将筛选器和操作按钮合并到同一行显示
      - 筛选器在左侧,操作按钮在右侧
      - 添加响应式支持,窄屏时自动换行并简化按钮文字
      9e80ed0f
  15. 06 Feb, 2026 1 commit
  16. 05 Feb, 2026 6 commits
    • shaw's avatar
      feat: 新增全局错误透传规则功能 · 39e05a2d
      shaw authored
      支持管理员配置上游错误如何返回给客户端:
      - 新增 ErrorPassthroughRule 数据模型和 Ent Schema
      - 实现规则的 CRUD API(/admin/error-passthrough-rules)
      - 支持按错误码、关键词匹配,支持 any/all 匹配模式
      - 支持按平台过滤(anthropic/openai/gemini/antigravity)
      - 支持透传或自定义响应状态码和错误消息
      - 实现两级缓存(Redis + 本地内存)和多实例同步
      - 集成到 gateway_handler 的错误处理流程
      - 新增前端管理界面组件
      - 新增单元测试覆盖核心匹配逻辑
      
      优化:
      - 移除 refreshLocalCache 中的冗余排序(数据库已排序)
      - 后端 Validate() 增加匹配条件非空校验
      39e05a2d
    • LLLLLLiulei's avatar
      feat: refine proxy export and toolbar layout · 0c660f83
      LLLLLLiulei authored
      0c660f83
    • LLLLLLiulei's avatar
      feat: add proxy import flow · ce9a247a
      LLLLLLiulei authored
      ce9a247a
    • LLLLLLiulei's avatar
      feat: add data import/export bundle · b4bd46d0
      LLLLLLiulei authored
      b4bd46d0
    • shaw's avatar
      feat: 支持用户专属分组倍率配置 · 2b192f7d
      shaw authored
      2b192f7d
    • shaw's avatar
      feat(auth): 实现 Refresh Token 机制 · 49a3c437
      shaw authored
      - 新增 Access Token + Refresh Token 双令牌认证
      - 支持 Token 自动刷新和轮转
      - 添加登出和撤销所有会话接口
      - 前端实现无感刷新和主动刷新定时器
      49a3c437