Commit Graph

1937 Commits

Author SHA1 Message Date
流云
b47282fe4c fix: 修复优先级管理重新打开顺序回退
优先级管理弹窗依赖 grouped-by-format 接口回显格式优先级,但该接口此前读取 summary key 行。summary 查询会清空 global_priority_by_format 和 internal_priority 等路由字段,导致保存后的数据库顺序存在,重新打开页面却回退为前端占位顺序。

改为使用完整 key 查询,并增加 summary 字段被清空时仍能回显真实优先级的回归测试。

Fixes #505

Constraint: grouped-by-format 是优先级管理弹窗的数据源,必须返回真实 per-format priority 字段。
Rejected: 修改前端继续猜测顺序 | 无法区分真实数据库优先级与占位回退。
Confidence: high
Scope-risk: narrow
Tested: cargo fmt --check; git diff --check
Not-tested: cargo test on local Windows blocked by missing NASM for boring-sys2
2026-05-20 19:44:05 +08:00
fawney19
d0981c2fd5 Merge pull request #522 from RWDai/fix/admin-users-server-pagination
Fix admin users server-side pagination
2026-05-20 18:03:11 +08:00
RWDai
3e12c06627 Fix user group options cache busting 2026-05-20 17:51:29 +08:00
RWDai
74a3df3f1e Fix user group options cache invalidation 2026-05-20 17:46:16 +08:00
fawney19
cb894208a1 Merge pull request #521 from Avilianb/fix/provider-query-responses-compact-body
Fix provider model test compact request bodies
2026-05-20 17:42:53 +08:00
fawney19
76752beca6 chore(postgres): 支持通过环境变量配置 PG 性能参数 2026-05-20 17:41:52 +08:00
RWDai
e80e7b0cfa Fix admin users pagination review issues 2026-05-20 17:41:06 +08:00
RWDai
77051e6245 Fix admin users pagination follow-ups 2026-05-20 17:32:47 +08:00
RWDai
44fb1af287 Fix admin user count clippy lint 2026-05-20 17:06:33 +08:00
fawney19
e7a76b0510 chore(docker): postgres 启用 pg_stat_statements 扩展 2026-05-20 17:00:44 +08:00
fawney19
2881ff097a feat(usage): 管理员用量统计支持筛选刷新与失败保留旧数据
- 用量统计/聚合接口新增 skipCache 选项与 120s 超时,便于强制绕过缓存
- loadStats 增加 force/preserveOnFailure 选项,背景刷新失败时保留旧数据
- 管理员页面在用户/模型/Provider 筛选变化时强制刷新统计,并将筛选条件传入统计接口
- 手动刷新与自动刷新分离,自动刷新不再重载长期热力图相关聚合
2026-05-20 16:51:52 +08:00
RWDai
462c3dde79 Load admin users with server-side pagination 2026-05-20 16:51:46 +08:00
RWDai
1be703b56e Track admin users pagination in frontend data layer 2026-05-20 16:51:46 +08:00
RWDai
5130da9710 Return paginated admin users metadata 2026-05-20 16:51:46 +08:00
RWDai
8440846bae Expose admin user export counts through gateway state 2026-05-20 16:51:46 +08:00
RWDai
831554f11d Add admin user export count queries 2026-05-20 16:51:46 +08:00
Avilianb
97fb588a4a Apply rustfmt to compact provider test 2026-05-20 16:47:30 +08:00
Avilianb
cd994d57d2 Fix provider model test compact request bodies 2026-05-20 16:29:46 +08:00
fawney19
70f2882a43 refactor(api-keys): 将独立余额 Key 表单的额度、IP 限制、敏感信息保护移至左侧列 2026-05-20 16:28:58 +08:00
fawney19
fa5d26ce38 Merge remote-tracking branch 'origin/main' 2026-05-20 16:14:09 +08:00
fawney19
f76bbaab52 feat: support api key ip restriction rules 2026-05-20 16:11:49 +08:00
fawney19
19ae7c8902 Merge pull request #519 from RWDai/feat/aether-tunnel-ip-family-options
feat(tunnel): add tunnel IP family controls
2026-05-20 15:30:17 +08:00
RWDai
eb63838f6a fix(proxy): keep legacy installer URLs working 2026-05-20 14:43:24 +08:00
RWDai
232006f71d fix(tunnel): restore IP family flag test builds 2026-05-20 14:42:52 +08:00
fawney19
b6bdc08267 Merge branch 'pr-501' 2026-05-20 14:05:00 +08:00
fawney19
7e95e769d5 Merge pull request #517 from zhiqicloud/feat/provider-balance-query
支持 Provider Key 余额查询与自动刷新
2026-05-20 13:59:24 +08:00
RWDai
f4c79c80ac fix(tunnel): allow explicit false IP family flags 2026-05-20 13:50:58 +08:00
RWDai
edded777e7 docs(tunnel): document IP family controls 2026-05-20 13:43:22 +08:00
RWDai
7284165f39 feat(tunnel): add tunnel IP family controls 2026-05-20 13:42:55 +08:00
RWDai
1604a6d87d fix(gateway): allow clearing API key IP whitelists 2026-05-20 13:41:14 +08:00
zhiqicloud
ebc1774300 修正 new_api 验证测试断言 2026-05-20 13:04:22 +08:00
zhiqicloud
122daf0f87 支持 Provider Key 余额查询与自动刷新 2026-05-20 12:33:31 +08:00
RWDai
149651f831 test(gateway): expect image bridge tools 2026-05-20 11:22:45 +08:00
fawney19
490306c242 Merge commit 'refs/pull/511/head' of github-fawney19:fawney19/Aether 2026-05-20 11:19:58 +08:00
RWDai
316b1e3207 Merge remote-tracking branch 'upstream/main' into feat/500-api-key-ip-whitelist 2026-05-20 11:14:43 +08:00
RWDai
84c4c2f9c2 fix(gateway): preserve image generation tools 2026-05-20 11:02:41 +08:00
fawney19
4d856f3deb Merge remote-tracking branch 'origin/pr/516' 2026-05-20 10:54:32 +08:00
fawney19
61bcbe826a fix: tighten OAuth auto cleanup signals 2026-05-20 10:34:22 +08:00
RWDai
bdc848b19e Merge upstream main into feat/500-api-key-ip-whitelist 2026-05-20 10:26:56 +08:00
mayrain
65e3b6f3da fix(codex): trigger image override only on explicit tool_choice
The codex `apply_codex_openai_responses_special_body_edits` override
previously triggered whenever the `tools` array contained an
`image_generation` entry, regardless of whether the caller actually
asked to use it. Codex CLI advertises `image_generation` alongside
~20 other tools under `tool_choice: "auto"`, so every routine codex
conversation was being rewritten into image-generation-only form:

  - `model` forced to `gpt-5.4-mini` (CODEX_OPENAI_IMAGE_INTERNAL_MODEL)
  - `stream` forced to `true`
  - `tools` truncated to a single `image_generation` entry
  - `tool_choice` overwritten to `{"type":"image_generation"}`

The upstream ChatGPT codex backend then rejected the request with
`400 Tool choice 'image_generation' not found in 'tools' parameter`,
which the gateway surfaced as a retryable 503 to clients. The bug
reproduced on every codex CLI session that included the image tool
in its tool catalogue, even though the user never requested image
generation.

Narrow the trigger to the caller's actual selection. The new helper
`codex_openai_responses_tool_choice_references_image_generation`
matches only the explicit string `"image_generation"` or the object
form `{"type":"image_generation"}`. The pre-existing
`is_openai_image_request(provider_api_format)` branch still handles
genuine `openai:image` traffic, so true image-generation flows are
unaffected.

Tests:
  - lock the regression: `tool_choice: "auto"` with image_generation
    in tools must not trigger the override (model/tools preserved)
  - lock variants: string `"image_generation"` and object form both
    still trigger; other tool_choice values and an absent
    `tool_choice` do not
2026-05-20 09:52:39 +08:00
zhiqicloud
97b05e744f 支持官方直连支付、退款配置与套餐联动 2026-05-20 08:16:52 +08:00
fawney19
fbda210b84 Merge pull request #511 2026-05-20 01:22:55 +08:00
fawney19
ed75ae6d56 Merge pull request #509 from beilo/feat/key-ranking-usage
Add paginated API key usage leaderboard
2026-05-20 01:06:58 +08:00
fawney19
d1ad1815f7 Merge pull request #513 from mayrainnn/fix/request-body-content-encoding
feat: normalize compressed request bodies
2026-05-20 01:05:59 +08:00
fawney19
b1a3a26815 Merge pull request #512 from Entropy-Xu/codex/fix-wallet-overdraft-settlement
[codex] 修复钱包余额不足后重复消费
2026-05-20 01:05:26 +08:00
fawney19
94760dbc14 refactor(tunnel): rename aether-proxy to aether-tunnel 2026-05-20 01:02:01 +08:00
zhiqicloud
3a318a86b2 支持官方直连支付、退款配置与套餐联动 2026-05-20 00:21:56 +08:00
fawney19
f4d0d5904a Remove image_generation tools from OpenAI image bridges 2026-05-20 00:20:56 +08:00
fawney19
25c7bb935e chore(frontend): simplify concurrent limit hint text 2026-05-19 23:52:59 +08:00
fawney19
f5deed8709 refactor(proxy): improve tunnel throughput and observability 2026-05-19 23:49:36 +08:00