1. 05 Apr, 2026 1 commit
  2. 04 Apr, 2026 3 commits
  3. 03 Apr, 2026 1 commit
  4. 31 Mar, 2026 1 commit
  5. 29 Mar, 2026 1 commit
    • shaw's avatar
      feat(tls-fingerprint): 新增 TLS 指纹 Profile 数据库管理及代码质量优化 · b22ab6ad
      shaw authored and 陈曦's avatar 陈曦 committed
      新增功能:
      - 新增 TLS 指纹 Profile CRUD 管理(Ent schema + 迁移 + Admin API + 前端管理界面)
      - 支持账号绑定数据库中的自定义 TLS Profile,或随机选择(profile_id=-1)
      - HTTPUpstream.DoWithTLS 接口从 bool 改为 *tlsfingerprint.Profile,支持按账号指定 Profile
      - AccountUsageService 注入 TLSFingerprintProfileService,统一 usage 场景与网关的 Profile 解析逻辑
      
      代码优化:
      - 删除已被 TLSFingerprintProfileService 完全取代的 registry.go 死代码(418 行)
      - 提取 3 个 dialer 的重复 TLS 握手逻辑为 performTLSHandshake() 共用函数
      - 修复 GetTLSFingerprintProfileID 缺少 json.Number 处理的 bug
      - gateway_service.Forward 中 ResolveTLSProfile 从重试循环内重复调用改为预解析局部变量
      - 删除冗余的 buildClientHelloSpec() 单行 wrapper 和 int64(e.ID) 无效转换
      - tls_fingerprint_profile_cache.go 日志从 log.Printf 改为 slog 结构化日志
      - dialer_capture_test.go 添加 //go:build integration 标签,防止 CI 失败
      - 去重 TestProfileExpectation 类型至共享 test_types_test.go
      - 修复 9 个测试文件缺少 tlsfingerprint import 的编译错误
      - 修复 error_policy_integration_test.go 中 handleError 回调签名被错误替换的问题
      b22ab6ad
  6. 27 Mar, 2026 1 commit
    • shaw's avatar
      feat(tls-fingerprint): 新增 TLS 指纹 Profile 数据库管理及代码质量优化 · 1854050d
      shaw authored
      新增功能:
      - 新增 TLS 指纹 Profile CRUD 管理(Ent schema + 迁移 + Admin API + 前端管理界面)
      - 支持账号绑定数据库中的自定义 TLS Profile,或随机选择(profile_id=-1)
      - HTTPUpstream.DoWithTLS 接口从 bool 改为 *tlsfingerprint.Profile,支持按账号指定 Profile
      - AccountUsageService 注入 TLSFingerprintProfileService,统一 usage 场景与网关的 Profile 解析逻辑
      
      代码优化:
      - 删除已被 TLSFingerprintProfileService 完全取代的 registry.go 死代码(418 行)
      - 提取 3 个 dialer 的重复 TLS 握手逻辑为 performTLSHandshake() 共用函数
      - 修复 GetTLSFingerprintProfileID 缺少 json.Number 处理的 bug
      - gateway_service.Forward 中 ResolveTLSProfile 从重试循环内重复调用改为预解析局部变量
      - 删除冗余的 buildClientHelloSpec() 单行 wrapper 和 int64(e.ID) 无效转换
      - tls_fingerprint_profile_cache.go 日志从 log.Printf 改为 slog 结构化日志
      - dialer_capture_test.go 添加 //go:build integration 标签,防止 CI 失败
      - 去重 TestProfileExpectation 类型至共享 test_types_test.go
      - 修复 9 个测试文件缺少 tlsfingerprint import 的编译错误
      - 修复 error_policy_integration_test.go 中 handleError 回调签名被错误替换的问题
      1854050d
  7. 20 Mar, 2026 2 commits
  8. 17 Mar, 2026 1 commit
    • Ethan0x0000's avatar
      feat(db): add upstream_model column to usage_logs · 51547fa2
      Ethan0x0000 authored
      Add nullable VARCHAR(100) column to record the actual model sent to upstream providers when model mapping is applied. NULL means no mapping — the requested model was used as-is.
      
      Includes migration, concurrent index for aggregation queries, Ent schema regeneration, and migration README correction (forward-only runner, not goose).
      51547fa2
  9. 07 Mar, 2026 2 commits
  10. 05 Mar, 2026 1 commit
  11. 03 Mar, 2026 1 commit
  12. 28 Feb, 2026 1 commit
  13. 23 Feb, 2026 1 commit
  14. 22 Feb, 2026 1 commit
  15. 17 Feb, 2026 1 commit
  16. 12 Feb, 2026 1 commit
  17. 10 Feb, 2026 1 commit
  18. 08 Feb, 2026 1 commit
    • 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
  19. 05 Feb, 2026 1 commit
    • 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
  20. 04 Feb, 2026 1 commit
  21. 03 Feb, 2026 1 commit
    • bayma888's avatar
      feat(api-key): add independent quota and expiration support · 6146be14
      bayma888 authored
      This feature allows API Keys to have their own quota limits and expiration
      times, independent of the user's balance.
      
      Backend:
      - Add quota, quota_used, expires_at fields to api_key schema
      - Implement IsExpired() and IsQuotaExhausted() checks in middleware
      - Add ResetQuota and ClearExpiration API endpoints
      - Integrate quota billing in gateway handlers (OpenAI, Anthropic, Gemini)
      - Include quota/expiration fields in auth cache for performance
      - Expiration check returns 403, quota exhausted returns 429
      
      Frontend:
      - Add quota and expiration inputs to key create/edit dialog
      - Add quick-select buttons for expiration (+7, +30, +90 days)
      - Add reset quota confirmation dialog
      - Add expires_at column to keys list
      - Add i18n translations for new features (en/zh)
      
      Migration:
      - Add 045_add_api_key_quota.sql for new columns
      6146be14
  22. 02 Feb, 2026 2 commits
  23. 31 Jan, 2026 1 commit
  24. 30 Jan, 2026 2 commits
  25. 29 Jan, 2026 1 commit
    • yangjianbo's avatar
      feat(sora): 新增 Sora 平台支持并修复高危安全和性能问题 · 13262a56
      yangjianbo authored
      
      
      新增功能:
      - 新增 Sora 账号管理和 OAuth 认证
      - 新增 Sora 视频/图片生成 API 网关
      - 新增 Sora 任务调度和缓存机制
      - 新增 Sora 使用统计和计费支持
      - 前端增加 Sora 平台配置界面
      
      安全修复(代码审核):
      - [SEC-001] 限制媒体下载响应体大小(图片 20MB、视频 200MB),防止 DoS 攻击
      - [SEC-002] 限制 SDK API 响应大小(1MB),防止内存耗尽
      - [SEC-003] 修复 SSRF 风险,添加 URL 验证并强制使用代理配置
      
      BUG 修复(代码审核):
      - [BUG-001] 修复 for 循环内 defer 累积导致的资源泄漏
      - [BUG-002] 修复图片并发槽位获取失败时已持有锁未释放的永久泄漏
      
      性能优化(代码审核):
      - [PERF-001] 添加 Sentinel Token 缓存(3 分钟有效期),减少 PoW 计算开销
      
      技术细节:
      - 使用 io.LimitReader 限制所有外部输入的大小
      - 添加 urlvalidator 验证防止 SSRF 攻击
      - 使用 sync.Map 实现线程安全的包级缓存
      - 优化并发槽位管理,添加 releaseAll 模式防止泄漏
      
      影响范围:
      - 后端:新增 Sora 相关数据模型、服务、网关和管理接口
      - 前端:新增 Sora 平台配置、账号管理和监控界面
      - 配置:新增 Sora 相关配置项和环境变量
      Co-Authored-By: default avatarClaude Sonnet 4.5 <noreply@anthropic.com>
      13262a56
  26. 27 Jan, 2026 1 commit
    • song's avatar
      feat(group): 添加 MCP XML 注入开关 · 877c1725
      song authored
      - Group 新增 mcp_xml_inject 字段,控制 Antigravity 平台的 MCP XML 协议注入
      - 默认启用,可在分组设置中关闭
      - 修复 GetByKeyForAuth 遗漏查询 mcp_xml_inject 字段导致认证缓存值始终为 false 的问题
      877c1725
  27. 26 Jan, 2026 1 commit
    • shaw's avatar
      feat(auth): 实现 TOTP 双因素认证功能 · 1245f07a
      shaw authored
      新增功能:
      - 支持 Google Authenticator 等应用进行 TOTP 二次验证
      - 用户可在个人设置中启用/禁用 2FA
      - 登录时支持 TOTP 验证流程
      - 管理后台可全局开关 TOTP 功能
      
      安全增强:
      - TOTP 密钥使用 AES-256-GCM 加密存储
      - 添加 TOTP_ENCRYPTION_KEY 配置项,必须手动配置才能启用功能
      - 防止服务重启导致加密密钥变更使用户无法登录
      - 验证失败次数限制,防止暴力破解
      
      配置说明:
      - Docker 部署:在 .env 中设置 TOTP_ENCRYPTION_KEY
      - 非 Docker 部署:在 config.yaml 中设置 totp.encryption_key
      - 生成密钥命令:openssl rand -hex 32
      1245f07a
  28. 23 Jan, 2026 1 commit
  29. 18 Jan, 2026 4 commits
  30. 16 Jan, 2026 1 commit
    • longgexx's avatar
      feat(group): 添加分组级别模型路由配置功能 · 19865b86
      longgexx authored
        支持为分组配置模型路由规则,可以指定特定模型模式优先使用的账号列表。
      
        - 新增 model_routing 字段存储路由配置(JSONB格式,支持通配符匹配)
      
        - 新增 model_routing_enabled 字段控制是否启用路由
      
        - 更新后端 handler/service/repository 支持路由配置的增删改查
      
        - 更新前端 GroupsView 添加路由配置界面
      
        - 添加数据库迁移脚本 040/041
      19865b86
  31. 15 Jan, 2026 1 commit