1. 04 Apr, 2026 3 commits
    • erio's avatar
      fix(ui): show token breakdown when image model uses token billing · 212eaa3a
      erio authored
      Only display image count format when billing_mode is "image".
      When channel has token pricing, show input/output/cache token details.
      212eaa3a
    • erio's avatar
      feat(channel): 渠道管理全链路集成 — 模型映射、定价、限制、用量统计 · 2555951b
      erio authored
      - 渠道模型映射:支持精确匹配和通配符映射,按平台隔离
      - 渠道模型定价:支持 token/按次/图片三种计费模式,区间分层定价
      - 模型限制:渠道可限制仅允许定价列表中的模型
      - 计费模型来源:支持 requested/upstream 两种计费模型选择
      - 用量统计:usage_logs 新增 channel_id/model_mapping_chain/billing_tier/billing_mode 字段
      - Dashboard 支持 model_source 维度(requested/upstream/mapping)查看模型统计
      - 全部 gateway handler 统一接入 ResolveChannelMappingAndRestrict
      - 修复测试:同步 SoraGenerationRepository 接口、SQL INSERT 参数、scan 字段
      2555951b
    • erio's avatar
      feat(usage): 使用记录增加计费模式字段 — 记录/展示/筛选 token/按次/图片 · a51e0047
      erio authored
      - DB: usage_logs 表新增 billing_mode VARCHAR(20) 列
      - 后端: RecordUsage 写入时根据 image_count 判定计费模式
      - 前端: 使用记录表格新增计费模式 badge 列 + 筛选下拉
      a51e0047
  2. 19 Mar, 2026 1 commit
  3. 17 Mar, 2026 1 commit
    • Ethan0x0000's avatar
      feat(frontend): display upstream model in usage table and distribution charts · 62b40636
      Ethan0x0000 authored
      Show upstream model mapping (requested -> upstream) in UsageTable with arrow notation. Add requested/upstream/mapping source toggle to ModelDistributionChart with lazy loading — only fetches data when user switches tab, with per-source cache invalidation on filter changes. Include upstream_model column in Excel export and i18n for en/zh.
      62b40636
  4. 16 Mar, 2026 2 commits
  5. 15 Mar, 2026 2 commits
  6. 13 Mar, 2026 1 commit
  7. 12 Mar, 2026 1 commit
  8. 11 Mar, 2026 1 commit
  9. 08 Mar, 2026 1 commit
    • bayma888's avatar
      feat(ui): 使用记录页面点击用户邮箱可查看充值记录 · 60c5949a
      bayma888 authored
      - UsageTable 用户邮箱改为可点击链接,点击弹出余额变动记录
      - 复用 UserBalanceHistoryModal 组件,通过 getById API 获取完整用户信息
      - 新增 hideActions prop 隐藏充值/退款按钮(Usage 页面仅查看)
      - i18n: 新增 clickToViewBalance、failedToLoadUser 词条 (en/zh)
      60c5949a
  10. 04 Mar, 2026 1 commit
  11. 01 Mar, 2026 1 commit
    • 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
  12. 28 Feb, 2026 1 commit
  13. 27 Feb, 2026 1 commit
  14. 14 Feb, 2026 1 commit
  15. 07 Feb, 2026 1 commit
  16. 03 Feb, 2026 1 commit
  17. 02 Feb, 2026 1 commit
  18. 19 Jan, 2026 1 commit
  19. 18 Jan, 2026 1 commit
  20. 15 Jan, 2026 1 commit
  21. 14 Jan, 2026 2 commits
    • longgexx's avatar
      fix(admin): 修复使用记录页面趋势图筛选联动和日期选择问题 · 806f402b
      longgexx authored
         修复两个问题:
         1. Token使用趋势图和模型分布图未响应筛选条件
         2. 上午时段选择今天刷新后日期回退到前一天
      
         前端修改:
         - 更新 dashboard API 类型定义,添加 model、account_id、group_id、stream 参数支持
         - 修改 UsageView 趋势图加载逻辑,传递所有筛选参数到后端
         - 修复日期格式化函数,使用本地时区避免 UTC 转换导致的日期偏移
      
         后端修改:
         - Handler 层:接收并解析所有筛选参数(model、account_id、group_id、stream)
         - Service 层:传递完整的筛选参数到 Repository 层
         - Repository 层:SQL 查询动态添加所有过滤条件
         - 更新接口定义和所有调用点以保持一致性
      
         影响范围:
         - /admin/dashboard/trend 端点现支持完整筛选
         - /admin/dashboard/models 端点现支持完整筛选
         - 用户在后台使用记录页面选择任意筛选条件时,趋势图和模型分布图会实时响应
         - 日期选择器在任何时区下都能正确保持今天的选择
      806f402b
    • 墨颜's avatar
      feat(计费): 支持账号计费倍率快照与统计展示 · fb99ceac
      墨颜 authored
      - 新增 accounts.rate_multiplier(默认 1.0,允许 0)
      - 使用 usage_logs.account_rate_multiplier 记录倍率快照,避免历史回算
      - 统计/导出/管理端展示账号口径费用(total_cost * account_rate_multiplier)
      fb99ceac
  22. 09 Jan, 2026 2 commits
    • Edric.Li's avatar
      feat(api-key): 添加 IP 白名单/黑名单限制功能 (#221) · 0a4641c2
      Edric.Li authored
      * feat(api-key): add IP whitelist/blacklist restriction and usage log IP tracking
      
      - Add IP restriction feature for API keys (whitelist/blacklist with CIDR support)
      - Add IP address logging to usage logs (admin-only visibility)
      - Remove billing_type column from usage logs UI (redundant)
      - Use generic "Access denied" error message for security
      
      Backend:
      - New ip package with IP/CIDR validation and matching utilities
      - Database migrations for ip_whitelist, ip_blacklist (api_keys) and ip_address (usage_logs)
      - Middleware IP restriction check after API key validation
      - Input validation for IP/CIDR patterns on create/update
      
      Frontend:
      - API key form with enable toggle for IP restriction
      - Shield icon indicator in table for keys with IP restriction
      - Removed billing_type filter and column from usage views
      
      * fix: update API contract tests for ip_whitelist/ip_blacklist fields
      
      Add ip_whitelist and ip_blacklist fields to expected JSON responses
      in API contract tests to match the new API key schema.
      0a4641c2
    • Edric Li's avatar
      feat(api-key): add IP whitelist/blacklist restriction and usage log IP tracking · 90798f14
      Edric Li authored
      - Add IP restriction feature for API keys (whitelist/blacklist with CIDR support)
      - Add IP address logging to usage logs (admin-only visibility)
      - Remove billing_type column from usage logs UI (redundant)
      - Use generic "Access denied" error message for security
      
      Backend:
      - New ip package with IP/CIDR validation and matching utilities
      - Database migrations for ip_whitelist, ip_blacklist (api_keys) and ip_address (usage_logs)
      - Middleware IP restriction check after API key validation
      - Input validation for IP/CIDR patterns on create/update
      
      Frontend:
      - API key form with enable toggle for IP restriction
      - Shield icon indicator in table for keys with IP restriction
      - Removed billing_type filter and column from usage views
      90798f14
  23. 08 Jan, 2026 1 commit
    • Edric Li's avatar
      feat(usage): add User-Agent column to usage logs · 70fcbd70
      Edric Li authored
      - Add user_agent field to UsageLog DTO and mapper
      - Display User-Agent column in admin and user usage tables
      - Add formatUserAgent helper to show friendly client names
      - Include user_agent in Excel export
      - Remove request_id column from admin usage table
      70fcbd70
  24. 07 Jan, 2026 1 commit
    • shaw's avatar
      fix(admin/usage): 恢复成本 Tooltip 明细并优化账号筛选 · d5ba7b80
      shaw authored
      问题修复:
      - 恢复 Cost Tooltip 的成本分项明细 (input_cost, output_cost, cache 成本)
      - 修复 Token Tooltip 双分隔线显示问题
      - 修复 Tooltip 翻译键缺失问题,新增 costDetails/tokenDetails
      - 恢复 Excel 导出格式化 (aoa_to_sheet + 翻译列头)
      
      功能优化:
      - 账号筛选从前端搜索改为后端搜索,避免一次加载 1000 条数据
      - 行为与用户/API Key 筛选保持一致 (debounce + 后端分页)
      d5ba7b80
  25. 06 Jan, 2026 2 commits
    • yangjianbo's avatar
      fix(前端): 修复 ESLint 代码规范问题 · 4790aced
      yangjianbo authored
      - 修复 AccountTableFilters.vue 中的 vue/no-mutating-props 错误,使用 emit 模式替代直接修改 props
      - 修复 TypeScript 类型错误,支持 Select 组件的 null 值类型
      - 为所有空 catch 块添加错误日志,提升代码可维护性和调试能力
      - 涉及文件:AccountTableFilters.vue, UserAllowedGroupsModal.vue, UserApiKeysModal.vue, UserBalanceModal.vue, AccountsView.vue, UsageView.vue, DashboardView.vue, ProfileView.vue
      
      🤖 Generated with [Claude Code](https://claude.com/claude-code
      
      )
      Co-Authored-By: default avatarClaude Opus 4.5 <noreply@anthropic.com>
      4790aced
    • yangjianbo's avatar
      fix(安全): 修复依赖漏洞并强化安全扫描 · 3f0017d1
      yangjianbo authored
      主要改动:
      - 固定 Go 1.25.5 与 CI 校验并更新扫描流程
      - 升级 quic-go、x/crypto、req 等依赖并通过 govulncheck
      - 强化 JWT 校验、TLS 配置与 xlsx 动态加载
      - 新增审计豁免清单与校验脚本
      3f0017d1
  26. 05 Jan, 2026 2 commits
    • song's avatar
      feat: 图片生成计费功能 · d4c2b723
      song authored
      - 新增 Group 图片价格配置(image_price_1k/2k/4k)
      - BillingService 新增 CalculateImageCost 方法
      - AntigravityGatewayService 支持识别图片生成模型并按次计费
      - UsageLog 新增 image_count 和 image_size 字段
      - 前端分组管理支持配置图片价格(antigravity 和 gemini 平台)
      - 图片计费复用通用计费能力(余额检查、扣费、倍率、订阅限额)
      d4c2b723
    • ianshaw's avatar
      fix(frontend): 恢复使用记录图表功能并添加订阅分配表单校验 · 960c09cd
      ianshaw authored
      - UsageView: 恢复 ModelDistributionChart、TokenUsageTrend 图表和粒度选择器
      - SubscriptionsView: 添加分配订阅时的用户和分组校验提示
      - i18n: 添加 pleaseSelectUser/pleaseSelectGroup 翻译
      960c09cd
  27. 04 Jan, 2026 2 commits
    • IanShaw027's avatar
      refactor(frontend): comprehensive split of large view files into modular components · e99063e1
      IanShaw027 authored
      - Split UsersView.vue into UserCreateModal, UserEditModal, UserApiKeysModal, etc.
      - Split UsageView.vue into UsageStatsCards, UsageFilters, UsageTable, etc.
      - Split DashboardView.vue into UserDashboardStats, UserDashboardCharts, etc.
      - Split AccountsView.vue into AccountTableActions, AccountTableFilters, etc.
      - Standardized TypeScript types across new components to resolve implicit 'any' and 'never[]' errors.
      - Improved overall frontend maintainability and code clarity.
      e99063e1
    • Yuhao Jiang's avatar
      fix(frontend): 修复跨时区日期范围筛选问题 · 600f9ce2
      Yuhao Jiang authored
      当管理员在比服务器时区更早的时区(如芝加哥 UTC-6)访问使用记录页面时,
      由于服务器时区(如中国 UTC+8)已经是"明天",导致最新的记录无法显示。
      
      修复方案:
      - DateRangePicker: 将日期选择器的 max 限制从"今天"改为"明天"
      - UsageView: 默认和重置时的 endDate 使用"明天"而非"今天"
      
      这样可以确保跨时区场景下用户能看到所有最新记录。
      
      🤖 Generated with [Claude Code](https://claude.ai/code
      
      )
      Co-Authored-By: default avatarClaude <noreply@anthropic.com>
      600f9ce2
  28. 29 Dec, 2025 1 commit
    • IanShaw027's avatar
      feat(frontend): 优化弹窗组件架构和用户体验 · 23412965
      IanShaw027 authored
      - 使用 BaseDialog 替代旧版 Modal 组件
      - 添加平滑过渡动画和更好的可访问性支持
      - 新增 ExportProgressDialog 导出进度弹窗
      - 优化所有账号管理和使用记录相关弹窗
      - 更新国际化文案,改进用户交互体验
      - 精简依赖,减少 package.json 体积
      23412965
  29. 28 Dec, 2025 2 commits
    • IanShaw027's avatar
      fix(frontend): 修复所有页面的UTC时区日期问题并优化初始化 · a5d6035c
      IanShaw027 authored
      **问题**:
      - 使用 toISOString() 格式化日期导致UTC时区问题
      - 在UTC+8时区凌晨时,日期会显示为前一天
      - 日期范围初始化在 onMounted 中导致重复渲染和请求
      
      **修复**:
      - 统一使用本地时区格式化日期
      - 在变量声明时就初始化日期范围,避免延迟初始化
      - 移除 initializeDateRange() 函数,直接在声明时设置正确值
      - 添加 formatLocalDate() 辅助函数统一日期格式化逻辑
      
      **影响范围**:
      - 用户仪表盘 (DashboardView)
      - 管理员仪表盘 (admin/DashboardView)
      - 用户使用记录 (UsageView)
      - 管理员使用记录 (admin/UsageView)
      
      **效果**:
      - 日期范围正确包含当天数据
      - 避免页面加载时的重复请求
      - 改善用户体验,减少不必要的重新渲染
      a5d6035c
    • IanShaw027's avatar
      refactor(frontend): UI/UX改进和组件优化 · 506cb21c
      IanShaw027 authored
      - DataTable组件操作列自适应
      - 优化各种Modal弹窗
      - 统一API调用方式(AbortSignal)
      - 添加全局订阅状态管理
      - 优化各管理视图的交互和布局
      - 修复国际化翻译问题
      506cb21c
  30. 27 Dec, 2025 1 commit
    • IanShaw027's avatar
      refactor(frontend): 优化管理后台视图 · 7a0de176
      IanShaw027 authored
      - 改进账户管理视图
      - 优化分组管理界面
      - 完善代理管理功能
      - 增强兑换码管理
      - 改进订阅管理视图
      - 优化使用统计展示
      - 完善用户管理界面
      7a0de176