feeeei
c19204289d
fix(affiliate): 线下提现登记按 Idempotency-Key 幂等
...
登记请求只有金额,提交成功但响应丢失时,管理员重试会把同一笔站外打款再扣
一次返利额度。现在一次登记由 Idempotency-Key 标识,数据库在同一事务内以唯一
约束去重:
- user_affiliate_ledger 新增 operation_id(幂等键派生的 SHA-256)与部分唯一
索引(迁移 240);接口要求 Idempotency-Key,缺失或非法返回 400
- 事务内先以 operation_id 写入占位流水,再解冻、扣减并补写额度快照;同键
重试返回首笔流水的结果并带 X-Idempotency-Replayed,不重复扣减;同键换了
用户或金额返回 409 IDEMPOTENCY_KEY_CONFLICT;额度不足时占位随事务回滚
- 并发的同键请求在唯一索引上等待先到者:先到者提交则返回同一条流水,回滚
则自行登记
- 弹窗在网络错误、超时、5xx、408/409 时锁定用户与金额,重试沿用同一请求与
幂等键;幂等键按管理员、用户、金额暂存于 sessionStorage,登记有确定结果后
释放
2026-09-23 01:24:59 +08:00
feeeei
57b7dbdc85
feat(affiliate): 提取记录支持登记线下提现
...
管理员在站外给邀请人打款后,系统里原本无法扣减对应的返利额度,用户仍可把
这部分额度转入余额。现在可在「邀请返利 → 提取记录」点「登记线下提现」,
从该用户的可提取返利额度中扣除已打款金额:
- POST /api/v1/admin/affiliates/users/:user_id/withdraw,请求体只含 amount,
金额按 8 位小数舍入后校验
- 先解冻已到期的冻结额度,再以 aff_quota >= amount 为条件原子扣减,写入
action=withdraw 的流水并带额度快照;额度不足返回 AFFILIATE_QUOTA_INSUFFICIENT
- 不新增字段与迁移:线下提现复用已有 action 列区分,操作人由管理端审计日志记录
- 提取记录同时列出转入余额与线下提现,新增「类型」列
- 弹窗选择用户后展示可提取额度,支持一键填入全部;从未产生返利的用户按 0 处理
返利记录改为 LEFT JOIN 订单与被邀请人,兑换码、管理员充值来源的返利也会出现
在明细中,接口里订单相关字段与被邀请人 ID 可为 null。
2026-09-17 23:42:02 +08:00
wucm667
a9ed218989
feat(redeem): paginate user redemption history
2026-09-16 13:19:15 +08:00
Wesley Liddick
1920a7d687
Merge pull request #7091 from SavitarC/feat/subscription-bulk-actions
...
feat: 支持订阅管理批量操作
2026-09-15 08:57:27 +08:00
Wesley Liddick
dd2e6b3680
Merge pull request #7076 from Shen-An/fix/antigravity-refresh-warning
...
fix(admin): surface partial Antigravity refresh warnings
2026-09-15 08:54:06 +08:00
chihao.ou
28a4ea914d
fix(proxy): allow explicitly clearing stored credentials
2026-09-13 17:23:24 +08:00
SavitarC
3d6c207723
feat: 支持订阅管理批量操作
2026-09-13 11:49:03 +08:00
Wesley Liddick
c7ed614240
Merge pull request #7001 from SavitarC/feat/ops-token-stats-all-platforms
...
feat(ops): 扩展 Token 请求统计至所有平台
2026-09-12 19:34:45 +08:00
Wesley Liddick
a59f0c7fac
Merge pull request #5833 from xuhaihan/fix/openai-fast-missing-tier
...
fix(openai): force priority when fast tier is omitted
2026-09-12 19:31:21 +08:00
Wesley Liddick
99b93b2985
Merge pull request #7053 from ouchihao/codex/bug-proxy-filter-pagination
...
fix(proxies): reset pagination when changing filters
2026-09-12 19:29:41 +08:00
Shen-An and Claude Sonnet 5
c6727ed4c9
fix(admin): surface partial Antigravity refresh warnings
...
Return the updated account alongside partial refresh warnings so the admin UI can keep its state current and tell operators when project ID retrieval must retry.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com >
2026-09-12 15:19:19 +08:00
chihao.ou
5bafffed51
fix(proxies): reset pagination when changing filters
2026-09-12 13:44:05 +08:00
xuhaihan (cc)
8e7954438d
fix(openai): force priority when service tier is omitted
2026-09-11 21:16:12 +08:00
chihao.ou
51c5d03888
fix(subscriptions): clear assignment user before search debounce
2026-09-11 19:29:07 +08:00
Wesley Liddick
cdb5cfaf6c
Merge pull request #6747 from DuskLin/feat/opencode-go-platform
...
feat(opencode): 增加 OpenCode 平台支持(Zen / GO)
2026-09-11 16:42:05 +08:00
Wesley Liddick
dfa83fbe93
Merge pull request #6986 from feeeei/feat/site-billing-mode
...
feat(settings): 新增「站点类型」开关(充值 & 订阅 / 仅充值 / 仅订阅)
2026-09-11 16:34:46 +08:00
Wesley Liddick
7145484fde
Merge pull request #6971 from ouchihao/codex/issue-1890-ttft-request-details
...
fix(ops): show first-token latency in TTFT request details
2026-09-11 13:58:37 +08:00
SavitarC
1035a4daf0
feat(ops): support token request stats across all platforms
2026-09-11 10:16:32 +08:00
刘佳林
242907854d
feat(opencode): add OpenCode platform with Zen and GO account types
...
Keep the internal platform ID opencode_go. Product surface is OpenCode
with account_mode zen|go, model-aware routing across Chat Completions,
Responses, and Anthropic Messages, and X-OpenCode-Session derived from
prompt_cache_key / metadata.user_id so prompt cache can hit.
Unmatched models fall back to /v1/chat/completions. Related to #6742 .
2026-09-11 10:05:24 +08:00
Wesley Liddick
67d3a896bd
Merge pull request #6912 from ouchihao/codex/issue-2106-redeem-subscription-duration
...
fix(redeem): align subscription duration limit with the backend
2026-09-11 09:35:29 +08:00
Wesley Liddick
0aac71c6ee
Merge pull request #6845 from ouchihao/codex/issue-6808-ops-error-summary-columns
...
fix(ops): prioritize time and response in error details
2026-09-11 09:34:23 +08:00
Wesley Liddick
f4dd88b001
Merge pull request #6847 from ouchihao/codex/issue-4064-custom-page-button-visibility
...
feat(settings): allow hiding the custom page open button
2026-09-11 09:34:11 +08:00
Wesley Liddick
0be30886a5
Merge pull request #6916 from ouchihao/codex/issue-3640-subscription-user-search
...
fix(subscriptions): exclude deleted users from assignment search
2026-09-11 09:33:57 +08:00
feeeei
9d475f9edb
feat(settings): 新增「站点类型」三态开关,关闭订阅后用户端收起所有「订阅」入口与文案
...
后台功能开关页新增「站点类型」单选:充值 & 订阅(默认,即现状)/ 仅充值 / 仅订阅。
它由两个后端开关派生并在保存时同时写回:
- subscription_enabled(新增;默认 true,缺省/空值视为开启,仅显式 false 关闭),按既有
开关模式贯通常量、公共设置、SSR 注入载荷、默认值、更新写入、DTO、审计 diff 与前端注册表;
- payment_balance_disabled(支付配置里既有的 BALANCE_PAYMENT_DISABLED,此前只能走接口/数据库
改),补进公共设置与注入载荷,让用户端在任何鉴权请求之前就能推导站点类型。
两者都关闭是接口层可表达但 UI 不提供的组合,前端归为「仅充值」,后台保存时会把余额充值重新打开。
「仅充值」时的表现:
- 用户侧边栏隐藏「我的订阅」,「充值/订阅」入口收窄为「充值」;管理端侧边栏隐藏「订阅管理」
入口(页面仍可通过地址访问);
- 购买页不再渲染「订阅」tab,只剩单个 tab 时顶部切换器随之隐藏;tab 列表变化时当前 tab
自动收敛到可用项(关闭订阅回到充值、仅订阅站点重新打开订阅进入订阅),列表为空时展示
「充值与订阅均暂未开放」而不是一个必定被后端拒绝的充值表单;
- /purchase 的页头标题/描述与 document.title 改走 resolveRouteMetaKeys 按站点类型切换;
- /subscriptions 路由新增 requiresSubscription 守卫,直达时重定向到仪表盘;
- 顶栏订阅进度徽章不再挂载,App.vue、PaymentView 与徽章组件都不再预加载/轮询订阅接口;
- 用量页隐藏「计费类型(余额/订阅)」筛选,Key 用量公开页「订阅类型」行改为「计费方式」。
「仅订阅」时侧边栏入口与页头显示为「订阅」,购买页只剩订阅 tab(余额下单由后端既有逻辑拒绝)。
购买订阅接口、已有订阅的计费、兑换码发放订阅与管理端订阅管理页面本身均不受影响。
featureFlags 抽出纯函数 resolveFeatureFlag,新增 utils/siteBillingMode 承载三态派生与反解,
PaymentView 测试改用响应式 store mock 覆盖开关双向切换。
2026-09-11 00:50:17 +08:00
chihao.ou
e9f5add97c
fix(ops): show first-token latency in TTFT request details
2026-09-10 21:13:17 +08:00
chihao.ou
c76db386c0
fix(subscriptions): exclude deleted users from assignment search
2026-09-09 20:01:34 +08:00
chihao.ou
567ea21dc8
feat(admin): support deleting selected users
2026-09-09 19:50:05 +08:00
chihao.ou
b9d0728687
fix(redeem): align subscription duration limit with the backend
2026-09-09 19:47:22 +08:00
chihao.ou
1d4e0436e4
feat(settings): allow hiding the custom page open button
2026-09-08 21:18:56 +08:00
chihao.ou
266ac9c11b
fix(ops): prioritize time and response in error details
2026-09-08 21:17:13 +08:00
Wesley Liddick
52f7bcaedd
Merge pull request #6759 from ssharkkky/feat/cmv2-user-ranking-toggle
...
feat(channel-monitor-v2): add user ranking toggle and keep missing TTFT neutral
2026-09-08 20:44:07 +08:00
Wesley Liddick
95acbf1f03
Merge pull request #6424 from cyhhao/fix/bound-ops-system-log-storage
...
fix(ops): bound database-backed system log growth
2026-09-08 20:43:54 +08:00
Wesley Liddick
68773aab98
Merge pull request #6764 from ouchihao/codex/issue-1499-select-failed-token-refresh
...
fix(accounts): keep failed token refresh accounts selected
2026-09-08 20:11:08 +08:00
Wesley Liddick
6378fb0cba
Merge pull request #6798 from savvym/codex/fix-account-menu-overflow
...
fix(frontend): 修复账号操作菜单在视口底部被截断
2026-09-08 20:08:53 +08:00
Wesley Liddick
4892b8f17e
Merge pull request #6810 from Pluviobyte/codex/fix-announcement-proxy-date-range
...
fix: validate announcement and proxy date ranges
2026-09-08 20:08:24 +08:00
Wesley Liddick
dbe92a1c24
Merge pull request #6758 from DuskLin/feat/minimax-platform
...
feat(minimax): 增加 MiniMax 平台支持
2026-09-08 18:50:06 +08:00
Rain
efc6e4a816
fix: validate announcement and proxy date ranges
2026-09-08 13:37:52 +08:00
savvym
df64b5f368
fix(frontend): keep account action menu within viewport
2026-09-08 10:46:56 +08:00
chihao.ou
7f0f579bb0
fix(accounts): keep failed token refresh accounts selected
2026-09-07 20:01:24 +08:00
shaw
2031c1d5ad
fix(groups): merge main and resolve model allowlist conflicts
...
Resolve three conflicts from main's #6680 (supplementUnmappedOpenAIModels):
1. gateway_handler.go — keep PR's allowlist refactoring (ModelAllowlistEnabled,
writeAllowlistedModelsList, modelListingSource); main's OpenAI branch in
writeModelsList was auto-merged.
2. group_models_list.go (modify/delete) — delete file per PR intent; relocate
supplementUnmappedOpenAIModels to group_model_allowlist.go where gateway_service
and openai_codex_models_service can still call it.
3. openai_codex_models_service.go — combine main's supplementUnmappedOpenAIModels
wrapping with PR's ModelAllowlistEnabled() guard.
Also fix two auto-merged test files that still referenced the old
GroupModelsListConfig / ModelsListConfig types.
2026-09-07 19:44:03 +08:00
Wesley Liddick
dc46daa690
Merge pull request #6726 from DuskLin/feat/openai-reasoning-effort-mapping-deny
...
feat(groups): 推理强度映射转发值支持拒绝
2026-09-07 18:50:41 +08:00
Wesley Liddick
65246e69d7
Merge pull request #6643 from MarushiruDonato/fix/codex-manifest-reactive-vmodel
...
fix(frontend): 修复 Codex Manifest 编辑状态丢失
2026-09-07 18:50:27 +08:00
Zero Clover
81ff9384cb
fix(groups): merge main and resolve model allowlist conflicts
2026-09-07 18:33:39 +08:00
TT
0d3dbae710
feat(channel-monitor-v2): add user ranking toggle and keep missing TTFT neutral
...
Give operators a V2 setting (channel_monitor_hide_user_ranking) to hide
the user ranking tab and the /users payload from non-admin channel
monitor v2 viewers. Default false (ranking stays visible). Admin
endpoints and views always keep the ranking.
Also stop painting first-token '-' as a red/empty failure when traffic
is sync-only and has no first-token samples: a missing TTFT is
"not applicable" (health-unknown), not a breached latency budget.
Changes:
- new setting key + fail-open parse (only literal "true" hides), wired
through public/admin settings DTOs, handlers, and the V2 runtime
- ChannelMonitorV2Service.Users returns an empty list to non-admin
viewers when the toggle is on
- frontend: feature flag + SettingsView toggle + user V2 view hides the
ranking tab and skips the /users call
- monitorFormat: isTtftUnavailable/ttftDisplayState keep missing TTFT
neutral
Tests:
- setting parse defaults to visible and only literal "true" hides
- V2 Users honors the toggle for non-admin viewers
- frontend MetricCell/monitorFormat keep missing TTFT neutral
2026-09-07 18:31:03 +08:00
刘佳林
19382f275e
feat(minimax): 增加 MiniMax 平台支持
...
把 MiniMax 做成与 Kimi / 智谱 / DeepSeek 同级的国产供应商平台:账号创建/编辑、分组、Composite 路由、原生 Token Plan / Coding Plan 额度,以及 OpenAI 兼容模型列表。
额度走 GET api.minimaxi.com|io /v1/api/openplatform/coding_plan/remains(Bearer)。只解析 model_name=general 的 remaining percent;周窗口仅在 current_weekly_status=1 时计入。
Related to #6742
2026-09-07 18:22:56 +08:00
Wesley Liddick
8f7f2b5d92
Merge pull request #6727 from wucm667/feat/issue-6723-subscription-usage-link
...
feat(admin): link subscriptions to user usage
2026-09-07 16:45:32 +08:00
Wesley Liddick
a7d2c782df
Merge pull request #5717 from wucm667/feat/issue-2629-current-main
...
feat(simple-mode): allow basic account grouping
2026-09-07 15:43:22 +08:00
wucm667
8c8fd6e298
feat(admin): link subscriptions to user usage
2026-09-07 10:13:18 +08:00
刘佳林
f62ec2e4a0
feat(groups): 推理强度映射转发值支持拒绝
...
分组推理强度映射的转发值新增 deny。命中对应请求档位时直接拒绝请求,
返回 403 permission_error,而不是改写后转发。
2026-09-07 10:12:42 +08:00
wucm667
f46038820b
fix(simple-mode): enforce group capability allowlist
2026-09-06 08:11:23 +08:00