shaw
fcd3bc1272
fix: return 404 model_not_found instead of 503 when no account supports the model
2026-06-26 15:38:06 +08:00
Heatherm Huang
44f502bab8
fix: address grok review feedback
2026-06-26 14:26:43 +08:00
lyen1688
8a7269f539
fix: sanitize verbose OpenAI response failed events
2026-06-26 12:29:58 +08:00
Wesley Liddick
683a8d8096
Merge pull request #3421 from syx0310/fork/openai-codex-pat-auth-upstream
...
feat: add codex personal access token auth
2026-06-26 11:15:38 +08:00
Wesley Liddick
54ef446c1d
Merge pull request #3469 from wucm667/fix/responses-passthrough-duplicate-function-args
...
fix(openai): Responses passthrough 不再重复发出 function_call arguments,修复 Codex CLI 解析失败
2026-06-26 10:58:36 +08:00
bwlc and Claude Opus 4.8
815bc6c9b5
feat(risk-control): record matched keyword in keyword-block logs
...
The risk control center's moderation log records had no field for the
keyword that triggered a keyword block, so the admin UI couldn't show
which keyword was hit (only the application slog logged it).
- migration 156: add matched_keyword column to content_moderation_logs
- ContentModerationLog gains MatchedKeyword; set it on keyword block
- repo CreateLog/ListLogs persist and read the column
- frontend: show "命中关键词" inline in the log table and detail modal
- i18n: add matchedKeyword (zh/en)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-26 10:43:05 +08:00
Heatherm Huang
720db8983f
test: harden grok quota readiness
2026-06-26 10:42:21 +08:00
Heatherm Huang
8a87a658ad
test: cover grok readiness paths
2026-06-26 10:37:37 +08:00
Heatherm Huang
939905b8c7
fix: refine grok quota pause behavior
2026-06-26 10:37:37 +08:00
Heatherm Huang
0d28642181
feat: add grok quota probe parity
2026-06-26 10:37:37 +08:00
Heatherm Huang
1b9645ca32
fix: allow grok scheduler capability routing
2026-06-26 10:36:09 +08:00
Heatherm Huang
f29ccc7dfb
fix: reduce grok oauth account-risk paths
2026-06-26 10:36:09 +08:00
Heatherm Huang
b2e2c7e69c
fix: harden grok oauth gateway paths
2026-06-26 10:36:09 +08:00
Heatherm Huang
b3a07aeae7
fix: align grok oauth exchange with xai
2026-06-26 10:36:09 +08:00
Heatherm Huang
39be1ec97f
feat: add grok subscription support
2026-06-26 10:36:09 +08:00
Wesley Liddick
94c059c99e
Merge pull request #3471 from wucm667/fix/antigravity-standard-tier-empty-project-fallback
...
fix(antigravity): standard-tier 账号 project_id 为空时兜底,避免全部请求 500
2026-06-26 09:45:54 +08:00
Wesley Liddick
1721b2b2d1
Merge pull request #3404 from wucm667/fix/balance-preflight-prevent-overdraft
...
fix(billing): 余额扣减增加充足性校验,防止余额透支为负
2026-06-26 09:45:46 +08:00
Wesley Liddick
32ddd5c60b
Merge pull request #3405 from wucm667/fix/subscription-order-apply-recharge-multiplier
...
fix(payment): 订阅套餐订单应用 BALANCE_RECHARGE_MULTIPLIER 汇率换算
2026-06-26 09:45:38 +08:00
Wesley Liddick
d53dd112ce
Merge pull request #3442 from hsn8086/fix/openai-chat-transport-failover
...
fix(openai): fail over on chat completions transport errors
2026-06-26 09:43:00 +08:00
Wesley Liddick
36a352f5eb
Merge pull request #3429 from 404QAQ/fix/images-content-refusal-passthrough
...
fix(images): pass content-moderation refusals through as 400 instead of retrying
2026-06-26 09:42:50 +08:00
Wesley Liddick
9983f5b80a
Merge pull request #3428 from Milesians/codex/fix-subscription-plan-validity-unit
...
fix(payment): support plural subscription validity units
2026-06-26 09:42:42 +08:00
Wesley Liddick
6db9e42352
Merge pull request #3476 from zeyugao/main
...
Detect OpenAI overloaded errors by structured code
2026-06-26 09:42:22 +08:00
Wesley Liddick
50c3e52799
Merge pull request #3460 from StarryKira/codex/fix-responses-cache-input
...
[codex] fix responses cache input for chat completions bridge
2026-06-26 09:42:04 +08:00
Wesley Liddick
db1813f7a3
Merge pull request #3434 from feitianbubu/fix/codex-cli-only-chat-completions
...
fix(gateway): enforce codex_cli_only restriction on /v1/chat/completions
2026-06-26 09:41:46 +08:00
Wesley Liddick
27278f62ed
Merge pull request #3467 from jianjianai/fix/invalid-refresh-token-nonretryable
...
fix(token-refresh): treat refresh_token_invalidated as non-retryable / 添加 refresh_token_invalidated 到不可重试列表
2026-06-26 09:40:04 +08:00
Wesley Liddick
38355ed204
Merge pull request #3436 from feitianbubu/fix/email-identity-error-shadowing
...
fix(auth): stop swallowing email auth identity create error via shadowed err
2026-06-26 09:38:49 +08:00
shaw
c9f42e1f77
fix(lint): gofmt token_refresh_service.go after refresh_token_invalidated addition
2026-06-26 09:34:20 +08:00
Elsa
cc7612bdbd
Detect OpenAI overloaded error codes
2026-06-25 21:18:39 +08:00
DaydreamCoding and Claude Opus 4.8
0112782049
fix(gateway-openai): codex spark 剥离 image_generation 工具,修复 502
...
gpt-5.3-codex-spark 为 text-only,不支持 image_generation 工具;codex CLI 默认
在 /responses 的 tools[] 携带该工具,导致 ChatGPT 后端返回 400
invalid_request_error(param=tools),被 mapUpstreamError 兜底成 502
"Upstream request failed"(真实 400 见 ops_error_logs.upstream_errors)。
新增 stripCodexSparkImageGenerationTools,对 spark 剥离客户端携带的
image_generation 工具(tools 清空则删键),接入三条路径:
- applyCodexOAuthTransformWithOptions:OAuth 全入口(responses/messages/chat-completions)
- buildUpstreamRequestOpenAIPassthrough 无条件 spark 块:覆盖 OAuth+APIKey
/responses,不受 image-generation 开关影响
- WS stripCodexSparkImageGenerationToolFromRawPayload:覆盖 WebSocket /responses
bridge 注入(ensureOpenAIResponsesImageGenerationTool)本就跳过 spark;真正的缺口
在 normalizeOpenAIResponsesImageGenerationTools 会规范化并保留客户端工具。
临时绕过=换非 spark 模型;关 bridge/allow_image_generation 无效(工具是客户端带的)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-25 17:27:19 +08:00
wucm667
650c50e34b
fix(antigravity): add project fallback for standard tier
2026-06-25 16:29:33 +08:00
wucm667
2b49d662cc
fix(openai): dedupe passthrough function call args
2026-06-25 16:18:11 +08:00
简简aw
0a97a5f461
fix(token-refresh): treat refresh_token_invalidated as non-retryable
2026-06-25 15:12:21 +08:00
haruka
dbdbfb1122
fix: avoid default codex instructions for chat bridge
2026-06-25 02:32:15 +08:00
deqiying
a2cf297d90
feat: 新增 OpenAI quota headroom 调度权重
2026-06-24 00:13:22 +08:00
hsn
65fa728921
fix(openai): fail over on chat transport errors
2026-06-23 22:53:20 +08:00
feitianbubu
82576e0a38
fix(auth): stop swallowing email auth identity create error via shadowed err
2026-06-23 19:29:17 +08:00
feitianbubu
ae5e980dd1
fix(gateway): enforce codex_cli_only restriction on /v1/chat/completions
2026-06-23 18:38:52 +08:00
404QAQ
9491de0a39
fix(images): pass content-moderation refusals through as 400 instead of retrying
...
When gpt-image upstream returns response.completed with no image but a text
refusal (content moderation, e.g. the model replies "this request was judged
unsafe to generate"), the soft-failure path treated it as a probabilistic
upstream failure and returned a retryable UpstreamFailoverError (502). Retrying
or switching accounts is futile for a content-policy block — it just burns
other accounts' quota and still surfaces an opaque 502 to the client.
Distinguish the two no-image cases:
(A) model text refusal -> 400 content_policy_violation, no retry, refusal
reason passed through to the client.
(B) truly empty response -> unchanged: retryable UpstreamFailoverError (502).
Adds extractOpenAIImagesModelRefusal (extracts the refusal text from
output_text.delta / message output_text, capped at 600 chars) and two unit
tests; the existing empty-response retry test is unaffected.
2026-06-23 16:57:16 +08:00
milesians
147c1879d9
fix(payment): support plural subscription validity units
2026-06-23 15:22:55 +08:00
syx0310
32df33a1c3
feat: add codex personal access token auth
2026-06-22 16:07:41 +00:00
wucm667
c6f375d3ab
fix(payment): 订阅订单应用充值汇率换算
2026-06-22 10:33:26 +08:00
wucm667
9f5b57fc96
fix(billing): 防止余额计费持续透支
2026-06-22 10:30:27 +08:00
haruka and Claude Opus 4.8
7c2fee6c99
fix(billing): dedup fallback pricing warn to stop per-request log spam ( #3394 )
...
The "[Billing] Using fallback pricing for model: X" warn was emitted on
every request for any model not in LiteLLM but matched by getFallbackPricing
(e.g. "glm-5.2" substring-matches the "glm-5" fallback price). Via the stdlib
log bridge it is inferred as WARN and persisted to ops_system_logs, producing
tens of thousands of rows/day. It fired even when channel pricing already
overrides the price, and from several call sites (resolver, account-stats
pricing, non-channel billing, admin lookup).
Dedup the warn at the source (BillingService.GetModelPricing) via a sync.Map
keyed by the already-lowercased model name, so each model logs at most once
per process while keeping one audit line. Billing amounts are unchanged.
Also clarify the model/mapping pattern conflict error to state that names are
matched case-insensitively, so an existing entry (e.g. "GLM-5.2") already
covers all case variants and the lowercase variant need not be added — the
behavior the issue mistook for a case-sensitivity bug.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-21 07:46:52 -07:00
shaw
6936687870
fix(lint): check WriteString return in summarizeOpenAIImagesNoOutputBody
...
修复 PR #3381 引入的 errcheck lint 错误,satisfy golangci-lint
对 strings.Builder.WriteString 返回值的检查要求。
2026-06-21 21:43:58 +08:00
Wesley Liddick
f079742bab
Merge pull request #3371 from cugxuan/feat/subscription-affiliate-rebate
...
feat: apply affiliate rebate to subscription payments
2026-06-21 21:18:50 +08:00
Wesley Liddick
a560d2f91e
Merge pull request #3363 from kangjwme/feat/prefer-soonest-reset-scheduling
...
feat(scheduling): opt-in "prefer soonest reset" account selection
2026-06-21 21:17:44 +08:00
Wesley Liddick
6e27b82335
Merge pull request #3381 from 404QAQ/fix/images-incomplete-failover
...
fix(images): 识别 response.incomplete 触发 failover + 记录软失败上游响应
2026-06-21 21:14:48 +08:00
Wesley Liddick
f6d734ec23
Merge pull request #3308 from a0yark/fix/gemini-tool-schema-cleanup
...
fix(gemini): clean unsupported tool schema fields
2026-06-21 21:14:09 +08:00
Wesley Liddick
af1a032d35
Merge pull request #3375 from StarryKira/fix/3358-vertex-beta-and-cch
...
fix(gateway): filter anthropic-beta on the Vertex Anthropic path + drop cch sign (#3358 )
2026-06-21 21:13:14 +08:00
Wesley Liddick
93de19665b
Merge pull request #3359 from alfadb/fix/glm-effort-mapping
...
修复 GLM 推理强度映射
2026-06-21 21:12:46 +08:00