Commit Graph
8795 Commits
Author SHA1 Message Date
shaw d0d143afad fix(composite, billing): 修复跨平台账号池与 Ollama Cloud 合入后的计费、降级及路由回归 2026-12-06 12:55:44 +08:00
Wesley Liddick 8cd45b9990 Merge pull request #9269 from Wei-Shaw/fix/vue-i18n-ghsa-9qc3-h48f-7h96
fix(deps): bump vue-i18n to 11.4.25 for GHSA-9qc3-h48f-7h96
2026-12-05 20:27:14 +08:00
shaw 6f13ef21cf fix(deps): bump vue-i18n to 11.4.25 for GHSA-9qc3-h48f-7h96
Upgrade vue-i18n and @intlify/message-compiler from 11.4.16 to 11.4.25
(first patched release: 11.4.19) to resolve GHSA-9qc3-h48f-7h96
(sanitizeTranslatedHtml bypass via unterminated attribute values) affecting
vue-i18n, @intlify/core-base, and @intlify/shared.

Lockfile regenerated with pnpm 9; only vue-i18n and @intlify/* entries changed.
2026-12-05 20:19:01 +08:00
Wesley Liddick b8de02a482 Merge pull request #7114 from alfadb/feature/composite-ollama-unified
feat(composite, ollama): 统一 Ollama Cloud 平台与跨平台账号池
2026-12-05 20:10:38 +08:00
shaw 76981e526b fix(repository): 对齐 ErrTxStarted 分支调度快照同步(兼容 testEntTx 夹具) 2026-12-05 19:31:47 +08:00
shaw 517f3222e4 fix(composite, ollama): 收口跨组降级校验、池策略错误保留、OAuth 透传门禁与事务 outbox 2026-12-05 19:16:03 +08:00
shaw e15d1b5082 fix(frontend): 清理 ollama_cloud 编辑残留 allowed_models 并补齐账号池路由预览与余额解析 2026-12-05 17:26:44 +08:00
shaw 319ee85330 fix(gateway, composite): 修复跨组降级凭据隔离、input_tokens/compact 池收窄与连接测试中转基址 2026-12-05 17:26:44 +08:00
shaw e9481fb0cb fix(billing, ollama): 修复组合池公开别名计费回退、通配倍率卡预检绕过与带 tag 模型基名碰撞 2026-12-05 17:26:44 +08:00
shaw ad1ead4541 fix(frontend, catalog): 导出多协议默认协议并修复 ollama_cloud 编辑弹窗协议/基址/白名单回填 2026-12-05 12:10:27 +08:00
shaw e3c23b25e0 fix(ollama, monitor): 补齐默认上游白名单、多协议空基址守卫、credits 监控去窗与流式预检错误帧 2026-12-05 12:10:27 +08:00
shaw 06ea8a21dc fix(composite, billing): 修复账号池在途预留查桶、降级分组上下文残留与渠道模型限制作用域 2026-12-05 12:10:27 +08:00
shaw b54f4f155a fix(frontend): 新建 ollama_cloud 账号默认预填白名单并收敛 credits 模式表单细节 2026-12-05 10:41:13 +08:00
shaw b89c2c98c7 fix(gateway): 补齐跨族账号池 compact 路由、生图门禁、推理强度策略与流式错误输出 2026-12-05 10:41:13 +08:00
shaw e7fcf51343 fix(ollama, billing): 拦截未配价 claude 出站模型并对齐计费配额平台、连接测试与监控余额解析 2026-12-05 10:41:13 +08:00
shaw 18f11c391a fix(composite): 收敛账号池模型门禁、透传残留映射兼容与负载感知自动暂停注入顺序 2026-12-05 10:41:13 +08:00
shaw 04b0ac54d0 fix(scheduler): 补齐 ollama_cloud 快照投影字段与用量更新后的调度缓存同步 2026-12-05 10:41:13 +08:00
shaw c3a59f545e Merge remote-tracking branch 'origin/main' into resolve-7114 2026-12-05 10:15:08 +08:00
Wesley Liddick eb413d9b39 Merge pull request #9258 from zriyox/fix/payment-expired-order-recovery
fix(payment): 过期订单收到支付成功回调后照常入账;过期前查单失败不再直接置为过期
2026-12-04 23:42:23 +08:00
Wesley Liddick c589c121ec Merge pull request #9255 from zanyatta/fix/xai-input-too-large
fix(grok): keep xAI context-window refusals as context_length_exceeded
2026-12-04 23:41:22 +08:00
Wesley Liddick 3f99496496 Merge pull request #9254 from Sjeary/fix/users-mobile-layout
fix: 修复手机端用户管理页面溢出和菜单裁切的问题
2026-12-04 23:41:19 +08:00
Wesley Liddick 4f621a5a10 Merge pull request #9251 from dzolv/fix/gemini-list-models-pagination
fix(gemini): forward pageSize and pageToken on /v1beta/models
2026-12-04 23:41:15 +08:00
Wesley Liddick 2f39007e86 Merge pull request #9214 from dzolv/fix/ws-http-bridge-window-and-delegation
fix(openai): ignore standalone named delegation in continuation checks and reset WS HTTP bridge on window rollover
2026-12-04 23:41:10 +08:00
Wesley Liddick 9ac8925fe9 Merge pull request #8560 from weicheng59/fix/openai-capacity-shed-strip-retry-after
fix(openai): preserve WebSocket retries on capacity shedding
2026-12-04 23:41:07 +08:00
shaw 6ba762f3bf fix(grok): restore strconv import after merging main 2026-12-04 23:37:52 +08:00
shaw bfceebe029 Merge remote-tracking branch 'origin/main' into pr-9255-fix 2026-12-04 23:34:29 +08:00
zriyox 82302dbfca fix(payment): 过期订单收到支付成功回调后照常入账;过期前查单失败不再直接置为过期
- toPaid 对 EXPIRED 订单不再限制 5 分钟宽限,和 CANCELLED 一致:回调已验签且上游确认已付,就恢复并发货。
- ExpireTimedOutOrders 在上游查单报错时保留 PENDING,下一轮重查;超过过期时间 1 小时仍查不通才置为过期。
2026-12-04 07:29:50 -08:00
Wesley Liddick af6a5c3d0c Merge pull request #9253 from Wei-Shaw/fix/9156-gpt-image-26-unified-generations
fix(openai): support image/mask/markup inputs on unified /v1/images/generations
2026-12-04 21:53:49 +08:00
Wesley Liddick cd412f6c09 Merge pull request #9252 from Wei-Shaw/fix/9183-capacity-shed-long-retry-after
fix(openai): skip same-account overload retries when Retry-After exceeds budget
2026-12-04 21:53:43 +08:00
shaw a562e77638 Merge remote-tracking branch 'origin/main' into fix/9156-gpt-image-26-unified-generations 2026-12-04 21:38:25 +08:00
shaw c7ae3a36e4 Merge remote-tracking branch 'origin/main' into fix/9183-capacity-shed-long-retry-after 2026-12-04 21:38:21 +08:00
Wesley Liddick a2cd083dce Merge pull request #9256 from Wei-Shaw/fix/ws-bridge-reconcile-8302
fix(openai-ws): reconcile HTTP bridge parent check with history limit and sticky continuations
2026-12-04 21:36:46 +08:00
alfadb c13b088059 Merge branch 'main' into feature/composite-ollama-unified
# Conflicts:
#	backend/internal/handler/openai_gateway_handler.go
#	backend/internal/service/gateway_scheduling.go
#	backend/internal/service/openai_account_scheduler.go
#	backend/internal/service/openai_ws_forwarder_support.go
#	frontend/src/components/account/CreateAccountModal.vue
2026-12-04 18:32:52 +08:00
shawandDevin 4e694a3745 fix(openai-ws): reconcile HTTP bridge parent check with history limit and sticky continuations
Follow-up to #8302 (f7ec8b3ce).

Placing the unresolved `previous_response_id` 1008 rejection at the top of the
HTTP bridge turn loop ran before `hooks.BeforeTurn` and before the `historyLost`
1013 (`StatusTryAgainLater`) check from #9203, and rejected valid turn-1 sticky
API-key continuations (`store != false` bound in `stateStore`) as well as Grok
HTTP bridge turns.

Move the 1008 check after `BeforeTurn` and `historyLost`, allow turn-1 API-key
continuations bound to the selected account when `store != false`, and preserve
Grok HTTP bridge handling while keeping all #8302 unresolved-parent cases closed
with 1008.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-12-04 18:24:50 +08:00
shawandDevin c3f1b4bc75 fix(openai): tighten null/empty image field checks and model_not_found 404 guard
- Ignore explicit JSON `null` values on `mask` and native image options so
  prompt-only requests with null placeholders stay on basic capability.
- Reject empty objects/strings inside `images[]`, `image`, and `mask` instead of
  silently dropping malformed image entries.
- Skip same-account `/images/edits` -> `/images/generations` retry when a 404 is
  explicitly `model_not_found` so account failover runs without an extra round-trip.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-12-04 17:31:39 +08:00
shawandDevin 332f45f858 fix(openai): guard 429-wrapped capacity shed against long Retry-After window
When a capacity-shed event (`slow_down` / `server_is_overloaded`) arrives with a
429 status and an explicit `Retry-After` exceeding the 8s same-account budget,
skip opening the 2-minute OAuth 429 retry deadline window as well, and emit
`upstream_retry_after` across WebSocket, Embeddings, and AlphaSearch logs.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-12-04 17:27:09 +08:00
Sjeary 8baebfee07 merge: sync upstream and retain DOMPurify 3.5.1 2026-12-04 01:18:32 -08:00
zanyatta 44ac31a891 fix(grok): keep xAI context-window refusals as context_length_exceeded
xAI rejects an oversized prompt with HTTP 400
{"code":"invalid-argument","error":"Failed to start sampling: [input_too_large] The prompt is too long for this model’s context window (612345 tokens > 500000 tokens)"}.
The shared extractor cannot read this flat body, so Responses clients got the
generic "Upstream rejected the request" and could not tell an oversized
prompt from any other rejected request.

For Grok accounts, a 400 that carries the explicit [input_too_large] tag is now
returned as 400 {"error":{"type":"invalid_request_error",
"code":"context_length_exceeded","message":...}}. Token counts are copied only
when the upstream message states them. X-Grok-Context-Window is forwarded from
the upstream when it is a positive integer, otherwise taken from the stated
limit, otherwise omitted. Other 400s keep their existing shape, and the error
still does not fail over or cool down the account.
2026-12-04 08:54:00 +00:00
shawandDevin 547c35acf5 fix(openai): support image/mask/markup inputs on unified /v1/images/generations
GPT Image 2.6 callers using the unified `/v1/images/generations` protocol pass
reference `images` / `image`, `mask`, and `markup` directly on `generations`
rather than `/v1/images/edits`. Previously, input-image parsing and Codex OAuth
payload construction were gated behind `IsEdits()`, silently dropping image
inputs (and skipping image moderation) on `/v1/images/generations`.

- Parse, validate, moderate, and forward `images`/`image`, `mask`, and `markup`
  on `/v1/images/generations` (JSON and multipart) as well as `/v1/images/edits`.
- Recognize bare `gpt-image-2.6` and `gpt-image-2.6-*` snapshots consistently in
  direct routing, Responses-fallback guard, and fallback pricing.
- Automatically fall forward from `/backend-api/codex/images/edits` to
  `/backend-api/codex/images/generations` when upstream returns 404/405.

Fixes #9156

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-12-04 16:44:02 +08:00
shawandDevin d07f63ddf8 fix(openai): skip same-account overload retries when Retry-After exceeds budget
When an OpenAI upstream sheds capacity (`server_is_overloaded` / `slow_down`)
and advertises an explicit `Retry-After` longer than the per-retry delay cap
(8s, e.g. 315-369s in #9183), replaying a single-credential account every 8s
cannot satisfy the upstream window and delays switching to healthy accounts.

Switch non-pool accounts immediately on long capacity-shed `Retry-After` hints
while keeping short/unspecified blips and pool-mode relays retryable, preserve
request-scoped transient semantics (no persistent account cooldown), and log
`upstream_retry_after` on retry and switch events.

Fixes #9183

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-12-04 16:30:39 +08:00
Wesley Liddick f7ec8b3cee Merge pull request #8302 from xz-dev/fix/http-bridge-unresolved-previous-response-id
fix(openai-ws): reject unresolved previous_response_id on HTTP bridge
2026-12-04 15:20:56 +08:00
Wesley Liddick 484625a239 Merge pull request #9236 from r266-tech/codex/antigravity-retry-after
fix(antigravity): honor Retry-After for upstream 429s
2026-12-04 15:20:47 +08:00
Wesley Liddick 57ddb49706 Merge pull request #9217 from debug-zhang/fix/5010-proxy-circuit-diagnosis
fix(openai): scope stream circuit per account and cache no-account diagnostics
2026-12-04 15:20:37 +08:00
Wesley Liddick d63c48cf62 Merge pull request #9224 from debug-zhang/fix/8966-reasoning-only-completed
fix(openai): treat reasoning-only responses.completed as empty
2026-12-04 15:20:27 +08:00
Wesley Liddick 49ef0328a5 Merge pull request #9078 from xidongyuandong/fix/codex-catalog-auto-refresh-v0.2.25
fix(codex): use automatic identity for catalog downloads
2026-12-04 15:20:17 +08:00
Wesley Liddick 7a09fbf167 Merge pull request #9223 from r266-tech/codex/ccswitch-codex-transport
feat(keys): choose Codex transport for CC Switch imports
2026-12-04 15:20:08 +08:00
Wesley Liddick ec68ce4f87 Merge pull request #9247 from Sjeary/fix/users-global-usage-sort
fix: 修复用户管理用量排序仅作用于当前页的问题
2026-12-04 15:19:59 +08:00
Wesley Liddick 5720d10c38 Merge pull request #9146 from erywim/fix/balance-low-notify-dedup
fix(billing): notify again when a new deduction crosses the balance threshold
2026-12-04 15:19:49 +08:00
Wesley Liddick 725b235f97 Merge pull request #9225 from debug-zhang/fix/3210-api-key-existence-oracle
fix(security): hide custom api key existence in creation errors
2026-12-04 15:19:40 +08:00
Wesley Liddick f8c9792d7b Merge pull request #9250 from HuntercodeT/fix/deps-dompurify-3.5.0
fix(deps): bump dompurify to 3.5.0 for GHSA-hrxw-jjj6-2g2j
2026-12-04 15:19:04 +08:00