1. 01 Mar, 2026 2 commits
    • erio's avatar
      fix: bulk edit mixed channel warning not showing confirmation dialog · 947800b9
      erio authored
      The response interceptor in client.ts transforms errors into plain
      objects {status, code, message}, but catch blocks were checking
      error.response?.status (AxiosError format) which never matched.
      
      - Add error field passthrough in client.ts interceptor
      - Refactor BulkEditAccountModal to use pre-check API (checkMixedChannelRisk)
        before submit, matching the single edit flow
      - Fix EditAccountModal catch blocks to use interceptor error format
      - Add bulk-update mixed channel unit tests
      947800b9
    • erio's avatar
      feat: bulk update accounts pre-check mixed channel risk with confirm dialog · 7aa4c083
      erio authored
      - Move mixed channel check before any DB writes in BulkUpdateAccounts
      - Return 409 from BulkUpdate handler for MixedChannelError
      - Add ConfirmDialog to BulkEditAccountModal for mixed channel warning
      - Update mixed channel warning message to Chinese
      7aa4c083
  2. 28 Feb, 2026 10 commits
    • shaw's avatar
      fix: 将 README 中 Codex WS 配置迁移至使用密钥弹窗 · f7fa71bc
      shaw authored
      - 移除 README.md / README_CN.md 中的 Codex CLI WebSocket v2 配置示例
      - UseKeyModal OpenAI 分组新增 "Codex CLI (WebSocket)" tab,区分普通模式与 WS 模式
      - 普通模式 config.toml 不含 WebSocket 字段,WS 模式包含 supports_websockets 和 features 配置
      - 所有配置统一使用 sub2api 作为 model_provider 名称
      f7fa71bc
    • QTom's avatar
      fix: address deep code review issues for RPM limiting · e63c8395
      QTom authored
      - Move IncrementRPM after Forward success to prevent phantom RPM
        consumption during account switch retries
      - Add base_rpm input sanitization (clamp to 0-10000) in Create/Update
      - Add WindowCost scheduling checks to legacy path sticky sessions
        (4 check sites + 4 prefetch sites), fixing pre-existing gap
      - Clean up rpm_strategy/rpm_sticky_buffer when disabling RPM in
        BulkEditModal (JSONB merge cannot delete keys, use empty values)
      - Add json.Number test cases to TestGetBaseRPM/TestGetRPMStickyBuffer
      - Document TOCTOU race as accepted soft-limit design trade-off
      e63c8395
    • QTom's avatar
      fix: add enableRpmLimit to hasAnyFieldEnabled check in BulkEditModal · 4b72aa33
      QTom authored
      Without this, submitting a bulk edit with only RPM changes would be
      rejected as "no fields selected".
      4b72aa33
    • QTom's avatar
      fix: address code review issues for RPM limiting feature · 60723757
      QTom authored
      - Use TxPipeline (MULTI/EXEC) instead of Pipeline for atomic INCR+EXPIRE
      - Filter negative values in GetBaseRPM(), update test expectation
      - Add RPM batch query (GetRPMBatch) to account List API
      - Add warn logs for RPM increment failures in gateway handler
      - Reset enableRpmLimit on BulkEditAccountModal close
      - Use union type 'tiered' | 'sticky_exempt' for rpmStrategy refs
      - Add design decision comments for rdb.Time() RTT trade-off
      60723757
    • QTom's avatar
      feat: add RPM display to AccountCapacityCell · 28ca7df2
      QTom authored
      28ca7df2
    • QTom's avatar
      feat: add RPM config to CreateAccountModal · 856c9553
      QTom authored
      856c9553
    • QTom's avatar
      feat: add RPM config to EditAccountModal · e1c9016d
      QTom authored
      e1c9016d
    • 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
  3. 27 Feb, 2026 3 commits
  4. 26 Feb, 2026 4 commits
  5. 25 Feb, 2026 4 commits
  6. 24 Feb, 2026 7 commits
    • erio's avatar
      feat: optimize model rate limit indicator layout with short aliases · a3ff317f
      erio authored
      - Change layout from fixed 3-column grid to vertical-first responsive
        columns (1 col for ≤4 items, 2 cols for ≤8, 3 cols for 9+)
      - Add short aliases for all known model scope keys (e.g. COpus46, CSon46,
        G3PH, G3F) to reduce badge width
      - Display countdown timer directly on each badge (supports h/m/s)
      - Retain legacy scope aliases for backward compatibility
      a3ff317f
    • erio's avatar
      fix: enable Gemini model_mapping UI and extend warmup to Antigravity · d8d4b0c0
      erio authored
      - Remove Gemini platform exclusion from model restriction UI in
        Create/Edit account modals (Gemini now supports model_mapping)
      - Remove outdated Gemini model passthrough info cards
      - Add model_mapping field to GeminiCredentials type
      - Extend warmup request interception toggle to Antigravity platform
      - Remove redundant try/catch in API key account creation
      - Remove noisy gateway.request_completed debug log
      - Reorganize Gemini model mapping sections in constants.go
      d8d4b0c0
    • cagedbird043's avatar
      076c0006
    • erio's avatar
      fix(frontend): add Gemini models to bulk edit and fix status grid layout · fb3ef5f3
      erio authored
      Add Gemini model presets to BulkEditAccountModal for bulk model mapping.
      Fix AccountStatusIndicator model rate limit grid layout using proper
      grid container.
      fb3ef5f3
    • 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
    • erio's avatar
      fix: fix intercept_warmup_requests config not being saved · 59898c16
      erio authored
      Extract applyInterceptWarmup utility to unify all credential building
      call sites:
      - Fix upstream account creation missing intercept_warmup_requests write
      - Fix apikey edit mode missing else-branch to clear the setting
      - Add backend unit test for IsInterceptWarmupEnabled
      - Add frontend unit test for credentialsBuilder
      59898c16
    • erio's avatar
      fix: update Claude usage window to support 4.6 models · fdf9f682
      erio authored
      The usage progress bar only matched claude-sonnet-4-5 and
      claude-opus-4-5-thinking. After upgrading to 4.6, the backend returns
      claude-sonnet-4-6/claude-opus-4-6-thinking which didn't match,
      causing the Claude usage bar to not display.
      
      - Add claude-sonnet-4-6 and claude-opus-4-6-thinking to the match list
      - Rename label from "C4.5" to "Claude" for future-proofing
      fdf9f682
  7. 23 Feb, 2026 1 commit
  8. 22 Feb, 2026 1 commit
    • yangjianbo's avatar
      fix(codex): 修复额度窗口过期展示并补齐高覆盖测试 · 10636d8a
      yangjianbo authored
      - 后端新增绝对重置时间字段计算(codex_5h_reset_at/codex_7d_reset_at)
      
      - 前端统一窗口解析逻辑:绝对时间优先,updated_at+seconds 回退,过期自动归零
      
      - 新增后端与前端单元测试,覆盖关键边界与异常场景
      10636d8a
  9. 21 Feb, 2026 2 commits
  10. 19 Feb, 2026 2 commits
  11. 18 Feb, 2026 1 commit
  12. 17 Feb, 2026 1 commit
  13. 14 Feb, 2026 2 commits
    • 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
    • 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