1. 09 Mar, 2026 1 commit
  2. 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
  3. 28 Feb, 2026 1 commit
  4. 27 Feb, 2026 1 commit
  5. 17 Feb, 2026 1 commit
  6. 14 Feb, 2026 1 commit
    • 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
  7. 12 Feb, 2026 1 commit
    • yangjianbo's avatar
      feat(openai): 支持自动透传开关并透传 User-Agent · 9c910c20
      yangjianbo authored
      - OpenAI OAuth/API Key 统一支持自动透传开关,编辑页可开关\n- 透传模式仅替换认证并保留计费/并发/审计,修复 API Key responses 端点拼接\n- Usage 页面显示原始 User-Agent 且不截断,补充回归测试与清单
      9c910c20
  8. 07 Feb, 2026 1 commit
  9. 03 Feb, 2026 1 commit
  10. 02 Feb, 2026 1 commit
  11. 19 Jan, 2026 1 commit
  12. 18 Jan, 2026 3 commits
  13. 15 Jan, 2026 1 commit
  14. 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
  15. 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
  16. 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
  17. 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
  18. 06 Jan, 2026 1 commit
    • shaw's avatar
      feat(admin/usage): 优化管理员用量页面功能和体验 · 015974a2
      shaw authored
      后端改进:
      - 新增 GetStatsWithFilters 方法支持完整筛选条件
      - Stats 端点支持 account_id, group_id, model, stream, billing_type 参数
      - 统一使用 filters 结构体,移除冗余的分支逻辑
      
      前端改进:
      - 统计卡片添加"所选范围内"文字提示
      - 优化总消费显示格式,清晰展示实际费用和标准计费
      - Token 和费用列添加问号图标 tooltip 显示详细信息
      - API Key 搜索框体验优化:点击即显示下拉选项
      - 选择用户后自动加载该用户的所有 API Key
      015974a2
  19. 05 Jan, 2026 2 commits
    • IanShaw027's avatar
      refactor(frontend): 完成所有组件的内联SVG统一替换为Icon组件 · 4251a5a4
      IanShaw027 authored
      - 扩展 Icon.vue 组件,新增 60+ 图标路径
        - 导航类: arrowRight, arrowLeft, arrowUp, arrowDown, chevronUp, externalLink
        - 状态类: checkCircle, xCircle, exclamationCircle, exclamationTriangle, infoCircle
        - 用户类: user, userCircle, userPlus, users
        - 文档类: document, clipboard, copy, inbox
        - 操作类: download, upload, filter, sort
        - 安全类: key, lock, shield
        - UI类: menu, calendar, home, terminal, gift, creditCard, mail
        - 数据类: chartBar, trendingUp, database, cube
        - 其他: bolt, sparkles, cloud, server, sun, moon, book 等
      
      - 重构 56 个 Vue 组件,用 Icon 组件替换内联 SVG
        - 净减少约 2200 行代码
        - 提升代码可维护性和一致性
        - 统一图标样式和尺寸管理
      4251a5a4
    • ianshaw's avatar
      fix(frontend): 恢复 UsageTable 缺失的列和功能 · e67dbbdb
      ianshaw authored
      - 恢复 API Key、账号、分组、类型、计费类型等列
      - 恢复 Token 详情显示(含缓存读写)
      - 恢复首Token时间、耗时列
      - 恢复请求ID列及复制功能
      e67dbbdb
  20. 04 Jan, 2026 3 commits
    • IanShaw027's avatar
      refactor(frontend): 统一管理页面工具条布局和操作列样式 · eef12cb9
      IanShaw027 authored
      ## 修复内容
      
      ### 1. 统一操作列按钮样式
      - 所有操作列按钮统一为"图标+文字"垂直排列样式
      - UsersView: 编辑和更多按钮添加文字标签
      - 与 AccountsView、GroupsView 等页面保持一致
      
      ### 2. 统一顶部工具条布局(6个管理页面)
      - 使用 flex + justify-between 布局
      - 左侧:模糊搜索框、筛选器(可多行排列)
      - 右侧:刷新、创建等操作按钮(靠右对齐)
      - 响应式:宽度不够时右侧按钮自动换行到上一行
      
      ### 3. 修复的页面
      - AccountsView: 合并 actions/filters 到单行工具条
      - UsersView: 标准左右分栏,操作列添加文字
      - GroupsView: 新增搜索框,左右分栏布局
      - ProxiesView: 左右分栏,响应式布局
      - SubscriptionsView: 新增用户模糊搜索,左右分栏
      - UsageView: 补齐所有筛选项,左右分栏
      
      ### 4. 新增功能
      - GroupsView: 新增分组名称/描述模糊搜索
      - SubscriptionsView: 新增用户模糊搜索功能
      - UsageView: 补齐 API Key 搜索筛选
      
      ### 5. 国际化
      - 新增相关搜索框的 placeholder 文案(中英文)
      
      ## 技术细节
      - 使用 flex-wrap-reverse 实现响应式换行
      - 左侧筛选区使用 flex-wrap 支持多行
      - 右侧按钮区使用 ml-auto + justify-end 保持右对齐
      - 移动端使用 w-full sm:w-* 响应式宽度
      
      ## 验证结果
      -  TypeScript 类型检查通过
      -  所有页面布局统一
      -  响应式布局正常工作
      eef12cb9
    • IanShaw027's avatar
      refactor(frontend): final component split and comprehensive type safety fixes · d4d21d5e
      IanShaw027 authored
      - Completed modular refactoring of KeysView.vue and SettingsView.vue.
      - Resolved remaining TypeScript errors in new components.
      - Standardized prop types and event emitters for sub-components.
      - Optimized bundle size by eliminating redundant template code and unused script variables.
      - Verified system stability with final type checking.
      d4d21d5e
    • 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