Commit Graph
3101 Commits
Author SHA1 Message Date
ZheFox bad13237d2 Merge pull request #874 from hkxiaoyao/fix/model-mapping-endpoint-scope
fix(scheduler): confine model mappings to endpoint and api-format scope
nightly
2026-10-09 14:24:36 +08:00
ZheFox b4c0d02e01 Merge pull request #883 from AAEE86/fix-cost-analysis-provider-name
fix(overview): 成本分析“提供商用量”展示提供商名称而非 ID
2026-10-09 14:24:06 +08:00
AAEE86 180da72b69 fix(overview): 成本分析“提供商用量”展示提供商名称而非 ID
成本分析页「提供商用量」表格的“提供商”列渲染接口返回的 label,而后端在
UsageAnalyticsView::Breakdown + group_by=provider 时把 label 直接写成了
分组键 provider_id,页面因此显示 provider-1 这类内部编号。

- label 改为按「providers.name → 使用记录里的 provider_name 快照 →
  provider_id 兜底」解析;分组键 id 仍是 provider_id,“查看”链接、按
  提供商匹配的已登记支出列、时间序列图表均不受影响。
- 空白与 unknown/unknow/pending 不当作名称;provider_id 为空时保持空标签,
  前端沿用“未归属提供商”文案。
- 内存仓储(无数据库部署与测试)同步同一口径,避免两种实现表现不一致。
- 新增用例:内存侧 overview_provider_breakdown_labels_rows_with_provider_name,
  SQL 侧 provider_breakdown_labels_resolve_catalog_name_before_recorded_name_and_id。
2026-10-09 08:53:04 +08:00
hkxiaoyao db110fe9dd test(gateway): drop shared openai-scoped mappings in non-openai fixture cases
候选调度测试的共享夹具(support::sample_row)默认把上游名映射限定在
openai 格式;required_capability/selection 中走 gemini、claude 端点的
用例此前依赖“默认名兜底”的旧语义。新增 sample_row_without_model_mappings()
并替换 10 处调用,使这些用例继续只验证各自的 OAuth/能力过滤意图。
2026-10-08 15:12:54 +08:00
hkxiaoyao 58ec544aac fix(scheduler): confine model mappings to endpoint and api-format scope
映射限定了端点或 API 格式范围时,默认上游模型名只在该范围内可用;
范围之外整行不再参与候选,避免把上游不认识的默认名发到未开启的端点
(例如仅将 gpt-6-luna 映射到 openai:chat 的行,不再经 claude:messages 回退默认名)。

- 调度核心:可用性解析调整 + 2 条回归单测
- 数据层镜像同步:memory 仓储过滤、Postgres 请求模型过滤 SQL(含断言测试)
2026-10-08 15:12:54 +08:00
elky 911c7f8875 feat: add selectable routing groups and composite billing
Support per-model provider enablement and compact model editing. Capture request-time billing factors, charge customer costs separately, and preserve historical statistics without backfills.
2026-10-07 14:49:57 +08:00
elky 310098a853 refactor: remove provider card view and group descriptions 2026-10-07 01:10:57 +08:00
elky 466c7918a1 feat: unify provider scheduling workspace 2026-10-07 00:34:18 +08:00
ZheFox e7de935e61 Merge pull request #857 from stabey/codex/fix-global-model-name-reservation
fix(routing): reserve global model names across provider aliases
2026-10-06 22:15:36 +08:00
ZheFox b1943710b3 Merge pull request #875 from dalamudx/feat/claude-code-dynamic-client-profile
feat(claude-code): 统一各提供商的画像管理
2026-10-06 22:15:03 +08:00
elky 082348a5d1 fix: restore dashboard history and complete activity calendar
Combine retained daily aggregates with recent usage without replaying historical records or changing the activation boundary. Complete activation-day metrics and expose the UTC calendar used by legacy history.

Render all 365 calendar dates, size heatmap cells responsively, and soften cell corners. Add regression coverage for history cutoffs, retention, sparse dates, and timezone boundaries.
2026-10-05 19:03:33 +08:00
dalamudx ac7e3abab3 fix: route Gemini client identity through transport facade 2026-10-05 16:01:41 +08:00
dalamudx 7acbaab82b refactor: unify provider client identity profiles and node synchronization 2026-10-05 15:18:36 +08:00
dalamudx 716c35bf56 Merge main into Claude Code dynamic client profile 2026-10-05 13:51:07 +08:00
elky 2539439656 test: bound policy migration fixture connection pool 2026-10-05 13:01:05 +08:00
elky e379bd791c fix: preserve backfilled quota status and update migration regression 2026-10-05 12:52:31 +08:00
elky 84f0d5ce70 Merge origin/main into main 2026-10-05 12:10:23 +08:00
elky d4ed774423 Merge origin/main into main 2026-10-05 12:07:04 +08:00
ZheFox 0948f29da5 Merge pull request #869 from AAEE86/fix-pool-quota-reset-display
fix(pool): 配额倒计时归零后进度条与列表恢复显示 100%
2026-10-05 12:05:03 +08:00
ZheFox 8a767c4309 Merge pull request #872 from stabey/fix/responses-web-search-function-call
fix(ai-formats): keep client-declared web_search as a Responses function_call
2026-10-05 12:04:07 +08:00
ZheFox bd35e885a7 Merge pull request #877 from stabey/fix/xai-grok-cli-version
fix(xai): track the official Grok CLI version for cli-chat-proxy
2026-10-05 12:03:19 +08:00
ZheFox 8ffd8188e4 Merge pull request #879 from Kayphoon/feat/gemini-usage-reasoning-badges
feat(usage): surface Gemini thinkingConfig as reasoning effort
2026-10-05 12:03:02 +08:00
ZheFox 976c3feca6 Merge pull request #880 from xiaoli0412/fix/issue-817-audit-checkin-tunnel
fix(tunnel): unquote WorkingDirectory in generated systemd unit (proxy node setup fails)
2026-10-05 12:02:48 +08:00
ZheFox 5d5281b022 Merge pull request #873 from hkxiaoyao/fix/provider-display-order-pagination
fix(frontend): preserve provider display order across pagination
2026-10-05 12:02:03 +08:00
ZheFox bda0d4e44d Merge pull request #876 from MMEXA/codex/cli-alignment-20261001
对齐 Codex CLI 0.159.3 的画像、模型能力与原生协议
2026-10-05 12:01:34 +08:00
elky cb7b9c9ecd feat: unify user analytics and optimize overview aggregation
Merge user accounts and usage reporting into one page with a combined ranking and account table, shared precise time ranges, and simpler range labels.

Parse overview metadata once through a schema-only view migration and disable JIT locally for bucket rebuilds. Preserve automatic backfills.

Add redacted OAuth refresh diagnostics, bucket failure context, and regression coverage. Resolve strict Clippy warnings.
2026-10-05 00:28:31 +08:00
李昊桐 12d58327a1 fix(tunnel): stop quoting WorkingDirectory in generated systemd unit
systemd (verified on Ubuntu 20.04 / systemd 245 with systemd-analyze
verify) treats the quoted value as part of the path and rejects the
unit with: WorkingDirectory= path is not absolute: "/etc/aether-tunnel".
This made aether-tunnel setup fail after a seemingly successful
one-line install, so remote proxy nodes never came online.

WorkingDirectory= takes the rest of the line as the path, so spaces in
the working directory stay intact unquoted; newline/specifier injection
is already rejected by validate_service_unit_path. ExecStart= and
Environment= keep their existing quoting.

Updates #817 (proxy node section; reproduced there with the full
systemd-analyze verify output).
2026-10-04 23:25:56 +08:00
elky 2075cd95de chore: pass fmt clippy and nextest checks
Format merged Rust sources, satisfy strict clippy lints, and restore documentation fixtures required by format registry tests.

Validation: cargo fmt --all --check; CI-scoped clippy with -D warnings; cargo nextest workspace excluding integration tests, 9747 passed and 47 skipped; targeted PostgreSQL analytics regression passed.
2026-10-02 17:35:08 +08:00
elky 625456ff24 Merge origin/main into main
Integrate upstream updates while preserving the local analytics dashboards and schema-only migration changes.

Combine user account analysis with upstream user/group usage statistics in separate tabs, retain all migration versions, and keep the deleted audit document removed.

Validation: gateway all-target cargo check, frontend type check and 57 focused tests, 48 migration tests, schema composition checks, and diff whitespace checks.
2026-10-02 11:57:18 +08:00
MMEXA e1dadf5b06 修复 Codex 记忆协议的 formats 入口边界与 CI 架构检查 2026-10-02 00:25:07 +08:00
MMEXA 8f1e2decf2 docs: 明确 ultra 的 CLI 语义与现场协议验收 2026-10-01 19:31:34 +08:00
MMEXA 9f829450d8 移除失败测试产生的临时二进制样例 2026-10-01 18:55:36 +08:00
MMEXA 65f43a7aef 同步完整网关回归的画像与目录契约并说明测试环境 2026-10-01 18:39:17 +08:00
MMEXA 2a63bafd20 按端点根地址契约校正原生操作回归用例 2026-10-01 18:22:43 +08:00
MMEXA ea6b739fd6 保留官方公开压缩兼容标记并明确原生错误测试策略 2026-10-01 18:16:13 +08:00
MMEXA 14befeda2c 对齐 Codex CLI 0.159.3 的通用画像、模型能力与原生协议 2026-10-01 17:54:04 +08:00
dalamudx d13f52bdf8 feat(claude-code): 增加动态 CLI 客户端画像并按官方发布刷新版本
- 将 Claude Code 传输身份拆分为带版本的静态模板(Stainless/运行时/beta 策略)与动态 CLI 画像(cli_version / User-Agent),请求按快照读取保证 UA 与 billing cc_version 一致
- 将 codex_profile 泛化为 cli_client_profile,Codex 与 Claude Code 共享发布校验、缓存恢复、防回退与每日刷新逻辑
- Claude Code 跟随 npm latest,要求 8 个平台包版本与主包一致;支持 AETHER_CLAUDE_CODE_CLIENT_PROFILE_REFRESH 与 AETHER_CLAUDE_CODE_CLIENT_VERSION
- 新增定时任务 maintenance.claude_code.client.profile,启动时与 Codex 画像并发预热
- 额度查询 User-Agent 改用动态画像,移除硬编码 CLAUDE_CODE_USAGE_USER_AGENT
2026-10-01 15:56:21 +08:00
stabeyandClaude Opus 5.5 2257c3959f fix(xai): track the official Grok CLI version for cli-chat-proxy
cli-chat-proxy.grok.com started rejecting every request on 2026-10-01
with HTTP 426 "Your Grok CLI version (0.2.120) is outdated. Please
update to version 1.0.13 or later", because x-grok-client-version and
the xai-grok-workspace user agent were pinned to 0.2.120.

Replace the pin with a runtime-published version (built-in fallback
1.0.46) and add a gateway worker, modelled on the Codex profile worker,
that prewarms at startup and refreshes every 3h:

- read the official stable channel https://x.ai/cli/stable, falling
  back to npm @xai-official/grok/latest (deployments that cannot reach
  x.ai directly), requiring all six platform binaries at one version;
- never roll back, persist the verified version in runtime KV and
  restore it on restart;
- AETHER_XAI_CLIENT_VERSION pins a version, and
  AETHER_XAI_CLIENT_PROFILE_REFRESH=off disables the network check.

Endpoint header rules still win over the injected identity headers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 14:53:26 +08:00
elky 066ea87d72 feat: revamp analytics dashboards and harden database migrations
Add dashboard and overview analytics, health monitoring, provider expense tracking, and announcement updates across the gateway and frontend.

Keep schema migrations free of historical backfills while preserving automatic backfill execution. Bound migration deadlines, run schema preparation before Compose replacement, and anonymize deleted dashboard users.

Include the current documentation cleanup and regression coverage.
2026-10-01 11:48:17 +08:00
hkxiaoyao fae51a0ec8 fix(frontend): preserve provider order across pagination 2026-09-30 16:43:50 +08:00
stabeyandClaude Opus 5.5 db5d2dfbb5 fix(ai-formats): keep client-declared web_search as a Responses function_call
Responses output turned every tool call named `web_search` or
`web_search_preview` into a hosted `web_search_call`, regardless of what the
client declared. OMP declares its own `{"type":"function","name":"web_search"}`
tool, so when gemini-3.8-flash called it the client got a hosted item it
cannot execute. OMP then echoed that `web_search_call` back as the last input
item with no output, the Gemini request body could not be built, and every
retry failed with 503 "上游请求体转换失败" (provider_request_body_build_failed).
Observed on stabey-124 on 2026-09-29 (request c6270ef6 and five retries after
b794e7ca returned functionCall web_search / call_109312).

Decide the hosted mapping in one place, NamespaceToolAliases::
emits_hosted_web_search_call, used by both the sync builder and the stream
emitter: emit `web_search_call` only when the name is not a namespaced child
and the client did not declare a function or custom tool of that name. When
both a hosted tool and a function share the name, the function wins.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 10:25:44 +08:00
ZheFox 54fbcc25a1 Merge pull request #871 from dalamudx/feat/claude-code-usage-quota
feat(claude-code): 支持查询 Claude Code 账号 5H/周额度并在号池和提供商详情展示
2026-09-30 09:00:53 +08:00
ZheFox d068b62966 Merge pull request #870 from dalamudx/feat/claude-code-body-mimicry
fix(claude-code): 补全 Claude Code 请求体特征并升级伪装版本到 2.1.284支持opus5.5
2026-09-30 09:00:37 +08:00
dalamudx 017d08d45e test(claude-code): 批量授权测试兼容授权后异步额度刷新 2026-09-30 02:19:15 +08:00
dalamudx 7f45617f79 fix(claude-code): 修复 clippy needless_borrow 并更新不再受支持的 claude_code 额度刷新测试 2026-09-30 01:43:22 +08:00
dalamudx 9cc4018a37 fix(claude-code): 额度查询携带 x-app/claude-cli UA 以获取 cedar_ember,并在无重置机会时显式清空 2026-09-30 00:29:18 +08:00
dalamudx b49f5c0fd7 feat(claude-code): 只读展示重置机会(cedar_ember)并补齐额度文案国际化 2026-09-29 23:55:27 +08:00
dalamudx 125cd40aa5 feat(claude-code): 被动采样 anthropic-ratelimit-unified 响应头更新额度 2026-09-29 22:57:39 +08:00
dalamudx 491364867e feat(claude-code): 提供商详情抽屉展示账号 5H/周额度 2026-09-29 22:40:45 +08:00
dalamudx 8093899b5a feat(claude-code): 支持通过 /api/oauth/usage 查询账号 5H/周额度并在号池展示 2026-09-29 22:40:44 +08:00