mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-31 00:24:38 +00:00
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)
This commit is contained in:
@@ -531,6 +531,8 @@ export interface Group {
|
||||
video_price_480p: number | null
|
||||
video_price_720p: number | null
|
||||
video_price_1080p: number | null
|
||||
// Codex 网页搜索单次价格(USD/次);null 表示使用默认价 0.01
|
||||
web_search_price_per_call: number | null
|
||||
// 高峰时段倍率配置
|
||||
peak_rate_enabled: boolean
|
||||
peak_start: string
|
||||
@@ -664,6 +666,7 @@ export interface CreateGroupRequest {
|
||||
video_price_480p?: number | null
|
||||
video_price_720p?: number | null
|
||||
video_price_1080p?: number | null
|
||||
web_search_price_per_call?: number | null
|
||||
peak_rate_enabled?: boolean
|
||||
peak_start?: string
|
||||
peak_end?: string
|
||||
@@ -711,6 +714,7 @@ export interface UpdateGroupRequest {
|
||||
video_price_480p?: number | null
|
||||
video_price_720p?: number | null
|
||||
video_price_1080p?: number | null
|
||||
web_search_price_per_call?: number | null
|
||||
peak_rate_enabled?: boolean
|
||||
peak_start?: string
|
||||
peak_end?: string
|
||||
|
||||
Reference in New Issue
Block a user