- 08 Apr, 2026 1 commit
-
- 05 Apr, 2026 2 commits
- 03 Apr, 2026 1 commit
-
-
为 OpenAI/Antigravity/Anthropic/Gemini 分组新增两个布尔控制字段: - require_oauth_only: 创建/更新账号绑定分组时拒绝 apikey 类型加入 - require_privacy_set: 调度选号时跳过 privacy 未成功设置的账号并标记 error 后端:Ent schema 新增字段 + 迁移、Group CRUD 全链路透传、 gateway_service 与 openai_account_scheduler 两套调度路径过滤 前端:创建/编辑表单 toggle 开关(OpenAI/Antigravity/Anthropic/Gemini 平台可见) Co-Authored-By:Claude Opus 4.6 (1M context) <noreply@anthropic.com>
-
- 31 Mar, 2026 1 commit
-
-
QTom authored
为 OpenAI/Antigravity/Anthropic/Gemini 分组新增两个布尔控制字段: - require_oauth_only: 创建/更新账号绑定分组时拒绝 apikey 类型加入 - require_privacy_set: 调度选号时跳过 privacy 未成功设置的账号并标记 error 后端:Ent schema 新增字段 + 迁移、Group CRUD 全链路透传、 gateway_service 与 openai_account_scheduler 两套调度路径过滤 前端:创建/编辑表单 toggle 开关(OpenAI/Antigravity/Anthropic/Gemini 平台可见) Co-Authored-By:Claude Opus 4.6 (1M context) <noreply@anthropic.com>
-
- 26 Mar, 2026 1 commit
-
-
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 存储方式
-
- 24 Mar, 2026 1 commit
-
-
shaw authored
-
- 23 Mar, 2026 1 commit
-
-
weak-fox authored
-
- 20 Mar, 2026 1 commit
-
-
shaw authored
-
- 19 Mar, 2026 1 commit
-
-
QTom authored
- 新增分组列:展示用户的专属/公开分组,支持 hover 查看详情 - 新增分组筛选:下拉选择或模糊搜索分组名过滤用户 - 专属分组替换:点击专属分组弹出操作菜单,选择目标分组后 自动授予新分组权限、迁移绑定的 Key、移除旧分组权限 - 后端新增 POST /admin/users/:id/replace-group 端点,事务内 完成分组替换并失效认证缓存
-
- 18 Mar, 2026 2 commits
-
-
QTom authored
复用 GroupCapacityService,在 admin 分组列表中添加容量列, 显示每个分组的实时并发/会话/RPM 使用量和上限。 Co-Authored-By:Claude Opus 4.6 (1M context) <noreply@anthropic.com>
-
Gemini Wen authored
Co-Authored-By:Claude Opus 4.6 (1M context) <noreply@anthropic.com>
-
- 16 Mar, 2026 1 commit
-
-
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.
-
- 15 Mar, 2026 2 commits
-
-
shaw authored
-
Ethan0x0000 authored
-
- 12 Mar, 2026 2 commits
- 11 Mar, 2026 1 commit
-
-
John Doe authored
Add a system-wide "Backend Mode" that disables user self-registration and self-service while keeping admin panel and API gateway fully functional. When enabled, only admin can log in; all user-facing routes return 403. Backend: - New setting key `backend_mode_enabled` with atomic cached reads (60s TTL) - BackendModeUserGuard middleware blocks non-admin authenticated routes - BackendModeAuthGuard middleware blocks registration/password-reset auth routes - Login/Login2FA/RefreshToken handlers reject non-admin when enabled - TokenPairWithUser struct for role-aware token refresh - 20 unit tests (middleware + service layer) Frontend: - Router guards redirect unauthenticated users to /login - Admin toggle in Settings page - Login page hides register link and footer in backend mode - 9 unit tests for router guard logic - i18n support (en/zh) 27 files changed, 833 insertions(+), 17 deletions(-) Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 09 Mar, 2026 2 commits
-
-
ischanx authored
之前管理员无法通过 API 密钥管理将用户绑定到订阅类型分组(直接返回错误)。 现在改为检查用户是否持有该分组的有效订阅,有则允许绑定,无则拒绝。 - admin_service: 新增 userSubRepo 依赖,替换硬拒绝为订阅校验 - admin_service: 区分 ErrSubscriptionNotFound 和内部错误,避免 DB 故障被误报 - wire_gen/api_contract_test: 同步新增参数 - UserApiKeysModal: 管理员分组下拉不再过滤订阅类型分组 Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
yangjianbo authored
- 打通 service_tier 在 OpenAI HTTP、WS、passthrough 与 usage 记录中的传递 - 修正 priority/flex 计费逻辑,并将 fast 归一化为 priority - 在用户端和管理端补齐服务档位与计费明细展示 - 补齐前后端测试,并修复 WS 限流信号重复持久化导致的全量回归失败 Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 07 Mar, 2026 4 commits
-
-
shaw authored
-
神乐 authored
-
神乐 authored
-
erio authored
The recent upstream commit added allow_messages_dispatch to the Group DTO but did not update the API contract test expectation. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 05 Mar, 2026 2 commits
- 04 Mar, 2026 2 commits
- 03 Mar, 2026 3 commits
-
-
QTom authored
新增系统设置 allow_ungrouped_key_scheduling(默认关闭), 未分组的 API Key 在网关请求时直接返回 403, 由 RequireGroupAssignment 中间件统一拦截, 支持 Anthropic / Google 两种错误格式响应。 全栈实现:常量 → 结构体 → 解析/更新/初始化 → DTO → 管理接口 → 中间件 → 路由注册 → 前端设置界面 + i18n。
-
shaw authored
- Fix errcheck: properly handle rows.Close() error via named return + defer closure - Fix gofmt: auto-format billing_cache.go, api_key_service.go, billing_cache_service.go - Add missing rate limit interface methods to 4 test stubs (GetRateLimitData, IncrementRateLimitUsage, ResetRateLimitWindows) - Fix NewBillingCacheService calls missing the new apiKeyRepo parameter
-
QTom authored
当 API Key 无分组时,调度仅从未分组账号池中选取。 修复 isAccountInGroup 在 groupID==nil 时的逻辑, 同时补全 scheduler_snapshot_service 和 gemini_compat_service 中的 SimpleMode 保护,确保分组隔离在所有调度路径生效。 新增 ListSchedulableUngroupedByPlatform/s 方法, 使用 Ent 的 Not(HasAccountGroups()) 谓词实现未分组账号隔离。 新增 17 个单元和端到端隔离测试,覆盖所有分支和边界条件。
-
- 02 Mar, 2026 1 commit
-
-
erio authored
- Add admin menu permission check in CustomPageView (visibility + role) - Sanitize SVG content with DOMPurify before v-html rendering (XSS prevention) - Decouple router.go from dto package using anonymous struct - Consolidate duplicate parseCustomMenuItems into dto.ParseCustomMenuItems - Enhance menu item validation (count, length, ID uniqueness limits) - Add audit logging for purchase_subscription and custom_menu_items changes - Update API contract test to include custom_menu_items field Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 01 Mar, 2026 3 commits
-
-
PMExtra authored
- add default subscriptions to admin settings - auto-assign subscriptions on register and admin user creation - add validation/tests and align settings UI with subscription selector patterns
-
erio authored
Add a doughnut chart showing usage statistics broken down by group on the admin usage records page. The chart appears alongside the existing model distribution chart (2-column grid), with the token usage trend chart moved to a separate full-width row below. Changes: - backend/pkg/usagestats: add GroupStat type - backend/service: add GetGroupStatsWithFilters interface method and implementation - backend/repository: implement GetGroupStatsWithFilters with LEFT JOIN groups - backend/handler: add GetGroupStats handler with full filter support - backend/routes: register GET /admin/dashboard/groups route - backend/tests: add GetGroupStatsWithFilters stubs to contract/sora tests - frontend/types: add GroupStat interface - frontend/api: add getGroupStats API function and types - frontend/components: add GroupDistributionChart.vue doughnut chart - frontend/views: update UsageView layout and load group stats in parallel - frontend/i18n: add groupDistribution, group, noGroup keys (zh + en)
-
QTom authored
- 修复 errcheck: singleflight 返回值类型断言添加 ok 检查 - 修复 gofmt: 格式化 setting_service.go 和 claude_code_validator_test.go - 修复 TestAPIContracts: 在 GET /admin/settings 期望中添加 min_claude_code_version 字段
-
- 28 Feb, 2026 3 commits
-
-
QTom authored
Add missing nil argument for rpmCache to NewAccountHandler (5 sites) and NewGatewayService (2 sites) after RPM feature expanded their signatures.
-
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 规范 ## 国际化支持 - 中英文提示信息完整 - 自动授权成功/失败提示
-
yangjianbo authored
-
- 22 Feb, 2026 1 commit
-
-
yangjianbo authored
-
- 17 Feb, 2026 1 commit
-
-
John Doe authored
- Account-level cache TTL override: rewrite Anthropic cache_creation token classification (5m
↔ 1h) in streaming/non-streaming responses - New DB field cache_ttl_overridden in usage_log for billing tracking - Migration 055_add_cache_ttl_overridden - Frontend: CacheTTL override toggle in account create/edit modals - Ent schema regenerated for new usage_log fields Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-