"backend/internal/handler/vscode:/vscode.git/clone" did not exist on "9c144587fe7cafb9457f9bae0d34635d2879f178"
  1. 28 Feb, 2026 3 commits
    • QTom's avatar
      feat(admin): 完整实现管理员修改用户 API Key 分组的功能 · 9a91815b
      QTom authored
      ## 核心功能
      - 添加 AdminUpdateAPIKeyGroupID 服务方法,支持绑定/解绑/保持不变三态语义
      - 实现 UserRepository.AddGroupToAllowedGroups 接口,自动同步专属分组权限
      - 添加 HTTP PUT /api-keys/:id handler 端点,支持管理员直接修改 API Key 分组
      
      ## 事务一致性
      - 使用 ent Tx 保证专属分组绑定时「添加权限」和「更新 Key」的原子性
      - Repository 方法支持 clientFromContext,兼容事务内调用
      - 事务失败时自动回滚,避免权限孤立
      
      ## 业务逻辑
      - 订阅类型分组阻断,需通过订阅管理流程
      - 非活跃分组拒绝绑定
      - 负 ID 和非法 ID 验证
      - 自动授权响应,告知管理员成功授权的分组
      
      ## 代码质量
      - 16 个单元测试覆盖所有业务路径和边界用例
      - 7 个 handler 集成测试覆盖 HTTP 层
      - GroupRepo stub 返回克隆副本,防止测试间数据泄漏
      - API 类型安全修复(PaginatedResponse<ApiKey>)
      - 前端 ref 回调类型对齐 Vue 规范
      
      ## 国际化支持
      - 中英文提示信息完整
      - 自动授权成功/失败提示
      9a91815b
    • QTom's avatar
      feat(admin): 添加管理员直接修改用户 API Key 分组的功能 · 000e621e
      QTom authored
      - 新增 PUT /api/v1/admin/api-keys/:id 端点,允许管理员修改任意用户 API Key 的分组绑定
      - 跳过用户级权限校验但保留分组有效性验证,修改后触发认证缓存失效
      - Service 层支持三态语义:nil=不修改,0=解绑,>0=绑定,<0=拒绝
      - 指针值拷贝保证安全隔离,负数 groupID 返回 400 INVALID_GROUP_ID
      - 前端 UserApiKeysModal 新增可点击的分组选择下拉框,支持多 Key 并发更新
      - 下拉支持视口翻转和滚动关闭,按钮有 disabled 和加载状态
      - 覆盖:后端 20 个单元测试 (Service 11 + Handler 9) + 前端 16 个 E2E 测试
      - golangci-lint 0 issues, make test-unit 全部通过
      000e621e
    • yangjianbo's avatar
      feat(sync): full code sync from release · bb664d9b
      yangjianbo authored
      bb664d9b
  2. 24 Feb, 2026 1 commit
    • erio's avatar
      feat: add mixed-channel precheck API for account-group binding · aaac1aac
      erio authored
      Add a dedicated CheckMixedChannel endpoint that allows the frontend
      to pre-validate mixed channel risk before submitting create/update
      requests. This improves UX by showing warnings earlier in the flow
      instead of only after form submission.
      
      Backend changes:
      - Add CheckMixedChannelRequest struct and CheckMixedChannel handler
      - Register POST /check-mixed-channel route
      - Expose CheckMixedChannelRisk as public method on AdminService
      - Simplify Create/Update 409 responses (remove details/require_confirmation)
      - Add comprehensive handler tests and stub methods
      
      Frontend changes:
      - Add checkMixedChannelRisk API function and TypeScript types
      - Refactor CreateAccountModal to precheck before step transition and submission
      - Refactor EditAccountModal to precheck before update submission
      - Replace pendingPayload pattern with action-based dialog flow
      aaac1aac
  3. 19 Feb, 2026 2 commits
  4. 14 Feb, 2026 2 commits
    • yangjianbo's avatar
      feat(accounts): 自动刷新改为ETag增量同步并优化单账号更新体验 · 06b0f62e
      yangjianbo authored
      - 前端自动刷新改为 ETag/304 增量合并,减少全量重刷
      
      - 单账号更新后增加静默窗口,避免刚更新即被自动刷新覆盖
      
      - 列表筛选移除时改为待同步提示,不再立即触发全量补页
      
      - 后端账号列表支持 If-None-Match,命中返回 304
      
      - 单账号接口统一补充运行时容量字段并暴露 ETag 头
      06b0f62e
    • 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
  5. 12 Feb, 2026 2 commits
  6. 11 Feb, 2026 1 commit
    • 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
  7. 10 Feb, 2026 2 commits
  8. 09 Feb, 2026 3 commits
    • yangjianbo's avatar
      29ca1290
    • QTom's avatar
      feat(admin): 新增 CRS 同步预览和账号选择功能 · 5e0d7894
      QTom authored
      - 后端新增 PreviewFromCRS 接口,允许用户先预览 CRS 中的账号
      - 后端支持在同步时选择特定账号,不选中的账号将被跳过
      - 前端重构 SyncFromCrsModal 为三步向导:输入凭据 → 预览账号 → 执行同步
      - 改进表单无障碍性:添加 for/id 关联和 required 属性
      - 修复 Back 按钮返回时的状态清理
      - 新增 buildSelectedSet 和 shouldCreateAccount 的单元测试
      - 完整的向后兼容性:旧客户端不发送 selected_account_ids 时行为不变
      5e0d7894
    • 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
  9. 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): OpenAI OAuth 账号支持批量 RT 输入创建 · 8a0a8558
      shaw authored
      新增通过手动输入 Refresh Token 创建 OpenAI OAuth 账号功能,
      参考 Anthropic sessionKey 批量创建方式:
      
      - useOpenAIOAuth 添加 validateRefreshToken 方法
      - accounts.ts 添加 refreshOpenAIToken API
      - AuthInputMethod 类型新增 refresh_token 选项
      - 支持多行输入 RT(每行一个)批量创建账号
      - 账号名称自动累加后缀 #1, #2 等
      - UI 显示 RT 数量徽章和批量创建提示
      - 添加中英文 i18n 翻译
      8a0a8558
    • yangjianbo's avatar
      test: 完善自动化测试体系(7个模块,73个任务) · bb5a5dd6
      yangjianbo authored
      
      
      系统性地修复、补充和强化项目的自动化测试能力:
      
      1. 测试基础设施修复
         - 修复 stubConcurrencyCache 缺失方法和构造函数参数不匹配
         - 创建 testutil 共享包(stubs.go, fixtures.go, httptest.go)
         - 为所有 Stub 添加编译期接口断言
      
      2. 中间件测试补充
         - 新增 JWT 认证中间件测试(有效/过期/篡改/缺失 Token)
         - 补充 rate_limiter 和 recovery 中间件测试场景
      
      3. 网关核心路径测试
         - 新增账户选择、等待队列、流式响应、并发控制、计费、Claude Code 检测测试
         - 覆盖负载均衡、粘性会话、SSE 转发、槽位管理等关键逻辑
      
      4. 前端测试体系(11个新测试文件,163个测试用例)
         - Pinia stores: auth, app, subscriptions
         - API client: 请求拦截器、响应拦截器、401 刷新
         - Router guards: 认证重定向、管理员权限、简易模式限制
         - Composables: useForm, useTableLoader, useClipboard
         - Components: LoginForm, ApiKeyCreate, Dashboard
      
      5. CI/CD 流水线重构
         - 重构 backend-ci.yml 为统一的 ci.yml
         - 前后端 4 个并行 Job + Postgres/Redis services
         - Race 检测、覆盖率收集与门禁、Docker 构建验证
      
      6. E2E 自动化测试
         - e2e-test.sh 自动化脚本(Docker 启动→健康检查→测试→清理)
         - 用户注册→登录→API Key→网关调用完整链路测试
         - Mock 模式和 API Key 脱敏支持
      
      7. 修复预存问题
         - tlsfingerprint dialer_test.go 缺失 build tag 导致集成测试编译冲突
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      bb5a5dd6
  10. 07 Feb, 2026 2 commits
    • erio's avatar
      fix(antigravity): fetch default mapping from API and sync Redis on rate limit · 2656320d
      erio authored
      1. Frontend: replace hardcoded antigravityDefaultMappings with async
         fetch from GET /admin/accounts/antigravity/default-model-mapping,
         eliminating the duplicate data source that caused frontend/backend
         mapping inconsistency.
      
      2. Backend: convert handleSmartRetry and antigravityRetryLoop from
         standalone functions to AntigravityGatewayService methods, enabling
         Redis cache sync (updateAccountModelRateLimitInCache) after both
         rate-limit write paths — long-delay branch and retry-exhausted branch.
      2656320d
    • 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
  11. 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
  12. 03 Feb, 2026 3 commits
    • 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
    • liuxiongfeng's avatar
      feat(ops): 运维界面展示 Antigravity 账号 scope 级别限流统计 · 6e8eff9b
      liuxiongfeng authored
      在运维监控的并发/排队卡片中,为 Antigravity 平台账号显示各 scope
      (claude/gemini_text/gemini_image) 的限流数量统计,便于管理员了解
      哪些 scope 正在被限流。
      
      Cherry-picked from slovx2/sub2api: 08d6dc52
      6e8eff9b
    • shuike's avatar
      feat: 增加邀请码注册功能 · 6c86501d
      shuike authored
      6c86501d
  13. 02 Feb, 2026 4 commits
    • bayma888's avatar
      feat(admin): add user balance/concurrency history modal · 606e29d3
      bayma888 authored
      - Add new API endpoint GET /admin/users/:id/balance-history with pagination and type filter
      - Add SumPositiveBalanceByUser for calculating total recharged amount
      - Create UserBalanceHistoryModal component with:
        - User info header (email, username, created_at, current balance, notes, total recharged)
        - Type filter dropdown (all/balance/admin_balance/concurrency/admin_concurrency/subscription)
        - Quick deposit/withdraw buttons
        - Paginated history list with icons and colored values
      - Add instant tooltip on balance column for better UX
      - Add z-index prop to BaseDialog for modal stacking control
      - Update i18n translations (zh/en)
      606e29d3
    • song's avatar
      merge upstream main · 0170d19f
      song authored
      0170d19f
    • shaw's avatar
      fix(types): 添加缺失的 ignore_invalid_api_key_errors 类型定义 · 7b1d63a7
      shaw authored
      OpsAdvancedSettings 接口缺少 ignore_invalid_api_key_errors 字段,
      导致 TypeScript 编译报错。
      7b1d63a7
    • 小北's avatar
      feat: 向用户显示管理员调整余额的备注 · ae18397c
      小北 authored
      - 为RedeemCode DTO添加notes字段(仅用于admin_balance/admin_concurrency类型)
      - 更新mapper使其有条件地包含备注信息
      - 在用户兑换历史UI中显示备注
      - 备注以斜体显示,悬停时显示完整内容
      
      用户现在可以看到管理员调整其余额的原因说明。
      
      Changes:
      - backend/internal/handler/dto/types.go: RedeemCode添加notes字段
      - backend/internal/handler/dto/mappers.go: 条件性填充notes
      - frontend/src/api/redeem.ts: TypeScript接口添加notes
      - frontend/src/views/user/RedeemView.vue: UI显示备注信息
      ae18397c
  14. 01 Feb, 2026 1 commit
    • yangjianbo's avatar
      feat(Sora): 直连生成并移除sora2api依赖 · 399dd78b
      yangjianbo authored
      实现直连 Sora 客户端、媒体落地与清理策略\n更新网关与前端配置以支持 Sora 平台\n补齐单元测试与契约测试,新增 curl 测试脚本\n\n测试: go test ./... -tags=unit
      399dd78b
  15. 31 Jan, 2026 1 commit
  16. 30 Jan, 2026 2 commits
  17. 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
  18. 28 Jan, 2026 1 commit