8474 Commits
Author SHA1 Message Date
Wesley Liddick 4233cc3d80 Merge pull request #9121 from Wei-Shaw/fix/moderation-anthropic-url-image
fix(moderation): moderate Anthropic URL image sources
2026-11-27 18:35:51 +08:00
shaw 959d365324 fix(moderation): moderate Anthropic URL image sources
Content moderation collected Anthropic image blocks only from source.data, never
from source.url. Since #8312 the /v1/messages -> OpenAI Responses bridge forwards
URL image sources upstream as input_image, so an image sent as
{"type":"url","url":...} (including a data: URI) reached the model without
being moderated, while the same image sent as base64 was. The native Anthropic
path forwarded such images unmoderated as well.

Collect source.url like the other image URL fields; addModerationImage still
accepts only http(s) and data: values.
2026-11-27 18:03:17 +08:00
Wesley Liddick 8aa4d39288 Merge pull request #9115 from NewtonCookie/fix/anthropic-chat-usage
fix: sample Claude usage on chat completions
2026-11-27 17:06:19 +08:00
Wesley Liddick aaec3887d0 Merge pull request #8843 from r266-tech/codex/oauth-deadline-clock-fixture
test(oauth): make late refresh deadline deterministic
2026-11-27 17:06:15 +08:00
Wesley Liddick a2df5a86e9 Merge pull request #8839 from r266-tech/codex/precontent-keepalive-clock-fixture
test(antigravity): stabilize repeated pre-content keepalives
2026-11-27 17:06:11 +08:00
Wesley Liddick d3ae7a17a6 Merge pull request #8756 from r266-tech/codex/synchronize-ws-ttft-fixture
test(openai): synchronize WebSocket TTFT fixtures
2026-11-27 17:06:07 +08:00
Wesley Liddick affdc20c02 Merge pull request #8705 from lzj960515/fix/request-memory-lifecycle
fix(gateway): 减少长会话请求的内存分配与持有
2026-11-27 17:06:02 +08:00
Wesley Liddick 7c6cbda974 Merge pull request #8596 from lkon2112/fix/grok-quota-test-races
test(grok): synchronize free-quota refresh tests
2026-11-27 17:05:57 +08:00
Wesley Liddick f7e0191ac2 Merge pull request #8355 from Yukinoshita-Yukino/codex/kimi-k31-minimal-support
fix(kimi): add K3.1 Pro routing, Codex reasoning and default pricing
2026-11-27 17:05:52 +08:00
Wesley Liddick 25a65452f2 Merge pull request #8312 from zyh-y/fix/anthropic-url-image-sources
fix(apicompat): preserve Anthropic URL image sources
2026-11-27 17:05:48 +08:00
Wesley Liddick 1d65de5cae Merge pull request #8295 from r266-tech/codex/fix-responses-tool-failover
fix(openai): fail over Sol/Terra tool requests on Chat-only accounts
2026-11-27 17:05:43 +08:00
Wesley Liddick 6e537028d4 Merge pull request #8254 from AndersonBY/codex/fix-quota-label-overlap
fix(frontend): keep long quota labels clear of progress bars
2026-11-27 17:05:39 +08:00
Wesley Liddick 6215b9fe5f Merge pull request #8246 from AndersonBY/codex/antigravity-parallel-tool-images
fix(antigravity): keep parallel tool results contiguous across notices
2026-11-27 17:05:35 +08:00
Wesley Liddick 18f8813da3 Merge pull request #8245 from AndersonBY/codex/antigravity-local-usage-stats
fix(accounts): show local Antigravity usage statistics
2026-11-27 17:05:31 +08:00
Wesley Liddick eaf4521e78 Merge pull request #8217 from r266-tech/codex/compact-failure-model
fix(responses): include model in compact failure events
2026-11-27 17:05:26 +08:00
Wesley Liddick 2b47d8a36c Merge pull request #7672 from william-drakemond/fix/updater-require-checksum
fix(update): 在线更新强制校验 checksum,缺失时拒绝安装
2026-11-27 17:05:22 +08:00
shaw fa375e60e1 fix(kimi): keep stripping the Codex none placeholder for K3.1
The previous Codex catalog advertised only "none" for k3.1-pro, so Codex
clients that still hold it send reasoning.effort=none. Preserving none for
K3.1 made those requests fail upstream with HTTP 400 (K3.1 cannot disable
thinking) instead of running at the default effort as they do today.

Keep the existing compatible-upstream rule on the Responses path: strip the
none placeholder for K3.1 exactly like every other Kimi model. The new
catalog no longer advertises none, so current clients are unaffected.
2026-11-27 16:29:02 +08:00
shaw 8950e12524 fix(gateway): keep OpenCode session hints valid JSON
openCodeSessionHintBody built the hint with strconv.Quote, which emits Go
escapes such as \U000f0001 that are not JSON. A session id containing such a
rune (private-use or tag characters, e.g. subdivision flag emoji) was read
back truncated, so different conversations could share one
x-opencode-session. Encode with json.Marshal instead.

Also measure the compaction allocation budget in a child test process, as
main already does for other process-wide allocation counters, so background
goroutines left by other service tests cannot fail it intermittently.
2026-11-27 16:27:11 +08:00
shaw cbe5bfd1cb fix(gateway): sample Claude usage on the Responses bridge too
The Anthropic /v1/responses bridge had the same gap as the Chat Completions
bridge: successful OAuth/setup-token responses never refreshed the 5h/7d
subscription windows. Sample the response headers on 2xx exactly like the
Chat Completions path, and cover both bridges in one regression test.
2026-11-27 16:25:22 +08:00
Wesley Liddick e38f8ad784 Merge pull request #9118 from Wei-Shaw/fix/proxy-selector-account-count
fix(accounts): 代理下拉框右侧显示账号数并在打开弹窗时刷新
2026-11-27 15:07:05 +08:00
Wesley Liddick 96148ee93b Merge pull request #9117 from Wei-Shaw/fix/issue-8992-image-safety-risk-control
fix(risk-control): 生图安全系统拒绝纳入风控中心(仅留证)
2026-11-27 15:06:28 +08:00
shaw 397f66aebf fix(risk-control): tighten image safety detection and display
Review follow-up:

- Stop treating parameter errors as safety rejections. The message
  matcher no longer uses a bare "moderation" keyword and rejects
  "unknown/unrecognized/unsupported parameter" style messages, so
  Azure-style "Unrecognized request argument supplied: moderation"
  (param null) and error-passthrough rewrites (which drop param/code)
  are not recorded with the user's prompt.
- Check explicit safety codes before the param exclusion, so Azure
  content filtering (code=content_filter, param=prompt), contentFilter
  and ResponsibleAIPolicyViolation are recorded; response_incomplete is
  only a 400 for content_filter/moderation reasons and counts as well.
- Show image_safety rows with the hit badge instead of the amber error
  badge, and exclude them from the "error" result filter.
2026-11-27 14:45:25 +08:00
shaw 2ad419706d fix(accounts): keep older proxy counts when a newer refresh fails
Review follow-up for the proxy account count refresh:

- Apply a proxy list response only if it is newer than the last applied
  one. Previously a failed newer refresh also discarded a slower older
  success, which could leave the selector empty.
- Refresh proxy counts on every `created` event. Batch creation can
  partially succeed and keep the dialog open, so opening the dialog was
  not enough.
- Test ProxySelector with the real vue-i18n and locale files instead of
  a hand-written mock of the plural rule.
2026-11-27 14:39:04 +08:00
r266-tech abe5903a17 Merge main and use the upstream allocation test isolation 2026-11-27 15:07:06 +09:00
shaw fd2f9770a2 fix(accounts): show proxy account counts on the right and keep them fresh
The proxy selector in the account dialogs showed a bare number next to
the proxy name, and AccountsView loaded the counts only once on mount,
so they went stale after accounts were created, deleted, imported or
rebound.

- Show "N 个账号" / "N account(s)" on the right of each proxy row, before
  the test button, with a tooltip.
- Reload proxies with counts whenever the create, edit or bulk-edit
  dialog opens. A sequence guard drops out-of-order responses and a
  failed reload keeps the previous list.
2026-11-27 13:51:37 +08:00
shaw 75e6df8f4a fix(risk-control): record image safety-system rejections in the risk center
Image requests rejected by the upstream safety system (for example
"Your request was rejected by the safety system") were only visible in
the ops error log. They are now also written to the risk control center
as log-only evidence (action=image_safety, mode=risk_control_log_only):
no hash blacklist, no auto-ban count, no email, response unchanged.

Detection covers HTTP 400 from the native Images API, SSE/Responses
error events, model refusal text and content_filter incompletes. 400s
carrying error.param (e.g. an invalid `moderation` value) are excluded.
The record uses the gateway request ID from context so it joins with the
ops error log; the response header may carry the upstream x-request-id.

Refs #8992
2026-11-27 13:51:32 +08:00
NewtonCookie 650fab97d2 fix: sample Claude usage on chat completions 2026-11-27 11:40:40 +08:00
Wesley Liddick dedeb65c1d Merge pull request #9107
feat(openai): 同步 Codex v0.172.0 内置基础提示词并补齐 5.6/6.0 模板
2026-11-27 10:32:46 +08:00
Wesley Liddick 212f5e5dcf Merge pull request #9105
fix(antigravity): honor group mcp_xml_inject in Claude transform options
2026-11-27 10:32:38 +08:00
Wesley Liddick 187d8e5bbf Merge pull request #9049
fix(gateway): report Anthropic thinking_tokens as reasoning_tokens
2026-11-27 10:32:30 +08:00
Wesley Liddick 8feae1b49c Merge pull request #9042
feat(usage): add toggleable username column to admin usage table and export
2026-11-27 10:32:22 +08:00
Wesley Liddick 3273ae9913 Merge pull request #9027
fix(frontend): theme the MCP consent dropdowns with the common Select
2026-11-27 10:32:14 +08:00
Wesley Liddick 07c52fe25b Merge pull request #9005
test(gateway): measure signed-history allocations in a child process
2026-11-27 10:32:06 +08:00
Wesley Liddick ca236afc8c Merge pull request #9001
fix(antigravity): skip SSE comment keepalives for js-genai < 1.32 (Gemini CLI)
2026-11-27 10:31:58 +08:00
Wesley Liddick 8ac5f4de71 Merge pull request #8987
fix(antigravity): honor final retry reset when cooling models
2026-11-27 10:31:50 +08:00
r266-tech 126d7743e2 fix(responses): include requested model in compact failure events 2026-11-27 05:24:43 +09:00
forgottener 6637b280aa fix(gateway): report Anthropic thinking_tokens as reasoning_tokens
Anthropic reports thinking tokens in usage.output_tokens_details.thinking_tokens,
a subset of output_tokens. AnthropicUsage had no such field, so Anthropic
accounts served through /v1/chat/completions and /v1/responses never exposed
reasoning_tokens.

Decode the field, carry it through the stream state and the buffered
ClaudeUsage merge (a reported value, even 0, replaces the previous one), and
emit it as Responses output_tokens_details.reasoning_tokens, which the existing
Responses-to-Chat mapping turns into completion_tokens_details.reasoning_tokens.
Billing is unchanged.

Fixes #9048
2026-11-27 01:26:37 +08:00
liaozijian 85cf114332 fix(gateway): reduce large request allocation and retention 2026-11-26 17:39:29 +08:00
Kripto c5622ce6cf feat(openai): 同步 Codex v0.172.0 内置基础提示词并补齐 5.6/6.0 模板
- 新增 gpt-5.6、gpt-6-sol、gpt-6-luna 内置基础提示词并接入 CodexBaseInstructionsForModel。
- 将 gpt-5.1、gpt-5.2、gpt-5.5、gpt-6-astra 及 gpt-6.1/gpt-6.2 描述文件中的提示词模板同步至 openai/codex rust-v0.172.0,保留既有模型 catalog 元数据不变。
- 补齐 CodexBaseInstructionsForModel 单元测试覆盖。
2026-11-26 03:52:33 -04:00
SipengXie2024 b5e9549c54 fix(antigravity): honor group mcp_xml_inject in Claude transform options 2026-11-26 04:35:01 +00:00
Wesley Liddick 81ce8356d9 Merge pull request #9094 from pood1e/feat/declare-image-input-models
feat(codex): let accounts declare image-input models
2026-11-26 12:06:32 +08:00
shaw 06e7a2ed4b Merge branch 'main' into feat/declare-image-input-models
# Conflicts:
#	backend/internal/service/openai_codex_models_service.go
2026-11-26 11:50:34 +08:00
Wesley Liddick eef63ee7cd Merge pull request #9099 from PMExtra/feat/channel-expose-response-model
feat(channel): 渠道支持向用户显示实际响应模型
2026-11-26 11:49:58 +08:00
Wesley Liddick 76d8d976d5 Merge pull request #9095 from pood1e/fix/anthropic-bridge-deepseek-default-effort
fix(openai): default DeepSeek effort to high in the Anthropic bridge
2026-11-26 11:49:45 +08:00
Wesley Liddick 3db5753641 Merge pull request #9093 from pood1e/feat/openai-chat-reasoning-content
feat(openai): let API-key accounts opt into reasoning_content on raw Chat Completions
2026-11-26 11:49:32 +08:00
Wesley Liddick 164d7056ed Merge pull request #9088 from PMExtra/feat/proxy-ip-checked-at
feat(proxy): 代理列表显示出口 IP 与最后检测时间
2026-11-26 11:49:18 +08:00
Wesley Liddick 7b2a5f5d48 Merge pull request #9087 from wucm667/fix/issue-9086-tooltip-scroll
fix(frontend): keep help tooltips aligned after scrolling
2026-11-26 11:49:05 +08:00
Wesley Liddick 821701e45b Merge pull request #9085 from adamcjm/fix/opencode-user-agent-version
fix(opencode): 上游 User-Agent 版本更新至 1.19.6 并支持环境变量覆盖
2026-11-26 11:48:52 +08:00
Wesley Liddick ab00fef989 Merge pull request #9084 from r266-tech/codex/command-code-image-modalities
fix(codex): include Command Code image capabilities in model catalogs
2026-11-26 11:48:38 +08:00
Wesley Liddick bb7fb85cd5 Merge pull request #9081 from bin-bash-dev/fix/sse-keepalive-retry-accounting
fix(openai): account SSE keepalive bytes across failover attempts
2026-11-26 11:48:25 +08:00