- 05 Mar, 2026 5 commits
-
-
shaw authored
-
shaw authored
-
shaw authored
-
Wesley Liddick authored
fix: add dark theme support for "open in new tab" FAB button
-
Wesley Liddick authored
fix: extend RewriteUserID regex to match user_id containing account_uuid
-
- 04 Mar, 2026 23 commits
-
-
litianc authored
The existing regex only matched the old format where account_uuid is empty (account__session_). Real Claude Code clients and newer sub2api generated user_ids use account_{uuid}_session_ which was silently skipped, causing the original metadata.user_id to leak to upstream when User-Agent is rewritten by an intermediate gateway. Closes #766 Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
erio authored
The backdrop-blur background on the iframe "open in new tab" floating button was hardcoded to bg-white/80, making it look broken in dark theme. Added dark:bg-dark-800/80 variant for both PurchaseSubscription and CustomPage views.
-
Wesley Liddick authored
feat: 修复 v0.1.89 OAuth 401 永久锁死账号问题,改用临时不可调度实现自动恢复;增强二次 401 自动升级为错误状态,添加 DB 回退确保生效;管理后台新增临时不可调度状态筛选
-
-
kyx236 authored
账号首次 401 仅临时不可调度,给予 token 刷新窗口;若恢复后再次 401 说明凭证确实失效,直接升级为错误状态以避免反复无效调度。 - 缓存中 reason 为空时从 DB 回退读取,防止升级判断失效 - ClearError 同时清除临时不可调度状态,管理员恢复后重新给予一次机会 - 管理后台账号列表添加"临时不可调度"状态筛选 - 补充 DB 回退场景单元测试
-
shaw authored
-
shaw authored
-
shaw authored
-
Wesley Liddick authored
feat(registration): add email domain whitelist policy
-
shaw authored
- 删除 account_today_stats_cache.go 中重复的 normalizeAccountIDList,统一使用 id_list_utils.go 的 normalizeInt64IDList - 新增 snapshot_cache_test.go:覆盖 snapshotCache、buildETagFromAny、parseBoolQueryWithDefault - 新增 id_list_utils_test.go:覆盖 normalizeInt64IDList、buildAccountTodayStatsBatchCacheKey - 新增 ops_query_mode_test.go:覆盖 shouldFallbackOpsPreagg、cloneOpsFilterWithMode
-
Wesley Liddick authored
perf(admin): 优化后台大数据场景加载性能(仪表盘/用户/账号/Ops)
-
Wesley Liddick authored
perf(admin-usage): 优化 usage 大表分页,默认避免全量 COUNT(*)
-
PMExtra authored
-
xvhuan authored
-
PMExtra authored
-
xvhuan authored
-
xvhuan authored
-
shaw authored
-
shaw authored
-
shaw authored
-
shaw authored
-
shaw authored
-
Wesley Liddick authored
fix(frontend): show real upstream payload in ops error detail modal
-
- 03 Mar, 2026 12 commits
-
-
zqq61 authored
-
Wesley Liddick authored
feat(gateway): 系统设置控制未分组 Key 调度 — Handler 层中间件拦截
-
Wesley Liddick authored
fix(ops): 默认忽略 count_tokens 404 错误
-
shaw authored
- quota_limited 模式:返回 Key 级别的总额度、速率限制窗口用量和过期时间 - unrestricted 模式:返回订阅限额或钱包余额信息(向后兼容) - 新增 model_stats 字段,支持 start_date/end_date 参数查询按模型用量统计 - 提取 buildUsageData/parseUsageDateRange 等辅助方法,减少主函数复杂度 - 新增 APIKeyService.GetRateLimitData 和 UsageService.GetAPIKeyModelStats
-
shaw authored
将中间件职责拆分为鉴权(Authentication)和计费执行(Billing Enforcement)两层: - 鉴权层(disabled/IP/用户状态)始终执行 - 计费层(过期/配额/订阅/余额)用单一 skipBilling 守卫整块控制 /v1/usage 端点只需鉴权不需计费,skipBilling 仅出现 2 处(订阅加载错误处理 + 计费块守卫), 取代了之前 isUsageQuery 散布在 7 个 if 分支中的控制流。
-
QTom authored
新增系统设置 allow_ungrouped_key_scheduling(默认关闭), 未分组的 API Key 在网关请求时直接返回 403, 由 RequireGroupAssignment 中间件统一拦截, 支持 Anthropic / Google 两种错误格式响应。 全栈实现:常量 → 结构体 → 解析/更新/初始化 → DTO → 管理接口 → 中间件 → 路由注册 → 前端设置界面 + i18n。
-
alfadb authored
Remove extra space before inline comment to pass golangci-lint gofmt check. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
alfadb authored
将 IgnoreCountTokensErrors 默认值从 false 改为 true。 count_tokens 返回 404 是预期业务行为(上游不支持 endpoint, 客户端应 fallback 到本地 tokenizer 估算),不应被视为错误。 Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
shaw authored
- wire_gen_test.go: 补充 NewTokenRefreshService 缺失的 tempUnschedCache 参数 - config.go, token_refresh_service.go: 修复 gofmt 格式问题
-
Wesley Liddick authored
fix: OAuth 401 不再永久锁死账号,改用临时不可调度实现自动恢复
-
shaw authored
PR #682 (release → main 全量同步) 将 Antigravity 和 Gemini CLI 的 OAuth client_secret 硬编码值替换为了 "GOCSPX-your-client-secret" 占位符, 导致未配置环境变量的部署环境中 token 刷新失败。 恢复内容: - antigravity/oauth.go: 恢复真实 client_secret - antigravity/oauth_test.go: 恢复测试断言中的真实值 - geminicli/constants.go: 恢复真实 client_secret
-
shaw authored
- Fix fileChecksum for 061 migration: use TrimSpace hash (66207e7a) instead of raw sha256sum (97bdd9a3), matching the actual runtime computation - Add 222b4a09 as accepted DB checksum for 061 migration - Add missing GetAPIKeyRateLimit/SetAPIKeyRateLimit/UpdateAPIKeyRateLimitUsage/ InvalidateAPIKeyRateLimit methods to mock BillingCache in test stubs - Fix NewBillingCacheService call in singleflight test (add apiKeyRepo param)
-