Wesley Liddick and GitHub
391e79f8ee
Merge pull request #875 from mt21625457/fix/openai-fast-billing-clean
...
fix(billing): 修复 OpenAI fast 档位计费并补齐展示
2026-03-09 10:32:18 +08:00
shaw
c7fcb7a84b
feat: apikey限额支持查询重置时间
2026-03-09 10:22:24 +08:00
shaw
440d2e28ed
fix: 恢复context-1m-2025-08-07在oauth账号中传递
2026-03-09 09:29:33 +08:00
Wesley Liddick and GitHub
6cb8980404
Merge pull request #807 from touwaeriol/fix/openai-passthrough-v2
...
fix(openai): remove misplaced passthrough check from isModelSupportedByAccount
2026-03-09 09:06:35 +08:00
Wesley Liddick and GitHub
fe752bbd35
Merge pull request #853 from touwaeriol/pr/swipe-select-admin-tables
...
feat(frontend): 为后台账号管理和 IP 管理增加拖筐选中能力
2026-03-09 09:04:02 +08:00
Wesley Liddick and GitHub
c74d451fa2
Merge pull request #874 from touwaeriol/pr/increase-sse-max-line-size
...
fix: increase SSE scanner max line size from 40MB to 500MB
2026-03-09 09:03:39 +08:00
Wesley Liddick and GitHub
12d743fb35
Merge pull request #868 from touwaeriol/pr/bump-antigravity-version
...
chore: bump Antigravity user agent version to 1.20.4
2026-03-09 09:03:25 +08:00
Wesley Liddick and GitHub
6acb9f7910
Merge pull request #864 from StarryKira/fix/clear-thinking-context-management
...
[Fix] Fix issue #851
2026-03-09 09:02:58 +08:00
Wesley Liddick and GitHub
97aaa24733
Merge pull request #858 from james-6-23/fix/pool-mode-03bf3485
...
支持 API Key 上游池模式的同账号重试次数配置与自定义错误策略
2026-03-09 08:48:53 +08:00
Wesley Liddick and GitHub
faf6441633
Merge pull request #854 from james-6-23/main
...
feat(admin): 支持定时测试自动恢复并统一账号恢复入口
2026-03-09 08:48:36 +08:00
shaw
00c151b463
feat: gpt->claude格式转换支持图片识别
2026-03-09 08:44:09 +08:00
Wesley Liddick and GitHub
a2ae9f1f27
Merge pull request #866 from touwaeriol/pr/apikey-quota-usage-bars
...
feat(frontend): add API Key quota progress bars to usage window
2026-03-08 21:50:24 +08:00
Wesley Liddick and GitHub
034b84b707
Merge pull request #861 from bayma888/feature/usage-user-balance-popup
...
feat(ui): 使用记录页面点击用户邮箱可查看用户信息和充值记录
2026-03-08 20:37:45 +08:00
Wesley Liddick and GitHub
1624523c4e
Merge pull request #860 from bayma888/feature/group-display-fix
...
feat(ui): 优化分组选择器、交互体验和样式遮挡体验问题
2026-03-08 20:37:36 +08:00
Wesley Liddick and GitHub
313afe14ce
Merge pull request #842 from pkssssss/fix/openai-ws-usage-refresh
...
fix: 修复 OpenAI WS 用量窗口刷新与限额状态不同步
2026-03-08 20:34:54 +08:00
Wesley Liddick and GitHub
01180b316f
Merge pull request #841 from touwaeriol/feature/account-periodic-quota
...
feat(account): 为 API Key 账号新增日/周周期性配额限制
2026-03-08 20:34:15 +08:00
Wesley Liddick and GitHub
ee7d061001
Merge pull request #839 from pkssssss/fix/simple-mode-admin-concurrency-30
...
fix: 简易模式仅提升管理员默认并发到 30
2026-03-08 20:33:11 +08:00
shaw
03bf348530
fix(lint): gofmt formatting fixes for 3 files
...
Align struct field assignments and fix indentation detected by
golangci-lint v2.9's gofmt checker.
2026-03-07 23:24:09 +08:00
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