Commit Graph
8336 Commits
Author SHA1 Message Date
Aomsir 9534f1c089 fix(grok): 提高删除图标对比度并补齐同步按钮 Label in Name 2026-10-25 18:20:24 +08:00
Aomsir 7f18239be2 fix(grok): 对齐模型编辑布局与响应式展示 2026-10-25 18:00:25 +08:00
Aomsir 21b5b49d0a fix(grok): 统一目录同步入口并保留模式隔离 2026-10-25 17:20:25 +08:00
Aomsir 32c00d6e72 fix(grok): 诊断文案不再读取继承属性 2026-10-25 17:02:27 +08:00
Aomsir c68d312372 fix(grok): 未知目录详情改为历史标题 2026-10-25 16:52:41 +08:00
Aomsir 0d374b2549 fix(grok): 精简目录诊断并按需展开详情 2026-10-25 16:43:24 +08:00
shaw 3f1c8f36ce chore: update Sponsors 2026-10-25 13:32:13 +08:00
wucm667 e6bde6b3c6 fix(billing): retain native cache creation accounting 2026-10-25 11:28:55 +08:00
wucm667 835803a702 fix(antigravity): preserve task-bearing identity preambles 2026-10-25 11:28:41 +08:00
Aomsir 02db748cd5 fix(grok): 保留受管目录快照并阻止非法时间与敏感失败日志 2026-10-25 07:48:04 +08:00
Aomsir 2db7ce3d25 fix(grok): 隔离过期目录同步并在切模式后刷新诊断 2026-10-25 07:07:13 +08:00
Aomsir ae5705da1d fix(grok): 同账号刷新不再卡住目录同步 2026-10-25 06:42:46 +08:00
Aomsir 60931bce31 fix(grok): 展示模型目录诊断并保留编辑草稿 2026-10-25 06:32:46 +08:00
Aomsir bb11e83c44 fix(grok): 裸别名无法核验且自定义 ID 保留大小写 2026-10-25 06:06:51 +08:00
Aomsir d4136cea5e fix(grok): 提供账号模型目录差异诊断 2026-10-25 05:52:29 +08:00
Aomsir 635b835350 fix(grok): 让旧后台观察测试走 CAS 持久化 2026-10-25 05:28:25 +08:00
Aomsir 41a6ff8ac1 fix(grok): 对齐手动同步与后台目录观察 2026-10-25 05:20:04 +08:00
Aomsir b1cb2eb1f3 fix(grok): 补齐取消与调用方事务的回归断言 2026-10-25 04:50:35 +08:00
Aomsir 87266a7b18 fix(grok): 原子保存模型目录观测快照 2026-10-25 04:31:24 +08:00
Aomsir 6202da0f53 fix(grok): 统一模型目录解析与观测状态 2026-10-25 04:03:49 +08:00
Aomsir d01f2eb42c fix(grok): 固定聚合前序模型审计并跳过非 Grok 2026-10-25 03:38:40 +08:00
Aomsir 7131b997ca fix(grok): 补齐聚合路径跨事件模型冲突 2026-10-25 03:18:00 +08:00
Aomsir 014cc016f9 fix(grok): 补全原生 Responses 响应模型审计 2026-10-25 03:05:31 +08:00
r266-tech 917dbdc705 fix(gemini): count fileData image outputs for billing 2026-10-24 22:15:21 +08:00
wx-11 aa1a1b11c8 fix(billing): gate per-image billing by endpoint and pricing mode
- Require per-request/image mode for group image pricing so token-mode
  group cards no longer settle images at $0.
- Force per-image billing for channel token pricing when the group switch
  is enabled, matching the OpenAI pipeline.
- Add an ImageEndpoint marker so the switch only applies to dedicated
  image endpoints; mixed Responses/Chat/WS requests keep token billing.
- Only fall back to one image when the switch is enabled, preserving the
  previous count semantics when it is off.
- Validate image_count_billing in GroupService and gate the admin
  checkbox on allow_image_generation.
- Bump the API key auth snapshot version for the new group field.
2026-10-24 18:56:31 +08:00
wx-11 cb2959245f test(api): include image_count_billing in available groups contract 2026-10-24 12:40:01 +08:00
wx-11 1487fa511b fix(billing): count only images returned in upstream response 2026-10-24 12:23:30 +08:00
wucm667 efc58486d8 fix(usage): preserve authoritative cache creation totals 2026-10-24 12:16:53 +08:00
wucm667 c91c594cc8 chore: sync latest upstream changes 2026-10-24 12:16:32 +08:00
wx-11 fd998129ec feat(billing): support per-image billing for multi-image requests
按实际出图张数计费,解析不到时回退请求 n;新增分组级 image_count_billing 开关,仅对 OpenAI 和 Composite 分组开放;前端在图片计费区域提供按张计费勾选项。
2026-10-24 11:35:27 +08:00
wucm667 6f2faba293 fix(openai): validate synthesized effort after policy mapping 2026-10-24 11:28:25 +08:00
wucm667 355675af2d chore: sync latest upstream changes 2026-10-24 11:28:25 +08:00
Wesley Liddick 37067e8e34 Merge pull request #8319 from lyen1688/feat/scoped-admin-api-keys
新增按操作和资源范围授权的管理员 API Key
2026-10-24 10:12:37 +08:00
lyen1688 e445cc3e2d 新增按操作与资源范围授权的管理员 API 密钥 2026-10-23 19:16:57 +08:00
wucm667 01a1a78db2 fix(antigravity): neutralize stale system identities on forwarding 2026-10-23 19:12:24 +08:00
github-actions[bot] 5c185c5c5d chore: sync VERSION to 0.2.18 [skip ci] 2026-10-23 07:44:16 +00:00
SipengXie2024 9aa16c8c66 fix(pagination): validate numeric ranges and reuse safe offsets
Use strconv to reject pagination values outside the native int range,
reuse PaginationParams.Offset for API key slices, and derive test bounds
from math.MaxInt. Cover parsing, response metadata, strict handlers, and
in-memory pagination at the arithmetic boundaries.
2026-10-23 15:24:24 +08:00
shaw ac1b8f1271 chore: update sponsors v0.2.18 2026-10-23 15:24:04 +08:00
shaw 8286268047 fix(deps): bump dompurify to 3.4.17 for GHSA-cg2g-xh64-v4q7 / GHSA-mrv2-3pqr-j5jr
DOMPurify <=3.4.16 is affected by two advisories published 2026-10-22:
- GHSA-cg2g-xh64-v4q7 (critical): SAFE_FOR_TEMPLATES bypass via split
  template expressions in attached shadow root content on DOM output modes
- GHSA-mrv2-3pqr-j5jr (high): IN_PLACE hook removing a parent/sibling leaves
  detached subtree event handlers armed

Bump the direct dependency and the pnpm override floor to 3.4.17 so the
mermaid-transitive copy dedupes to the same patched version. Lockfile-only
regen via pnpm 9 (matches CI); no other package changes.
2026-10-23 14:07:16 +08:00
Wesley Liddick c5b811284a Merge pull request #8305 from apple050620312/fix/openai-overload-recovery-20261023
fix(openai): 缓解 Codex overload 并恢复空流事件后的安全重试
2026-10-23 13:49:37 +08:00
apple050620312 c591412c42 fix(openai): 合并 Codex overload 身份与空流安全重试修复 2026-10-23 01:51:48 +08:00
SipengXie2024 f965280489 fix(pagination): keep page offsets from overflowing int
A page such as 9223372036854775807 passed every pagination check, so
(page-1)*pageSize wrapped around. With an even page size the offset
became negative and PostgreSQL rejected the query with "OFFSET must not
be negative"; paths that slice in memory (paginateSlice, balance history
merge) panicked with a negative slice bound. Both surfaced as HTTP 500 on
list endpoints such as /api/v1/admin/users, /api/v1/usage, /api/v1/keys
and /api/v1/admin/payment/orders.

- PaginationParams.Offset saturates Page at MaxInt/limit, so offset and
  offset+limit both stay within int.
- ParsePagination clamps page the same way, which covers the repositories
  that compute (page-1)*pageSize themselves.
- The prompt audit event list and the OpenAI token stats filter parse page
  on their own; they now reject an overflowing page with 400, like other
  invalid pagination input there.
2026-10-22 16:37:56 +00:00
feeeei 4197fa6202 feat(gemini): 同账号重试次数改为可配置 gateway.max_same_account_retries_gemini
Gemini 三条转发路径(原生 v1beta、Claude 兼容、Chat 兼容)对 429/5xx 等可重试
上游错误的同号重试次数读取 gateway.max_same_account_retries_gemini(不含首次请求,
默认 4,范围 0–10),取代写死的每号 5 次请求。默认值下不涉及签名降级的请求仍是
每号最多 5 次。

Claude 兼容路径的签名错误两阶段降级重发不占用同号重试次数:每进入一个降级阶段
循环上限顺延一次,重试次数调小时第二阶段降级照常执行,循环不会带着已关闭的响应体
退出。默认配置下先降级再遇瞬时错误的请求单号最多 7 次请求。
2026-10-22 12:14:55 +08:00
coder-zhw de908ed6d2 fix(ratelimit): 国产 Coding Plan 的频率型 429 改用秒级冷却
国产 Coding Plan 账号收到 429 时一律冷却到配额快照里最早的窗口重置点
(cooldownCNProviderToQuotaSnapshotReset)。但智谱对 Coding Plan 另有一层
请求频率限制,实测文案「您的账户已达到速率限制,请您控制请求频率」,此时
窗口额度往往只用了 10%~20%:一次并发突发就会把账号停调到 5h 窗口结束
(线上实测 1.5~4.8 小时),把「限频」误伤成「额度耗尽」。

改为按响应文案区分:命中频控文案、且快照显示窗口仍有可观余量(任一窗口
< 90%)时,不再走窗口冷却,交给默认 429 兜底 apply429FallbackRateLimit
(管理端可配,默认 5s)。两条护栏:
- 文案里同时出现额度类词(额度 / quota / usage limit / insufficient 等)
  一律不降级;
- 快照缺失、或任一窗口 >= 90% 一律不降级 —— 宁可多停调,也不要把真正的
  额度耗尽当成限频反复重试。

窗口真正耗尽时行为完全不变;余额不足路径(临时停调)也不受影响。
2026-10-22 11:42:54 +08:00
Wesley Liddick dba770d56a Merge pull request #8170 from StarryKira/fix/issue-8119-grok-fast-pricing
fix(billing): Grok 4.7 Fast 按官方 Fast 价卡计费 (#8119)
2026-10-22 10:33:03 +08:00
Wesley Liddick 21cc926933 Merge pull request #8275 from apple050620312/fix/docker-go-1.27.3
fix(build): 对齐 Docker 默认 Go 镜像至 1.27.3
2026-10-22 08:44:45 +08:00
apple050620312 59100d324e fix(build): 对齐上游 Go 1.27.3 镜像版本 2026-10-21 22:53:30 +08:00
shaw 7da09cab4e chore: update sponsors 2026-10-21 20:19:37 +08:00
Wesley Liddick aa48a8bbd8 Merge pull request #8255 from wucm667/fix/issue-8248-cloudflare-json-403
fix(ratelimit): avoid penalizing Cloudflare 1010 blocks
2026-10-21 20:09:19 +08:00
Wesley Liddick 888c605733 Merge pull request #8188 from wucm667/fix/issue-8187-tool-schema-constants
fix(tools): normalize parameter constants and annotations
2026-10-21 20:09:06 +08:00