Wesley Liddick
548c71c8bb
Merge pull request #2557 from Arron196/fix/issue-2542-daily-card-expiry-mode
...
fix: 修复日卡跨日重复刷新额度
2026-05-19 14:53:22 +08:00
Wesley Liddick
8a9f7ae2f1
Merge pull request #2444 from astro-ge/fix/passthrough-first-token-ms
...
fix(passthrough): 修复WSv2模式下first_token_ms测量错误
2026-05-19 14:52:55 +08:00
Wesley Liddick
902af920b7
Merge pull request #2456 from Evsdrg/fix/unbounded-queries-and-sort
...
fix(repo): 公告查询添加分页上限,优化分组按账户数排序的数据加载方式
2026-05-19 14:51:59 +08:00
Wesley Liddick
8a4ee578cb
Merge pull request #2451 from wucm667/codex/issue-2237-gemini-chat-completions
...
fix(gateway): 修复 Gemini 组 Chat Completions 路由
2026-05-19 14:47:52 +08:00
Wesley Liddick
e365aae450
Merge pull request #2450 from wucm667/codex/issue-2431-responses-api-support
...
feat: 支持后台配置 OpenAI Responses API 路由
2026-05-19 14:47:10 +08:00
Wesley Liddick
ac856633aa
Merge pull request #2449 from wucm667/fix/payment-product-name-affix
...
fix: 修复订阅支付商品名前后缀不生效
2026-05-19 14:46:09 +08:00
Wesley Liddick
36e461e7c9
Merge pull request #2424 from wucm667/fix/openai-versioned-base-url
...
fix(openai): handle versioned compatible base URLs
2026-05-19 14:44:37 +08:00
Wesley Liddick
23e95b77b7
Merge pull request #2528 from wucm667/fix/openai-responses-null-content
...
fix(openai): 修复 chat-completions 转 responses 时 content 为 null 导致上游 400
2026-05-19 14:43:55 +08:00
Wesley Liddick
03473d3ee8
Merge pull request #2554 from Arron196/feature/sync-upstream-models-pr
...
feat: 支持从上游同步账号可用模型列表
2026-05-19 14:42:47 +08:00
Wesley Liddick
ae4c738887
Merge pull request #2457 from wucm667/fix/openai-fast-policy-default-pass
...
fix: 默认透传 OpenAI service_tier
2026-05-19 14:34:37 +08:00
Wesley Liddick
aa1460feb3
Merge pull request #2475 from is7Qin/feat/available-channels-default-pricing
...
feat(channels): 「可用渠道」对未填价的 pricing 条目按 LiteLLM 默认价展示
2026-05-19 14:33:17 +08:00
Wesley Liddick
c65522641d
Merge pull request #2473 from is7Qin/fix/image-tier-validation
...
fix(channels): 按次/图片计费模式下区间校验跳过 token 上下文重叠规则
2026-05-19 14:28:33 +08:00
Wesley Liddick
57603e169e
Merge pull request #2461 from wucm667/fix/image-gen-upstream-context-detach
...
fix(gateway): 修复图片生成上游请求过早取消
2026-05-19 14:14:50 +08:00
Wesley Liddick
be0c857240
Merge pull request #2502 from yangzc2004-bit/codex/gemini-google-one-429-cooldown
...
fix: use tier cooldown for google one gemini 429
2026-05-19 14:07:25 +08:00
Wesley Liddick
a340002c6d
Merge pull request #2401 from 2ue/fix/normalize-image-billing-size
...
修复图片计费尺寸归一化与使用记录展示
2026-05-19 14:00:24 +08:00
name
ddab7de916
Merge branch 'main' into fix/image-tier-validation
2026-05-19 11:06:17 +08:00
name
d70497a669
Merge branch 'main' into feat/available-channels-default-pricing
2026-05-19 11:06:15 +08:00
Wesley Liddick
14f54be03f
Merge pull request #2481 from weak-fox/lyp/fix-issue-2223-capacity-retry
...
fix: 修复 OpenAI 模型容量错误未进入自动重试
2026-05-19 10:24:18 +08:00
Wesley Liddick
f9fec78b70
Merge pull request #2505 from is7Qin/fix/openai-compat-usage-parsing
...
修复 Claude 映射 GPT 后被记为 0 token 的计费漏洞
2026-05-19 09:53:50 +08:00
shaw
a729752de6
test: align codex tool-call id assertions with fc_ prefix
2026-05-19 09:45:05 +08:00
Wesley Liddick
11870cf84f
Merge pull request #2499 from yetone/fix/codex-transform-fc-underscore
...
fix(codex-transform): preserve underscore when rewriting `call_*` tool-call ids
2026-05-19 09:39:25 +08:00
Wesley Liddick
e318376e88
Merge pull request #2548 from Arron196/fix/sla-exclude-capacity-errors
...
fix: 统一 Ops SLA 与请求错误统计口径
2026-05-19 09:29:22 +08:00
Wesley Liddick
d1910751b6
Merge pull request #2541 from DanisJiang/fix/alipay-pagepay-qrcode
...
fix(payment): 修复支付宝官方扫码二维码生成错误
2026-05-19 09:24:23 +08:00
benjamin
a4884b4e75
fix(subscription): 将日卡改为一次性每日配额
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 21:09:11 +08:00
benjamin
36c00374d3
feat: expose upstream model sync admin API
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 19:01:33 +08:00
benjamin
b9ecf25207
fix: harden Antigravity model list requests
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 19:01:23 +08:00
benjamin
ba676e43fd
feat: add upstream model sync service
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 19:01:12 +08:00
lyen1688
164e2f610c
fix: add keepalive for Anthropic passthrough streams
2026-05-18 18:41:25 +08:00
benjamin
6acb46c113
fix: 标记通用网关本地调度容量错误
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 16:52:32 +08:00
benjamin
429adbc721
fix: 标记 OpenAI 本地调度容量错误
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 16:52:20 +08:00
benjamin
ae6ee23e2e
fix: 调整 Ops 错误分类的 SLA 排除逻辑
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 16:52:06 +08:00
Yuhao Jiang
1b03240515
fix(payment): 修复支付宝官方扫码二维码生成错误
...
支付宝官方服务商在 precreate(当面付)不可用回退到 page.pay 时,
错误地把网页跳转 URL 当作可扫码二维码内容返回。前端用 QRCode 库
把这段 URL 渲染成二维码后,支付宝 APP 无法识别(扫到的只是个 HTTP
URL,不是支付二维码),用户必须点"重新打开支付页面"跳转到支付宝
收银台才能扫到真正可用的二维码。
- 后端 alipay.go:createPagePayTrade 不再把 PayURL 塞给 QRCode;
createDesktopTrade 在 paymentMode == "redirect" 时跳过 precreate
直接走 page.pay,避免没开通"当面付"的商户走一次无用的 API 调用
- 前端管理端 PaymentProviderDialog:让支付宝官方实例可在"支付模式"
中选择"跳转",开启后始终在新标签页打开支付宝收银台
- ProviderCard 的 modeLabel 增加 redirect 分支
- 补充 TestCreateTradeRedirectModeSkipsPrecreate 单元测试
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 15:01:17 -05:00
lyen1688
cc5328c491
修复 OpenAI Responses SSE 终止事件识别
2026-05-17 15:33:34 +08:00
wucm667
df82a3bc69
fix(openai): avoid null content when converting chat-completions to responses
...
When a chat-completions message has no usable content parts (empty array,
empty text part, or filtered-out image part), marshalChatInputContent
marshalled a nil slice to JSON null. The upstream Responses API rejects a
null content field with HTTP 400. Fall back to an empty string instead.
Fixes #2515
2026-05-17 11:20:05 +08:00
name
0393bd7c82
Fix OpenAI compat usage parsing
2026-05-16 03:03:43 +08:00
yangzc2004-bit
87fac30459
fix: use tier cooldown for google one gemini 429
2026-05-16 00:16:38 +08:00
yetone
348a487739
fix(codex-transform): preserve underscore when rewriting call_* tool-call ids
...
`fixCallIDPrefix` builds malformed ids when the input has the standard
OpenAI `call_<nanoid>` prefix:
input: call_YYen1qxDejd2myJwcTCf7Nyp
output: fcYYen1qxDejd2myJwcTCf7Nyp ← no underscore between 'fc' and the nanoid
ChatGPT's codex backend then rejects the replayed item with:
400 Invalid 'input[N].id': 'fcYYen1qxDejd2myJwcTCf7Nyp'.
Expected an ID that contains letters, numbers, underscores, or
dashes, but this value contained additional characters.
Sub2api wraps that into 502 to the client. Clients using the OpenAI SDK
on the OAuth/codex path see every multi-hop turn (after the first tool
call) fail because the item_reference rewritten this way gets sent on
every subsequent hop.
The other two branches of the same function correctly emit `fc_`
(line 1029: pass-through when already `fc*`; line 1035 fallback:
`fc_" + id`). Only the `call_` → `fc_` rewrite was missing the
underscore — looks like a copy-paste slip during the original commit.
Fix: change `"fc"` to `"fc_"` on the call_ branch. One character.
Repro:
client (OpenAI SDK) sends a function_call_output whose call_id is
`call_<nanoid>` (default OpenAI format). The sub2api request body
also contains an item_reference whose id mirrors the call_id (also
`call_<nanoid>`). On the codex OAuth path, this rewrite fires for
the item_reference's id, producing the malformed value.
Affects: `platform=openai type=oauth` accounts whose clients use the
official OpenAI SDK / Responses API conventions (id prefix `call_`).
API-key accounts and bridge-mode requests are untouched.
2026-05-15 23:29:56 +08:00
name
ff6f1640c4
fix(channels): 后端按次/图片计费跳过 token 区间重叠校验
...
前端在上一个 commit 已对 image / per_request 模式跳过 unbounded-last
和重叠检查, 但保存时后端仍按 token 语义校验, 导致添加第二个图片层级
时报错:
invalid pricing intervals for platform 'openai' models
[gpt-image-2 gpt-image-1.5 gpt-image-1]:
interval #1 : unbounded interval (max_tokens=null) must be the last one
ValidateIntervals 加 mode 参数, 与前端校验逻辑对齐:
- token 模式行为不变 (区间重叠 / last-unlimited 仍校验)
- per_request / image 模式跳过区间重叠和 last-unlimited 检查,
保留单条 min/max 自洽校验与价格非负校验。
调用方 validatePricingIntervals 把 pricing.BillingMode 透给校验器。
既有单测全部加上 BillingModeToken 显式参数, 新增 3 个 image 模式用例
(允许多条 unbounded / 仍拒绝负价 / 仍拒绝 max <= min)。
2026-05-15 13:14:07 +08:00
wucm667
2ec1d331e0
fix(gateway): return Gemini models for Gemini groups
2026-05-15 11:33:26 +08:00
weak-fox
9f07741c13
fix: retry model capacity transient errors
2026-05-15 10:43:29 +08:00
weak-fox
ed7ef86347
test: add capacity retry regressions
2026-05-15 10:41:57 +08:00
name
c26d3ae1b5
feat(channels): 渠道未填价时按 LiteLLM 默认价展示
...
「可用渠道」展示链路有两个未覆盖场景导致用户看到"未配置定价":
1. admin 在 UI 里建了 ModelPricing 条目但没填任何价格 (常见于
per_request / image 模式只填了 tier_label 没填单价): 原 fallback
只检查 Pricing == nil, 这种空条目会跳过 LiteLLM 兜底。
2. LiteLLM 把图片模型标记 mode=image_generation, 但合成器固定按
token 模式合成, 把 OutputCostPerImage / 图片 token 价丢到错误字段。
改动 (仅 backend/internal/service/channel_available.go):
- 新增 pricingNeedsFallback: 价格字段全空 (含 intervals 全空) 视为
未配置, 触发 LiteLLM 兜底。
- synthesizePricingFromLiteLLM 加 existing 参数: 优先尊重渠道已选
BillingMode (per_request / image 也按此模式合成), 没选才看 LiteLLM
mode, 仍未命中默认 token。
- image / per_request 分支用 OutputCostPerImage 填 PerRequestPrice,
OutputCostPerImageToken 填 ImageOutputPrice, 让 gpt-image / dall-e
系列展示出参考价。
仅影响展示链路, 真实计费走 BillingService / ModelPricingResolver
完全不受影响。新增 8 个单元测试覆盖 pricingNeedsFallback 各分支、
合成器三种模式选择、空条目兜底与既有价格保护。
2026-05-15 01:28:13 +08:00
wucm667
a611742910
fix(gateway): detach upstream context unconditionally for image generation
...
Image generation requests (forwardOpenAIImagesOAuth and
forwardOpenAIImagesAPIKey) were calling detachStreamUpstreamContext with
parsed.Stream, which for non-streaming requests (Stream=false) simply
returned the original client context unchanged. When the client
disconnected before the upstream completed (30-80s for image gen), the
context cancellation propagated to the upstream HTTP request, causing a
502 error despite the upstream having already started processing.
Switch to detachUpstreamContext (unconditional detach) so the upstream
image generation request is always bound to a background context and
completes regardless of client lifecycle.
Fixes #2310
2026-05-14 18:03:18 +08:00
wucm667
e9637148dd
fix(openai): pass service_tier by default
2026-05-14 16:45:31 +08:00
cepvor
ab6510f1a0
fix(repo): 为公告查询添加分页上限,优化分组按账户数排序的数据加载
...
- announcement ListActive: 添加 Limit(200) 防止无界查询
- group listWithAccountCountSort: 改为先只查 ID + sort_order,
再批量加载账户统计,排序分页后仅加载当前页的完整实体,
避免全量加载所有字段后做内存排序。
Co-Authored-By: deepseek-v4-pro[1m] <deepseek-ai@claude-code-best.win>
2026-05-14 16:38:45 +08:00
wucm667
f9d5ccdf24
test(gateway): check Gemini chat completion assertions
2026-05-14 15:33:10 +08:00
wucm667
041d138f76
fix(gateway): route Gemini chat completions upstream
2026-05-14 11:48:00 +08:00
wucm667
862819042c
feat(openai): 支持后台配置 Responses API 路由
2026-05-14 11:46:24 +08:00
wucm667
61b6272110
fix(payment): apply product affix to subscriptions
2026-05-14 11:36:02 +08:00
astr0-g
be15a3e6ce
fix passthought 首token时间计算修复
2026-05-13 18:01:09 -07:00