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
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
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
lyen1688
e445cc3e2d
新增按操作与资源范围授权的管理员 API 密钥
2026-10-23 19:16:57 +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
apple050620312
c591412c42
fix(openai): 合并 Codex overload 身份与空流安全重试修复
2026-10-23 01:51:48 +08:00
Wesley Liddick
98f83b7263
Merge pull request #8167 from feeeei/fix/gemini-group-image-generation-gate
...
fix(gemini): 分组「允许当前分组生图」开关对 Gemini 系入口生效
2026-10-21 17:43:01 +08:00
Wesley Liddick
4c7e9b5b6b
Merge pull request #8166 from feeeei/feat/vertex-account-quota
...
feat(account): Vertex 账号支持配额上限
2026-10-21 17:42:28 +08:00
Wesley Liddick
9a1680042a
Merge pull request #8267 from wucm667/fix/issue-8266-security-scan
...
fix(security): clear dependency security scan failures
2026-10-21 16:54:56 +08:00
Wesley Liddick
d744c22016
Merge pull request #8142 from qhmhyp/fix/account-filter-persistence
...
fix(accounts): persist platform and status filters
2026-10-21 16:54:21 +08:00
wucm667
cacc80b862
fix(security): clear dependency security scan failures
2026-10-21 15:27:29 +08:00
feeeei
47cb84b8b0
fix(gemini): 分组「允许当前分组生图」开关对 Gemini 系入口生效
...
- 门禁作用于展示该开关的 Gemini 系分组(gemini/antigravity/composite);无分组 Key、
anthropic 等其他平台分组不受影响,OpenAI/Grok 仍走各自门禁
- 生图判定:复用图片接口的 gemini-*-image 判定(isGeminiCompatibleImageModel),或请求体
generationConfig.responseModalities 含 IMAGE(camelCase/snake_case、字符串/整数枚举、
重复键逐个检查);countTokens 不拦
- 两道检查:/v1/messages、/v1/chat/completions、/v1/responses、/v1beta/models 入口在
选号前按客户端请求名与渠道映射名预检;Gemini 兼容与 Antigravity 的 6 个转发函数在
账号模型映射后再按上游模型名检查,覆盖账号级别名
- 拒绝统一返回 400(Gemini 原生 INVALID_ARGUMENT,其余 invalid_request_error),
不触发换号与账号处罚,下游 sub2api 把本实例当上游时不会因此停用账号;
请求标记为本地功能门禁
- 升级兼容:迁移 246 把存量 gemini/antigravity 分组的生图开关置为开启;新建分组与简易
模式默认分组对 gemini/antigravity 默认开启(与 grok 同为 OR 语义,创建时传 false 不生效),
前端创建表单同步默认值;composite 不回填(同一开关还控制 OpenAI 生图),未开启的
composite 分组升级后 Gemini 生图返回 400
- 未覆盖:最终模型名不符合 gemini-*-image 形态(如上游中转自定义的 nano-banana 别名)
且请求体未声明 IMAGE 模态;门禁按 Key 所属分组判断,Claude Code 专用分组降级到
其他分组时仍按原分组
2026-10-19 23:53:29 +08:00
feeeei
d6120b5d8e
feat(account): Vertex 账号支持配额上限
...
- 新增 AccountTypeSupportsQuota / SupportsAccountQuota(apikey/bedrock/service_account)
作为配额账号类型的唯一判定,累加、超限停调度、额度通知、接口输出与计费仓储统一改用;
池模式等其它特性仍只看 IsAPIKeyOrBedrock
- service_account 配额语义与 apikey 一致:配置了任一上限才累加,用满停调度,跨阈值发额度通知
- 计费事务中账号已删除时跳过账号配额计数,与 API Key 对称,用户扣费不再整笔回滚
- 账号额度通知只对配置了上限的账号做检查
- 前端创建/编辑弹窗对 Vertex 开放配额设置,设上限后用量列显示配额进度条;
账号类型判断收敛到 supportsAccountQuota
2026-10-19 23:31:46 +08:00
Wesley Liddick
b14f316ca2
Merge pull request #8080 from SipengXie2024/fix/openai-messages-web-search-emulation
...
fix(openai): emulate web_search on /v1/messages for OpenAI API key accounts
2026-10-16 12:27:52 +08:00
ahe
7fcaa32db4
fix(accounts): persist platform and status filters
2026-10-16 11:54:50 +08:00
haruka and Claude Opus 5.5
f996b0bfaa
fix(payment): load Stripe client secret from the local order snapshot
...
The /payment/stripe route no longer carries client_secret in its query.
The page reads it from the recovery snapshot written when the order was
created and requires the snapshot order to match order_id, consistent
with AirwallexPaymentView.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-15 21:38:52 +08:00
shaw
c2cca510f2
revert(accounts): restore inline account filters ( #7853 )
...
Revert 679a7186f ("feat(accounts): compact account search and filters"),
which moved the type / privacy / group filters behind a collapsed
"More filters" panel on /admin/accounts.
Polish on top of the revert:
- Widen the privacy select (w-48) so "全部Privacy状态" / "All Privacy States"
no longer truncates.
- Narrow the search input to w-52 so all six controls fit on one row at 1440px.
- Below sm, lay the filters out as a two-column grid that fills the width
instead of fixed-width selects with a ragged edge.
2026-10-15 20:44:29 +08:00
Long Li
373d43533a
feat(antigravity): support Gemini 4 Argon and accurate upstream model catalogs
2026-10-15 02:06:23 +09:00
SipengXie2024
26e55cf332
fix(openai): emulate web_search on /v1/messages for OpenAI API Key accounts
...
Chat Completions conversion drops Anthropic web_search tools, so Claude
Code's WebSearch on OpenAI-platform groups (e.g. DeepSeek upstreams)
got no web_search_tool_result and reported 0 results. Run the existing
search emulation in ForwardAsAnthropic and let OpenAI API Key accounts
opt in via extra.web_search_emulation.
2026-10-14 07:02:52 +00:00
shaw
9d5e63a598
合并 main 并解决 PR #7828 的测试文件冲突
...
完整保留临时不可调度规则作用范围测试与 Gemini 显式缓存测试;保留双方生产代码改动。
2026-10-13 14:59:02 +08:00
Wesley Liddick
53c21fed25
Merge pull request #8006 from feeeei/feat/gemini-explicit-cache
...
feat(gemini): 支持显式上下文缓存,并完善 Vertex 与第三方 API Key 账号
2026-10-13 14:51:11 +08:00
Wesley Liddick
7c5afa4c36
Merge pull request #7957 from xcrong/feat/haiku-5-5-support-7919
...
feat(gateway): adapt Claude Haiku 5.5
2026-10-13 14:50:40 +08:00
shaw
c4bdc48475
fix(haiku): 修正采样边界、默认模型配置与 lint
2026-10-13 14:38:16 +08:00
Wesley Liddick
ab80abc6d1
Merge pull request #7960 from feeeei/feat/group-i18n
...
feat(groups): 分组名称与描述支持多语言
2026-10-12 22:16:51 +08:00
Wesley Liddick
e468262294
Merge pull request #8002 from obst4cle/fix/group-rpm-override-stale-load
...
fix(groups): ignore stale RPM override loads
2026-10-12 14:38:14 +08:00
Wesley Liddick
6a6d4728a0
Merge pull request #7696 from a408665321/codex/issue-7687-timer-only
...
fix(ui): refresh usage countdown when tab becomes visible
2026-10-12 14:37:26 +08:00
Wesley Liddick
832677a5e6
Merge pull request #7717 from ouchihao/codex/bug-payment-countdown-drift
...
fix(payment): calculate QR countdowns from elapsed time
2026-10-12 14:37:11 +08:00
Wesley Liddick
c2885c430f
Merge pull request #7738 from r266-tech/codex/monitor-add-platform
...
fix(monitor): allow adding missing platforms in v2 settings
2026-10-12 14:36:41 +08:00
Wesley Liddick
59fb22791e
Merge pull request #7933 from yan9651688/feat/issue-7926-ops-details-account-column
...
feat(ops): show account names in request details table
2026-10-12 14:36:28 +08:00
Wesley Liddick
20b0be5b05
Merge pull request #7969 from ouchihao/codex/bug-ops-custom-timezone
...
fix(ops): initialize custom time ranges in local time
2026-10-12 14:36:12 +08:00
Wesley Liddick
d70265306b
Merge pull request #7970 from ouchihao/codex/bug-select-ime-navigation
...
fix(select): preserve keyboard input during IME composition
2026-10-12 14:35:53 +08:00
Wesley Liddick
f2b1556bd4
Merge pull request #7972 from ouchihao/codex/bug-group-rate-edit-validation
...
fix(groups): reject nonpositive rate multiplier edits
2026-10-12 14:35:37 +08:00
Wesley Liddick
0ae1b371fa
Merge pull request #7973 from ouchihao/codex/bug-monitor-auto-detail-refresh
...
fix(monitor): refresh cached availability on automatic reload
2026-10-12 14:35:24 +08:00
Wesley Liddick
da9799542d
Merge pull request #7974 from ouchihao/codex/bug-gemini-auth-url-error
...
fix(gemini): preserve authorization URL error messages
2026-10-12 14:35:12 +08:00
feeeei
c9e4b267b6
fix(account): 同步上游模型失败时显示后端返回的错误原因
...
- apiClient 拒绝的是普通对象而非 Error,原写法 instanceof Error 恒为假,
错误提示被替换成通用文案"同步上游模型失败:同步上游模型失败"
- 白名单选择器与 Antigravity 同步按钮改用 extractApiErrorMessage 取消息
2026-10-10 23:37:48 +08:00
feeeei
1c68f9996d
feat(gemini): 适配 AI Studio AQ. 格式 Key
...
- AI Studio 新建 Key 为 AQ.Ab 前缀的 auth key:logredact.RedactText 与
渠道监控 sanitizeErrorMessage 增加 AQ.Ab 规则,长度按 40 位以上放宽以覆盖格式变体
- 创建 / 编辑账号的 Key 占位符改为 AQ.Ab...,提示文案说明新旧两种前缀
与第三方上游 Key
2026-10-10 23:37:48 +08:00
feeeei
2588675ce7
fix(gemini): 第三方上游 API Key 与 Vertex 不再套用 AI Studio 等级和模拟配额
...
- 按 base_url 判定上游:非官方地址的 Gemini API Key 账号视为第三方上游
- 第三方上游与 Vertex 不返回本地模拟配额,隐藏等级与配额说明;
账号列表中第三方上游按普通 Key 账号展示今日统计与额度进度条,
Vertex 显示 vertex 徽章与今日统计
- 第三方上游的 429 只认显式重试时长,否则走全局 429 兜底冷却,
不按每日配额冷却到 PST 午夜
- 创建账号:第三方 Base URL 不显示 AI Studio 等级选项,也不写入 tier_id;
API 密钥卡片标题与说明不再限定 AI Studio,免费层说明只在官方 Base URL 下显示;
OAuth 等级回退下拉只在 OAuth 表单显示
2026-10-10 23:37:48 +08:00
feeeei
81e6ec5346
feat(gemini): Vertex 账号支持 API Key 认证
...
- Gemini 平台的 Vertex 账号新增 API Key 认证(credentials.auth_mode=apikey),
不填 Project ID 走全局端点,填写后走项目级端点,Key 通过 x-goog-api-key 传递;
Anthropic 平台的 Vertex 账号仍只支持 Service Account JSON
- 转发(Claude 兼容 / 原生 / Chat Completions)与测试连接统一走
buildVertexGeminiAccountURL / setVertexGeminiAuth
- API Key 账号不参与显式缓存(Vertex 缓存接口不接受 API Key)与批量生图
- 创建弹窗新增认证方式选择;编辑弹窗支持轮换 Key 与修改 Project ID,
Key 留空表示保留
2026-10-10 23:37:48 +08:00
feeeei
64331a9792
ui(gemini): Vertex 显示名改为 Agent Platform (Vertex)
...
Google 已将 Vertex AI 更名为 Gemini Enterprise Agent Platform。
账号类型按钮、平台徽章、Vertex 相关提示、配额文档链接与批量生图报错文案
统一显示为 Agent Platform (Vertex);创建账号弹窗的 Vertex 按钮改用 i18n 文案。
2026-10-10 23:37:48 +08:00
feeeei
d5a802f84a
feat(gemini): 支持显式上下文缓存(AI Studio / Vertex / 自建网关上游)
...
新增 /v1beta/cachedContents 的创建、列表、查询、更新有效期与删除接口。
参与账号:官方地址的 AI Studio API Key 账号、Vertex service account 账号,
以及开启"上游支持显式缓存"的自定义地址 API Key 账号。
- 网关自发缓存 ID,绑定上游资源名、持有账号与创建它的 API Key
(迁移 243 gemini_cached_contents);list/get 只读本地记录
- 引用缓存的 generateContent / streamGenerateContent / countTokens
改写为上游资源名,只发往持有缓存的账号,不参与会话粘性、不换号;
拒绝重复键与 snake_case 写法;在持有账号上重试耗尽后,
上游 429 / 5xx 原样透传,401 / 403 映射为 502
- 计费:创建时一次性收取缓存 token 输入费与整个有效期的存储费;
延长按库中实际推进的时长收费,纯存储费不算一次请求;缩短与删除不退费
- 存储单价随计费模型取价,来自定价覆盖文件字段
cache_storage_cost_per_token_per_hour,未配置的模型拒绝创建;
存储费同时计入账号统计成本,渠道按 token 重算成本时叠加且不重复计入
- 扣费前校验:创建在上游建成后按确定金额校验余额 / 订阅额度 /
API Key 额度并登记不封顶的在途预留,不足时删除上游缓存、只收输入费;
延长在调用上游前按增量时长校验
- 有效期上限 gateway.gemini_cached_content_max_ttl_seconds,默认 86400,
有效期向上取整到秒;创建请求保留数字原文、兼容 snake_case 元数据字段
- 上游调用与落库同客户端连接脱钩;2xx 不可用响应不换号并删除已建缓存
- 缓存不存在:AI Studio 的 403、Vertex 生成请求的 400 与缓存资源接口的
404 统一识别;原生转发(含流式)不重试、不换号、不改账号状态,
向客户端返回标准 403,不暴露上游缓存资源 ID,上游原始错误登记到 ops;
PATCH 遇上游 404 移除本地记录并返回 403,DELETE 视为成功
- 自建网关上游:账号开关 explicit_cache_upstream,缓存接口发往账号自身
base_url;可选 explicit_cache_upstream_max_ttl_seconds 对齐上游 TTL 上限,
显式 TTL 超限时创建跳过该账号(全部超限返回 400),未显式时按上限创建,
PATCH 取本站与账号上限的较小值;绑定缓存的请求在网关账号上收到
429 / 5xx 时不重试、不限流该账号;前端创建 / 编辑账号弹窗新增开关与上限输入框
- 用量与 ops 端点统计:带缓存 ID 的路径归一化为 /v1beta/cachedContents,
缓存操作的上游端点记为 /v1beta/cachedContents
2026-10-10 23:37:47 +08:00
obstacle-Sweden-Avicii
0f189af8de
fix(groups): ignore stale RPM override loads
2026-10-10 19:44:19 +08:00
hutututtt
66b7ce08e7
fix(frontend): show full account group names
2026-10-10 09:48:09 +08:00
chihao.ou
5753552b95
fix(gemini): preserve authorization URL error messages
2026-10-09 20:07:28 +08:00
chihao.ou
8e3d75b57b
fix(monitor): refresh cached availability on automatic reload
2026-10-09 20:05:17 +08:00
chihao.ou
bd2f53b855
fix(groups): reject nonpositive rate multiplier edits
2026-10-09 20:04:44 +08:00
chihao.ou
d01628975d
fix(select): preserve keyboard input during IME composition
2026-10-09 20:00:54 +08:00
chihao.ou
2bfc49477c
fix(ops): initialize custom time ranges in local time
2026-10-09 20:00:02 +08:00