shaw
cab60ef735
fix(ci): downgrade golangci-lint v2.11 to v2.9 to fix lint timeout
...
v2.10.1 introduced a recursive markDepsForAnalyzingSource change that
causes all transitive dependencies (including 132K lines of ent
generated code) to be analyzed from source instead of compiled export
data, leading to >30 min CI timeout.
v2.9.0 is the first version with Go 1.26 support (PR #6271 , merged
Feb 10 2026) and does not have this performance regression.
2026-03-07 23:10:03 +08:00
shaw
a3791104f9
feat: 支持后台设置是否启用整流开关
2026-03-07 21:55:38 +08:00
shaw
bcb6444f89
fix(ci): update Go version check in release workflow to 1.26.1
2026-03-07 17:11:50 +08:00
Wesley Liddick and GitHub
c2b14693b4
Merge pull request #835 from biubiutata/codex/fix-openai-originator-detection
...
fix(openai): 统一官方 Codex 客户端识别逻辑
2026-03-07 17:03:52 +08:00
shaw
92d35409de
feat: 为openai分组增加messages调度开关和默认映射模型
2026-03-07 17:02:19 +08:00
shaw
351a08f813
fix: announcement强制弹窗通知补全迁移sql
2026-03-07 15:36:18 +08:00
shaw
a58dc787a9
fix(ci): 精简golangci-lint配置解决v2.11超时问题
...
- 移除staticcheck 470+冗余检查项,all已包含全部
- unused: generated-is-used改为true,跳过ent 13万行生成代码分析
- unused: exported-fields-are-used改为true,避免全项目导出字段引用追踪
- unused: field-writes-are-uses改为true
2026-03-07 15:17:16 +08:00
shaw
7079edc2d0
feat: announcement支持强制弹窗通知
2026-03-07 15:06:13 +08:00
shaw
a42a1f08e9
fix: 编辑error状态账号时保存报Status验证失败
...
后端UpdateAccountRequest.Status的oneof验证缺少error状态,
前端编辑表单也未处理error状态,导致编辑异常账号时无法保存
2026-03-07 13:47:08 +08:00
shaw
ebd5253e22
fix: /response端点移除强制注入大量instructions内容
2026-03-07 13:39:47 +08:00
shaw
6411645ffc
fix: 适配claude code调度openai账号的websearch功能
2026-03-07 11:33:08 +08:00
shaw
c0c322ba16
chore: openai账号模型映射新增claude->gpt快捷映射按钮
2026-03-07 10:26:30 +08:00
shaw
d35c5cd491
feat: openai平台的apikey新增claude code使用教程
2026-03-07 10:14:57 +08:00
shaw
7a353028e7
fix: 修复keys速率限制未自动重置额度的bug
2026-03-07 10:13:51 +08:00
shaw
2d8d3b7857
fix(ci): upgrade golangci-lint v2.7 to v2.11 for Go 1.26 compatibility
...
golangci-lint v2.7 was built with Go 1.25 and cannot lint Go 1.26
targets. v2.8+ added Go 1.26 support.
2026-03-07 08:54:05 +08:00
Wesley Liddick and GitHub
4190293b07
Merge pull request #823 from StarryKira/fix/empty-stream-failover
...
Fix/empty streamfix issue #791
2026-03-07 08:51:07 +08:00
Wesley Liddick and GitHub
421b4c0aff
Merge pull request #830 from ckken/pr/ccswitch-import-improvements
...
fix(ccswitch): improve import provider name and usage parsing
2026-03-07 08:49:09 +08:00
Wesley Liddick and GitHub
cd69a7cb85
Merge pull request #820 from geminiwen/fix/apikey-credentials-preserve-existing-fields
...
fix(account): preserve existing credentials when saving apikey accounts
2026-03-07 08:46:51 +08:00
shaw
0c9ba9e86c
fix(security): upgrade Go 1.25.7 to 1.26.1 to resolve 4 stdlib vulnerabilities
...
GO-2026-4602 (os), GO-2026-4601 (net/url), GO-2026-4600 and
GO-2026-4599 (crypto/x509). The crypto/x509 fixes are only
available in go1.26.1+, not backported to go1.25.x.
2026-03-07 08:45:55 +08:00
shaw
1b4d2a41c9
fix(openai): /v1/messages端点补齐Codex用量快照提取与错误透传规则
...
对齐/v1/responses的Forward方法,修复两处不一致:
- 成功响应时从响应头提取OAuth账号的Codex使用量数据
- 非failover错误场景下应用管理员配置的错误透传规则
2026-03-07 08:40:07 +08:00
Wesley Liddick and GitHub
0787d2b47a
Merge pull request #829 from JIA-ss/fix/usage-query-rate-limit
...
fix(usage): 修复用量查询 429 重试风暴,增加负缓存、请求去重与随机延迟
2026-03-07 08:32:29 +08:00
Wesley Liddick and GitHub
963b3b768c
Merge pull request #825 from FizzlyCode/fix/setup-token-real-utilization
...
fix: Setup Token 账号使用真实 utilization 值替代状态估算
2026-03-06 22:46:20 +08:00
Wesley Liddick and GitHub
f6709fb5d6
Merge pull request #824 from pkssssss/fix/ws-usage-window-pr
...
fix(openai): 修复 WS 模式下用量窗口不显示
2026-03-06 22:45:36 +08:00
shaw
921599948b
feat: /v1/messages端点适配codex账号池
2026-03-06 22:44:07 +08:00
Wesley Liddick and GitHub
afbe8bf001
Merge pull request #809 from alfadb/feature/openai-messages
...
feat(openai): 添加 /v1/messages 端点和 API 兼容层
2026-03-06 20:16:06 +08:00
Wesley Liddick and GitHub
2a3ef0be06
Merge pull request #818 from pkssssss/fix/remote-compact
...
fix(openai): support remote compact task
2026-03-06 19:41:04 +08:00
Wesley Liddick and GitHub
005d0c5f53
Merge pull request #815 from mt21625457/pr/openai-user-group-rate-upstream
...
fix(openai): 统一专属倍率计费链路并补齐回归测试
2026-03-06 17:33:09 +08:00
Wesley Liddick and GitHub
8aaaeb29cc
Merge pull request #813 from FizzlyCode/fix/account-usage-display
...
fix: 修复账号列表五小时用量显示为 $0.00 的问题
2026-03-06 17:25:03 +08:00
Wesley Liddick and GitHub
cac230206d
Merge pull request #806 from touwaeriol/fix/openai-passthrough-model-check
...
fix(openai): passthrough accounts bypass model mapping check
2026-03-06 14:09:07 +08:00
shaw
0cce0a8877
chore: gpt-5.4示例配置修改model_reasoning_effort为xhigh
2026-03-06 11:29:43 +08:00
shaw
225fd035ae
chore: 更新codex配置部分支持gpt-5.4的长上下文
2026-03-06 10:55:09 +08:00
Wesley Liddick and GitHub
fb7d1346b5
Merge pull request #800 from mt21625457/pr/gpt54-support-upstream
...
feat(openai): 增加 GPT-5.4 支持并修复长上下文计费与白名单回归
2026-03-06 10:42:01 +08:00
shaw
491a744481
fix: 修复账号列表首次加载窗口费用显示 $0.00
...
lite 模式下从快照缓存读取窗口费用,非 lite 模式查询后写入缓存
2026-03-06 10:23:22 +08:00
Wesley Liddick and GitHub
63a8c76946
Merge pull request #798 from touwaeriol/feature/account-load-factor
...
feat: add account load_factor for scheduling load calculation
2026-03-06 09:42:10 +08:00
Wesley Liddick and GitHub
f355a68bc9
Merge pull request #796 from touwaeriol/feature/apikey-quota-limit
...
feat: add configurable spending limit for API Key accounts
2026-03-06 09:37:52 +08:00
Wesley Liddick and GitHub
ae5d9c8bfc
Merge pull request #788 from touwaeriol/fix/usage-error-passthrough
...
fix: pass through upstream HTTP status in usage API errors
2026-03-05 22:05:36 +08:00
shaw
bab4bb9904
chore: 更新openai、claude使用秘钥教程部分
2026-03-05 18:58:10 +08:00
shaw
33bae6f49b
fix: Cache Token拆分为缓存创建和缓存读取
2026-03-05 18:32:17 +08:00
Wesley Liddick and GitHub
32d619a56b
Merge pull request #780 from mt21625457/feat/codex-remote-compact-outcome-logging
...
feat(openai-handler): support codex remote compact outcome logging
2026-03-05 16:59:02 +08:00
Wesley Liddick and GitHub
642432cf2a
Merge pull request #777 from guoyongchang/feature-schedule-test-support
...
feat: 支持基于 crontab 的定时账号测试
2026-03-05 16:57:23 +08:00
shaw
9d70c38504
fix: 修复claude apikey账号请求时未携带beta=true 查询参数的bug
2026-03-05 15:01:04 +08:00
shaw
aeb464f3ca
feat: 模型映射应用 /v1/messages/count_tokens端点
2026-03-05 14:49:28 +08:00
Wesley Liddick and GitHub
7076717b20
Merge pull request #772 from mt21625457/aicodex2api-main
...
feat(openai-ws): 合并 WS v2 透传模式与前端 ws mode
2026-03-05 13:46:02 +08:00
shaw
33988637b5
fix: SMTP测试连接和发送测试邮件返回具体错误信息而非internal error
2026-03-05 10:54:41 +08:00
shaw
d4f6ad7225
feat: 新增apikey的usage查询页面
2026-03-05 10:45:51 +08:00
shaw
078fefed03
fix: 修复账号管理页面容量列显示为0的bug
2026-03-05 09:48:00 +08:00
Wesley Liddick and GitHub
5b10af85b4
Merge pull request #762 from touwaeriol/fix/dark-theme-open-in-new-tab
...
fix: add dark theme support for "open in new tab" FAB button
2026-03-05 08:56:28 +08:00
Wesley Liddick and GitHub
4caf95e5dd
Merge pull request #767 from litianc/fix/rewrite-userid-regex-match-account-uuid
...
fix: extend RewriteUserID regex to match user_id containing account_uuid
2026-03-05 08:56:03 +08:00
Wesley Liddick and GitHub
adcfb44cb7
Merge pull request #761 from james-6-23/main
...
feat: 修复 v0.1.89 OAuth 401 永久锁死账号问题,改用临时不可调度实现自动恢复;增强二次 401 自动升级为错误状态,添加 DB 回退确保生效;管理后台新增临时不可调度状态筛选
2026-03-04 21:11:24 +08:00
shaw
742e73c9c2
fix: 优化充值/订阅菜单的icon
2026-03-04 17:24:09 +08:00
shaw
f8de2bdedc
fix(frontend): settings页面分tab拆分
2026-03-04 16:59:57 +08:00
shaw
59879b7fa7
fix(i18n): replace hardcoded English strings in EmailVerifyView with i18n calls
2026-03-04 15:58:44 +08:00
Wesley Liddick and GitHub
27abae21b8
Merge pull request #724 from PMExtra/feat/registration-email-domain-whitelist
...
feat(registration): add email domain whitelist policy
2026-03-04 15:51:51 +08:00
shaw
0819c8a51a
refactor: 消除重复的 normalizeAccountIDList,补充 PR#754 新增组件的单元测试
...
- 删除 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
2026-03-04 15:22:46 +08:00
Wesley Liddick and GitHub
9dcd3cd491
Merge pull request #754 from xvhuan/perf/admin-core-large-dataset
...
perf(admin): 优化后台大数据场景加载性能(仪表盘/用户/账号/Ops)
2026-03-04 15:15:13 +08:00
Wesley Liddick and GitHub
49767cccd2
Merge pull request #755 from xvhuan/perf/admin-usage-fast-pagination-main
...
perf(admin-usage): 优化 usage 大表分页,默认避免全量 COUNT(*)
2026-03-04 14:15:57 +08:00
shaw
ba6de4c4d4
feat: /keys页面支持表单筛选
2026-03-04 11:29:31 +08:00
shaw
46ea9170cb
fix: 修复自定义菜单页面管理员视角菜单不生效问题
2026-03-04 10:44:28 +08:00
shaw
7d318aeefa
fix: 恢复check_pnpm_audit_exceptions.py
2026-03-04 10:20:19 +08:00
shaw
0aa3cf677a
chore: 清理一些无用的文件
2026-03-04 10:15:42 +08:00
shaw
72961c5858
fix: Anthropic 平台无限流重置时间的 429 不再误标记账号限流
2026-03-04 09:36:24 +08:00
Wesley Liddick and GitHub
a05711a37a
Merge pull request #742 from zqq-nuli/fix/ops-error-detail-upstream-payload
...
fix(frontend): show real upstream payload in ops error detail modal
2026-03-04 09:04:11 +08:00
Wesley Liddick and GitHub
a11ac188c2
Merge pull request #738 from DaydreamCoding/feat/ungrouped-key-setting
...
feat(gateway): 系统设置控制未分组 Key 调度 — Handler 层中间件拦截
2026-03-03 21:03:31 +08:00
Wesley Liddick and GitHub
60350d298a
Merge pull request #735 from alfadb/fix/count-tokens-default-ignore
...
fix(ops): 默认忽略 count_tokens 404 错误
2026-03-03 21:02:46 +08:00
shaw
838dad8759
feat: 重构 /v1/usage 端点,支持 quota_limited 和 unrestricted 双模式
...
- quota_limited 模式:返回 Key 级别的总额度、速率限制窗口用量和过期时间
- unrestricted 模式:返回订阅限额或钱包余额信息(向后兼容)
- 新增 model_stats 字段,支持 start_date/end_date 参数查询按模型用量统计
- 提取 buildUsageData/parseUsageDateRange 等辅助方法,减少主函数复杂度
- 新增 APIKeyService.GetRateLimitData 和 UsageService.GetAPIKeyModelStats
2026-03-03 20:59:12 +08:00
shaw
a728dfe0c6
refactor: 重构 api_key_auth 中间件,用 skipBilling 替代 7 处散落的 isUsageQuery
...
将中间件职责拆分为鉴权(Authentication)和计费执行(Billing Enforcement)两层:
- 鉴权层(disabled/IP/用户状态)始终执行
- 计费层(过期/配额/订阅/余额)用单一 skipBilling 守卫整块控制
/v1/usage 端点只需鉴权不需计费,skipBilling 仅出现 2 处(订阅加载错误处理 + 计费块守卫),
取代了之前 isUsageQuery 散布在 7 个 if 分支中的控制流。
2026-03-03 20:58:00 +08:00
shaw
ccf6a921c7
fix: 修复 PR #723 引入的 CI lint 和 test 编译错误
...
- wire_gen_test.go: 补充 NewTokenRefreshService 缺失的 tempUnschedCache 参数
- config.go, token_refresh_service.go: 修复 gofmt 格式问题
2026-03-03 16:45:29 +08:00
Wesley Liddick and GitHub
197c570baa
Merge pull request #723 from zqq-nuli/fix/oauth-401-temp-unschedulable
...
fix: OAuth 401 不再永久锁死账号,改用临时不可调度实现自动恢复
2026-03-03 16:33:07 +08:00
shaw
0fe09f1d40
fix: 恢复 PR #682 中被误替换为占位符的 OAuth client_secret
...
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
2026-03-03 16:27:28 +08:00
shaw
4a91954532
fix: correct migration 061 checksum and add missing BillingCache mock methods
...
- 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)
2026-03-03 16:11:05 +08:00
shaw
b8b5cec35c
fix: resolve CI lint errors and test compilation failures for rate limit feature
...
- 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
2026-03-03 15:43:08 +08:00
Wesley Liddick and GitHub
43c203333e
Merge pull request #733 from DaydreamCoding/fix/group-isolation
...
fix(gateway): 分组隔离 — 禁止未分组账号被跨组调度
2026-03-03 15:10:30 +08:00
Wesley Liddick and GitHub
1c6393b131
Merge pull request #732 from xvhuan/perf/admin-dashboard-preagg
...
perf(admin): 优化 Dashboard 大数据量加载(预聚合趋势+异步用户趋势)
2026-03-03 15:10:20 +08:00
Wesley Liddick and GitHub
22f04e72e5
Merge pull request #731 from xvhuan/fix/061-bounded-backfill-startup
...
fix(migrations): 061 迁移改为限时分批回填,避免启动阻塞导致 502
2026-03-03 15:08:18 +08:00
shaw
5f3debf65b
chore: add migration for api key rate limit fields
2026-03-03 15:05:15 +08:00
shaw
fd8ef27535
Merge branch 'main' of github.com:Wei-Shaw/sub2api
...
# Conflicts:
2026-03-03 15:04:03 +08:00
shaw
a80ec5d8bb
feat: apikey支持5h/1d/7d速率控制
2026-03-03 15:01:10 +08:00
Wesley Liddick and GitHub
9792b17597
Merge pull request #729 from touwaeriol/pr/fix-admin-menu-visibility
...
fix(frontend): admin custom menu items not showing in sidebar
2026-03-03 11:35:59 +08:00
Wesley Liddick and GitHub
b7df7ce5d5
Merge pull request #726 from DaydreamCoding/feat/dual-mode-umq
...
feat(gateway): 双模式用户消息队列 — 串行队列 + 软性限速
2026-03-03 08:41:34 +08:00
Wesley Liddick and GitHub
405829dc30
Merge pull request #727 from touwaeriol/pr/custom-menu-pages
...
feat: custom menu pages with iframe embedding and CSP injection
2026-03-03 08:34:57 +08:00
Wesley Liddick and GitHub
7abec1888f
Merge pull request #712 from DaydreamCoding/feat/proxy-failfast-proxyurl
...
feat(proxy): 集中代理 URL 验证并实现全局 fail-fast
2026-03-02 16:52:22 +08:00
Wesley Liddick and GitHub
445bfdf242
Merge pull request #706 from PMExtra/feat/default-subscriptions-on-user-create
...
feat(settings): add default subscriptions for new users
2026-03-02 11:38:26 +08:00
Wesley Liddick and GitHub
fc5b9c8235
Merge pull request #705 from DaydreamCoding/feat/fingerprint-ttl-lazy-renewal
...
feat(identity): 指纹缓存 TTL 懒续期机制
2026-03-02 08:33:23 +08:00
Wesley Liddick and GitHub
f490f44501
Merge pull request #699 from geminiwen/fix/dashboard-tooltip-token-sort
...
fix(dashboard): sort recent usage tooltip labels by token consumption
2026-03-02 08:33:00 +08:00
Wesley Liddick and GitHub
3613695f91
Merge pull request #697 from DaydreamCoding/feat/proxy-password-visibility
...
feat(admin): 代理密码可见性 + 复制代理 URL 功能
2026-03-01 22:21:30 +08:00
Wesley Liddick and GitHub
dd8df483cd
Merge pull request #696 from touwaeriol/feat/group-usage-distribution-chart
...
feat(dashboard): add group usage distribution chart to usage page
2026-03-01 20:35:58 +08:00
Wesley Liddick and GitHub
2129584fd6
Merge pull request #695 from geminiwen/fix/group-limit-clear-on-unlimited-pr
...
fix(group): clear nullable limit fields on update
2026-03-01 19:25:01 +08:00
Wesley Liddick and GitHub
2da9c216c3
Merge pull request #694 from salmanmkc/upgrade-github-actions-node24-general
...
Upgrade GitHub Actions to latest versions
2026-03-01 19:20:50 +08:00
Wesley Liddick and GitHub
fd57fa4913
Merge pull request #690 from touwaeriol/pr/bulk-edit-mixed-channel-warning
...
feat: add mixed-channel warning for bulk account edit
2026-03-01 18:25:05 +08:00
Wesley Liddick and GitHub
8c4d22b3f9
Merge pull request #685 from touwaeriol/pr/admin-create-and-redeem-docs
...
feat(admin): add create-and-redeem endpoint for payment integrations
2026-03-01 18:24:15 +08:00
Wesley Liddick and GitHub
c221774c51
Merge pull request #693 from salmanmkc/upgrade-github-actions-node24
...
Upgrade GitHub Actions for Node 24 compatibility
2026-03-01 18:23:50 +08:00
Wesley Liddick and GitHub
0fffba5423
Merge pull request #692 from DaydreamCoding/feat/CC_UA
...
feat(gateway): 添加 Claude Code 客户端最低版本检查功能
2026-03-01 18:03:44 +08:00
shaw
f7fa71bc28
fix: 将 README 中 Codex WS 配置迁移至使用密钥弹窗
...
- 移除 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 名称
2026-02-28 23:35:31 +08:00
shaw
fbfbb26fd2
fix(ci): 将 gosec 集成到 golangci-lint 解决安全扫描超时
...
standalone gosec 扫描 24 万行 Go 代码在 CI 中持续超时,
将其作为 golangci-lint 的内置 linter 运行,复用 AST 解析和缓存大幅提速。
- 在 .golangci.yml 中启用 gosec 并迁移原有排除规则
- golangci-lint timeout 从 5m 提升到 30m
- 从 security-scan.yml 移除 standalone gosec 步骤
- 删除不再需要的 .gosec.json 配置文件
2026-02-28 23:12:38 +08:00
Wesley Liddick and GitHub
493bd188d5
Merge pull request #680 from alfadb/fix/ops-normalize-nil-error-type
...
fix(ops): validate error_type against known whitelist before classification
2026-02-28 22:39:32 +08:00
Wesley Liddick and GitHub
9fd95df5cf
Merge pull request #679 from DaydreamCoding/feat/account-rpm-limit
...
feat: 添加账号级别 RPM(每分钟请求数)限流功能
2026-02-28 22:37:10 +08:00
shaw
54de3bf27a
fix(ci): gosec 跳过自动生成的代码文件避免扫描超时
...
为 gosec 添加 -exclude-generated 标志,跳过带有
"// Code generated" 注释的文件(如 wire_gen.go),
防止安全扫描因分析自动生成代码而超时。
2026-02-28 22:30:53 +08:00
Wesley Liddick and GitHub
4587c3e53e
Merge pull request #670 from DaydreamCoding/feat/admin-apikey-group-update
...
feat(admin): 添加管理员直接修改用户 API Key 分组的功能
2026-02-28 22:20:29 +08:00
shaw
be18bc6fc3
chore: 恢复数据库迁移文件060和修正版本号
2026-02-28 22:02:01 +08:00
Wesley Liddick and GitHub
9d795061af
Merge pull request #682 from mt21625457/pr/all-code-sync-20260228
...
feat(openai-ws): support websocket mode v2, optimize relay performance, enhance sora
2026-02-28 19:11:40 +08:00