Wesley Liddick
0d318195bf
Merge pull request #4116 from Wei-Shaw/feat/alpha-search-per-call-billing
...
feat(billing): Codex alpha/search 网页搜索按次计费
2026-07-13 10:35:46 +08:00
shaw
e5af699d0f
test(contract): groups/available 契约夹具补 web_search_price_per_call 字段
2026-07-13 10:21:44 +08:00
Heatherm Huang
f73031f436
test(grok): align scheduling reasons with upstream
2026-07-13 10:21:34 +08:00
shaw
64a2a31729
fix(billing): 修复复审发现的三处按次计费问题
...
- HIGH: GetByKeyForAuth 的 WithGroup 显式 Select 补 web_search_price_per_call 列,
否则 auth 快照里分组覆盖价恒为 nil,覆盖价/免费配置在实际计费中静默失效
- MEDIUM: 按次搜索倍率改用不含高峰因子的基础倍率(与 image/video 按次不变式
及分组表单价格预览承诺一致),calculateOpenAIRecordUsageCost 新增独立倍率参数
- LOW: 计费门槛从 <400 收紧为严格 2xx,1xx/3xx 透传不计费
2026-07-13 10:14:53 +08:00
Heatherm Huang
8a22dc7347
fix(grok): diagnose unavailable models by platform
2026-07-13 10:11:34 +08:00
Heatherm Huang
aeb34d2003
fix(grok): sanitize composer reasoning parameters
2026-07-13 10:11:33 +08:00
Heatherm Huang
c4ff604e93
test(grok): cover OAuth chat permission identity
2026-07-13 10:11:33 +08:00
Heatherm Huang
ce3f12bbff
test(grok): cover CLI identity at transport boundary
2026-07-13 10:11:33 +08:00
Heatherm Huang
f187f08ae3
fix(grok): harden OAuth routing and CLI version guard
2026-07-13 10:11:33 +08:00
Heatherm Huang
cbddb57dec
fix(grok): display remaining quota capacity
2026-07-13 10:11:33 +08:00
Heatherm Huang
3375b4ed2b
fix(grok): route OAuth subscriptions through CLI proxy
2026-07-13 10:11:33 +08:00
Heatherm Huang
d9e466ad3a
feat(grok): support xAI API key accounts
...
Allow Grok API-key accounts in Responses forwarding and connection tests, expose creation and edit defaults in the dashboard, and document the supported setup.
2026-07-13 10:11:33 +08:00
Heatherm Huang
ad18ee7c4f
fix(grok): use responses adapter for OpenCode
2026-07-13 10:09:53 +08:00
Heatherm Huang
038b25c0b1
fix(grok): resolve recent integration issues
2026-07-13 10:09:53 +08:00
benjamin
139f79b85a
test(server): 补齐长上下文计费字段契约
2026-07-13 10:02:53 +08:00
shaw
7cbb36f278
feat(billing): Codex alpha/search 网页搜索按次计费
...
- alpha/search 成功请求(上游 2xx)按次计费落 usage_logs(billing_mode=per_request),
上游错误透传/failover 不计费;使用 mandatory 池提交,池满同步兜底不丢扣费
- 单价默认 0.01 USD/次(官方 $10/1000 次),分组新增 web_search_price_per_call
覆盖价(0=免费,负数/留空=默认价),实际扣费叠加分组费率倍数(与 token 口径一致)
- 分组字段全链路:ent schema + 迁移 174 + 端口快照 v15 + admin 创建/更新 + DTO
- 前端分组表单(openai 平台)新增单次价格配置,实时预览应用当前倍率后的单次价格
- 该端点鉴权维持仅 OpenAI 分组(非 OpenAI 分组 404)
2026-07-13 09:54:51 +08:00
benjamin
92dcfb5ebc
fix(billing): 按账号控制 OpenAI 长上下文计费
2026-07-13 09:47:19 +08:00
Wesley Liddick
42f3c22830
Merge pull request #4060 from superman2003/feat/grok-prompt-cache-identity
...
feat(grok): enable Free OAuth prompt caching and quota recovery
2026-07-13 09:20:57 +08:00
shaw
8d51364c3d
Merge remote-tracking branch 'origin/main' into feat/grok-prompt-cache-identity
...
# Conflicts:
# backend/internal/handler/endpoint.go
# backend/internal/service/openai_gateway_grok_test.go
2026-07-13 09:12:44 +08:00
Wesley Liddick
33b1d772f7
Merge pull request #4063 from yardbirds0/fix/codex-alpha-search
...
fix: 转发 Codex alpha/search 独立搜索端点
2026-07-13 08:58:01 +08:00
Wesley Liddick
1c214eaca4
Merge pull request #4059 from visa2/fix/openai-messages-codex-identity
...
fix(openai): restore Codex identity headers for OAuth Messages
2026-07-13 08:56:21 +08:00
Wesley Liddick
841481e051
Merge pull request #3971 from yardbirds0/codex/fix-remote-compaction-v2
...
fix: 保留 remote_compaction_v2 原生 Responses 请求链路
2026-07-13 08:54:53 +08:00
Wesley Liddick
2f4478fd32
Merge pull request #4019 from wucm667/fix/compact-keepalive-writer-nil-guard
...
fix(service): 补齐 compact keepalive writer nil 守卫
2026-07-13 08:54:31 +08:00
Wesley Liddick
877bee84a1
Merge pull request #4072 from jianjianai/codex/fix-upstream-review
...
修复 tool_search 参数解析与 compact writer 生命周期
2026-07-13 08:54:15 +08:00
Wesley Liddick
d734dbdac4
Merge pull request #3997 from lyon-le/feat/openai-fast-policy-user-scope
...
feat(frontend): Fast/Flex 策略支持搜索选择用户
2026-07-13 08:54:01 +08:00
Wesley Liddick
05865d9b65
Merge pull request #4003 from wucm667/fix/codex-message-item-id-prefix
...
fix(codex): 剥离续链 message item 的非法 item_* id
2026-07-13 08:53:51 +08:00
gebdalaoli-arch
0dce07ee8b
fix: proxy Codex models through API key upstreams
2026-07-13 03:47:39 +08:00
gebdalaoli-arch
b6bb74b6fa
fix(openai): avoid duplicate Codex image tool injection
2026-07-12 22:54:56 +08:00
superman2003
7050070aa3
fix(grok): route cacheable chat requests via responses
2026-07-12 11:50:56 +08:00
zuelu
ff5c216189
fix(apicompat): bridge Codex additional tools
2026-07-12 11:33:09 +08:00
jjaw
fe184f8c33
修复调度缓存异常时间阻塞
...
Refs Wei-Shaw/sub2api#60
Refs Wei-Shaw/sub2api#1608
2026-07-12 05:54:46 +08:00
jjaw
73ffd13430
关联上游 issue #3818 #3887 #3961
...
相关修复 PR:#3989 #3994
2026-07-12 05:12:20 +08:00
jjaw
f57d06d959
合并 compact writer 修复
2026-07-12 04:53:55 +08:00
jjaw
1a8401f5f3
合并 tool_search 参数修复
2026-07-12 04:53:54 +08:00
jjaw
06af8115f7
修复 compact 心跳 writer 生命周期
2026-07-12 04:53:41 +08:00
jjaw
5015b7a1c1
修复 tool_search 参数对象反序列化
2026-07-12 04:53:34 +08:00
visa2
d5b47c2142
fix(openai): restore Codex identity for OAuth Messages
2026-07-11 20:47:52 +08:00
superman2003
1dedb2097d
fix(grok): persist quota exhaustion as rate limit
2026-07-11 20:41:32 +08:00
Tian Lee
52071d391b
fix(openai): 转发 Codex alpha/search 独立搜索端点
2026-07-11 20:31:33 +08:00
superman2003
0478fd3668
feat(grok): enable free OAuth prompt caching
2026-07-11 19:34:01 +08:00
iMouseWu and Claude Opus 4.8
c56a64fabd
feat(account): 账号编辑弹窗支持手动覆盖 OpenAI 订阅档位 plan_type(仅 OAuth)
...
此前 plan_type(ChatGPT Plus/Pro/Free)只由系统自动写入(OAuth 换码/刷新、
429 同步、导入),UI 无编辑入口。现于 EditAccountModal 为 OpenAI OAuth 非影子
账号新增一个订阅档位下拉,可手动纠正(走既有 PUT /admin/accounts/:id 合并,
plan_type 非敏感字段无需改后端)。
- 仅 OAuth 非影子账号显示/提交:setup-token 无订阅调度语义
(IsOpenAIChatGPTSubscription 要求 oauth),影子账号凭据由母账号管理
- 下拉:清空 + Plus/Pro/Free;别名(chatgptpro→Pro)与自定义值(team 等)
友好显示并保留 canonical 值,避免编辑丢失或写脏
- readPlanType 仅接受字符串,挡住脏数据;清空则删除该键(恢复自动识别)
- 抽 buildPlanTypeOptions/applyPlanType/readPlanType/planTypeDisplayLabel 为
纯函数入 credentialsBuilder.ts,并补 12 个单测(别名去重、保留其余凭据键、
set/delete 语义)
- 文案(zh/en)注明:令牌临期刷新或 429 会用真实档位自动覆盖手改值
经三方评审会(Claude + Codex + 作者)一轮交叉评审达成共识后落地。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-07-11 18:31:45 +08:00
Bestony
1c02158c2a
perf(migrations): index latest API key IP lookups
2026-07-11 17:32:06 +08:00
Bestony
80b7a8d4cb
perf(keys): bound latest IP lookup per key
2026-07-11 17:31:30 +08:00
iMouseWu and Claude Opus 4.8
94a22b62f7
fix(frontend): 小数据量关闭 DataTable 虚拟化并按行主键缓存行高,消除账号列表滚动抖动
...
账号列表(可变行高)在 @tanstack/vue-virtual 始终开启虚拟化下,估算行高(72)
远小于真实行高(~157),滚动时每行首次测量触发滚动补偿,表现为"一跳一跳"。
- DataTable 新增 virtualizeThreshold(默认 100):行数不超过阈值时全量渲染,
彻底绕开虚拟器的估算/测量/补偿链路;超过才虚拟化,保留大列表性能
- DataTable 补 getItemKey(与模板 :key 一致的行主键):itemSizeCache 由 index 键
改为行主键,排序/筛选/跨阈值来回都复用正确的已测行高,连带修复 >阈值 档
排序即抖的既存问题
- 虚拟/全量两模式统一为 renderRows,共用同一套行与单元格;measure ref 仅虚拟模式绑定
- useSwipeSelect:全量渲染(虚拟窗口为空)时改用真实 DOM 行按坐标二分定位,
修复关闭虚拟化后滑动多选点错行的隐患;定位逻辑提取为可测的导出函数
- AccountsView:estimate-row-height 72→156 对齐真实行高;virtualize-threshold=50,
常用分页档全量渲染无抖动,pageSize=100 仍虚拟化以约束每行 AccountUsageCell 的首屏请求扇出
- 新增/强化测试:DataTable 虚拟化决策与 getItemKey、useSwipeSelect DOM 兜底定位
经三方评审会(Claude + Codex + 作者)两轮讨论达成共识后落地。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-07-11 17:13:19 +08:00
xiaopixiu2019
51de58b37f
fix: normalize GPT-5.6 alias in OpenAI OAuth account tests
2026-07-11 15:39:32 +08:00
Tian Lee
84bb7d0709
fix: 保留 remote_compaction_v2 原生 Responses 链路
2026-07-11 12:51:53 +08:00
wucm667
6e2bb31281
fix(service): guard compact keepalive writer delegates
2026-07-11 08:52:46 +08:00
wucm667 and Claude Opus 4.8
4d4ba64bf7
fix(codex): 剥离续链 message item 的非法 item_* id
...
OpenAI OAuth 转发续链请求时,type=message 的 item 的 id 被客户端以
item_* 形式回放,但上游要求以 msg 开头,返回 400
"Expected an ID that begins with 'msg'",sub2api 随后向客户端返回 502。
客户端自动重试会不断重放同一份坏上下文,导致连续失败。
filterCodexInputWithOptions 在 PreserveReferences=true 路径下为
type=message 增加与 #3785 (fd64d07e6 ) 平行的 id 前缀检查:非 msg 开头
即删除。合法的 msg* id 原样保留,不改写 item_* 为 msg_*,因为改写出的
id 未必对应真实上游对象。
原 TestFilterCodexInput_NonToolCallItemKeepsID 以 message + item_msg_001
断言"保留 id",该行为已被上游拒绝,改用 web_search_call 覆盖同一意图。
Fixes #3981
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-07-10 23:32:34 +08:00
Lyonle
0464856c4a
feat(frontend): Fast/Flex 策略支持搜索选择用户
...
将手工 User ID 输入替换为带防抖的邮箱模糊搜索和多选标签,同时继续保存 user_ids。
回显已有用户邮箱并保留无法解析的历史 ID,补齐中英文文案路径及组件回归测试。
2026-07-10 22:27:15 +08:00
Wesley Liddick
e316ebf528
Merge pull request #3989 from xlplbo/fix/codex-mcp-tools-bridge
...
fix(apicompat): 补齐 Codex 0.14x 工具链经 chat 回退桥的转换(custom/tool_search/namespace)
2026-07-10 22:09:25 +08:00