1. 31 Mar, 2026 2 commits
  2. 30 Mar, 2026 1 commit
  3. 29 Mar, 2026 1 commit
  4. 27 Mar, 2026 4 commits
    • QTom's avatar
      feat(privacy): 创建/批量创建 OpenAI OAuth 账号时异步设置隐私模式 · c489f238
      QTom authored
      
      
      参照 Antigravity 的模式,单个创建时同步调用 ForceOpenAIPrivacy,
      批量创建时收集 OpenAI OAuth 账号后异步 goroutine 设置,避免阻塞请求。
      Co-Authored-By: default avatarClaude Opus 4.6 (1M context) <noreply@anthropic.com>
      c489f238
    • QTom's avatar
      fix(privacy): 刷新令牌失败时也尝试设置 OpenAI 隐私模式 · 47a54423
      QTom authored
      
      
      刷新失败不代表 access_token 无效,在后台定时刷新(不可重试错误 +
      重试耗尽)和前端批量/单次刷新的失败路径中,均利用可能仍有效的
      access_token 调用隐私设置。
      Co-Authored-By: default avatarClaude Opus 4.6 (1M context) <noreply@anthropic.com>
      47a54423
    • QTom's avatar
      feat(privacy): 为 OpenAI OAuth 账号添加前端手动设置隐私按钮 · c13c81f0
      QTom authored
      
      
      复用已有的 set-privacy API 端点,Handler 通过 platform 分发到
      ForceOpenAIPrivacy / ForceAntigravityPrivacy,前端 AccountActionMenu
      扩展隐私按钮支持 OpenAI OAuth 账号。
      Co-Authored-By: default avatarClaude Opus 4.6 (1M context) <noreply@anthropic.com>
      c13c81f0
    • 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
  5. 26 Mar, 2026 2 commits
    • shaw's avatar
      feat(rectifier): 请求整流器增加 API Key 账号签名整流支持 · d571f300
      shaw authored
      新增独立开关控制 API Key 账号的签名整流功能,支持配置自定义
      匹配关键词以捕获不同格式的上游错误响应。
      
      - 新增 apikey_signature_enabled 开关(默认关闭)
      - 新增 apikey_signature_patterns 自定义关键词配置
      - 内置签名检测规则对 API Key 账号同样生效
      - 自定义关键词对完整响应体做不区分大小写匹配
      - 重试二阶段检测仅做模式匹配,不重复校验开关
      - Handler 层校验关键词数量(≤50)和长度(≤500)
      - API 响应 nil patterns 统一序列化为空数组
      - OAuth/SetupToken/Upstream/Bedrock 账号行为不变
      d571f300
    • shaw's avatar
      feat: 网关请求头 wire casing 保持、转发行为开关、调试日志增强及 accept-encoding 恢复 · b20e1422
      shaw authored
      - 新增 header_util.go,通过 setHeaderRaw/getHeaderRaw/addHeaderRaw 绕过
        Go 的 canonical-case 规范化,保持真实 Claude CLI 抓包的请求头大小写
        (如 "x-app" 而非 "X-App","X-Stainless-OS" 而非 "X-Stainless-Os")
      - 新增管理后台开关:指纹统一化(默认开启)和 metadata 透传(默认关闭),
        使用 atomic.Value + singleflight 缓存模式,60s TTL
      - 调试日志从控制台 body 打印升级为文件级完整快照
        (按真实 wire 顺序输出 headers + 格式化 JSON body + 上下文元数据)
      - 恢复 accept-encoding 到白名单,在 http_upstream.go 新增 decompressResponseBody
        处理 gzip/brotli/deflate 解压(Go 显式设置 Accept-Encoding 时不会自动解压)
      - OAuth 服务 axios UA 从 1.8.4 更新至 1.13.6
      - 测试断言改用 getHeaderRaw 适配 raw header 存储方式
      b20e1422
  6. 25 Mar, 2026 2 commits
  7. 24 Mar, 2026 2 commits
  8. 23 Mar, 2026 2 commits
    • Ethan0x0000's avatar
      feat(handler): add Responses/ChatCompletions handlers on GatewayHandler · 31660c4c
      Ethan0x0000 authored
      New HTTP handlers for Anthropic platform groups accepting OpenAI-format
      endpoints:
      
      - GatewayHandler.Responses: /v1/responses for non-OpenAI groups
      - GatewayHandler.ChatCompletions: /v1/chat/completions for non-OpenAI groups
      
      Both handlers include:
      - Claude Code only restriction (403 reject when claude_code_only enabled,
        since these endpoints are never Claude Code clients)
      - Full auth → billing → user/account concurrency → failover loop
      - Ops error/endpoint context propagation
      - Async usage recording via worker pool
      
      Error responses use each endpoint's native format (Responses API format
      for /v1/responses, CC format for /v1/chat/completions).
      31660c4c
    • weak-fox's avatar
      feat(admin): add account privacy mode filter · 4838ab74
      weak-fox authored
      4838ab74
  9. 21 Mar, 2026 5 commits
  10. 20 Mar, 2026 4 commits
  11. 19 Mar, 2026 4 commits
    • QTom's avatar
      feat(admin): 用户管理新增分组列、分组筛选与专属分组一键替换 · ba7d2aec
      QTom authored
      - 新增分组列:展示用户的专属/公开分组,支持 hover 查看详情
      - 新增分组筛选:下拉选择或模糊搜索分组名过滤用户
      - 专属分组替换:点击专属分组弹出操作菜单,选择目标分组后
        自动授予新分组权限、迁移绑定的 Key、移除旧分组权限
      - 后端新增 POST /admin/users/:id/replace-group 端点,事务内
        完成分组替换并失效认证缓存
      ba7d2aec
    • shaw's avatar
      feat: Anthropic 账号被动用量采样,页面默认展示被动数据 · 525cdb88
      shaw authored
      从上游 /v1/messages 响应头被动采集 5h/7d utilization 并存储到
      Account.Extra,页面加载时直接读取本地数据而非调用外部 Usage API。
      用户可点击"查询"按钮主动拉取最新数据,主动查询结果自动回写被动缓存。
      
      后端:
      - UpdateSessionWindow 合并采集 5h + 7d headers 为单次 DB 写入
      - 新增 GetPassiveUsage 从 Extra 构建 UsageInfo (复用 estimateSetupTokenUsage)
      - GetUsage 主动查询后 syncActiveToPassive 回写被动缓存
      - passive_usage_ 前缀注册为 scheduler-neutral
      
      前端:
      - Anthropic 账号 mount/refresh 默认 source=passive
      - 新增"被动采样"标签和"查询"按钮 (带 loading 动画)
      525cdb88
    • Hg's avatar
      feat: add ungrouped filter to account · 8027531d
      Hg authored
      8027531d
    • haruka's avatar
      fix: record original upstream status code when failover exhausted (#1128) · 1fd1a58a
      haruka authored
      
      
      When all failover accounts are exhausted, handleFailoverExhausted maps
      the upstream status code (e.g. 403) to a client-facing code (e.g. 502)
      but did not write the original code to the gin context. This caused ops
      error logs to show the mapped code instead of the real upstream code.
      
      Call SetOpsUpstreamError before mapUpstreamError in all failover-
      exhausted paths so that ops_error_logger captures the true upstream
      status code and message.
      Co-Authored-By: default avatarClaude Opus 4.6 (1M context) <noreply@anthropic.com>
      1fd1a58a
  12. 18 Mar, 2026 5 commits
  13. 17 Mar, 2026 2 commits
  14. 16 Mar, 2026 3 commits
    • erio's avatar
      test(dashboard): add unit tests for user-breakdown API · e0286e50
      erio authored
      Handler tests (9 cases): group_id/model/endpoint filters, default
      endpoint_type, custom limit, limit clamping, response format,
      empty result, no-filter pass-through.
      
      Repository test: resolveEndpointColumn mapping for inbound/upstream/path.
      e0286e50
    • erio's avatar
      feat(dashboard): add per-user drill-down for group, model, and endpoint distributions · 4b41e898
      erio authored
      Click on a group name, model name, or endpoint name in the distribution
      tables to expand and show per-user usage breakdown (requests, tokens,
      actual cost, standard cost).
      
      Backend: new GET /admin/dashboard/user-breakdown API with group_id,
      model, endpoint, endpoint_type filters.
      Frontend: clickable rows with expand/collapse sub-table in all three
      distribution charts.
      4b41e898
    • QTom's avatar
      feat(backup): 备份/恢复异步化,解决 504 超时 · c1fab7f8
      QTom authored
      
      
      POST /backups 和 POST /backups/:id/restore 改为异步:立即返回 HTTP 202,
      后台 goroutine 独立执行 pg_dump → gzip → S3 上传,前端每 2s 轮询状态。
      
      后端:
      - 新增 StartBackup/StartRestore 方法,后台 goroutine 不依赖 HTTP 连接
      - Graceful shutdown 等待活跃操作完成,启动时清理孤立 running 记录
      - BackupRecord 新增 progress/restore_status 字段支持进度和恢复状态追踪
      
      前端:
      - 创建备份/恢复后轮询 GET /backups/:id 直到完成或失败
      - 标签页切换暂停/恢复轮询,组件卸载清理定时器
      - 正确处理 409(备份进行中)和轮询超时
      Co-Authored-By: default avatarClaude Opus 4.6 (1M context) <noreply@anthropic.com>
      c1fab7f8
  15. 15 Mar, 2026 1 commit