fawney19
d246f6b42c
fix: align user group access controls
2026-05-10 17:28:23 +08:00
fawney19
a8ac944959
Merge remote-tracking branch 'entropy-xu/codex/user-groups-default-permissions' into aether-rust-pioneer
2026-05-10 11:26:29 +08:00
fawney19
391c2fbe5d
Merge remote-tracking branch 'origin/aether-rust-pioneer' into codex/async-cleanup-records
...
# Conflicts:
# apps/aether-gateway/src/maintenance/mod.rs
# apps/aether-gateway/src/maintenance/runtime/runners.rs
2026-05-10 00:28:39 +08:00
Entropy.Xu
a68c690874
Merge remote-tracking branch 'upstream/aether-rust-pioneer' into codex/user-groups-default-permissions
2026-05-09 22:04:09 +08:00
Entropy.Xu
3a814f3d1f
feat: add user groups and inherited access policies
2026-05-09 21:47:33 +08:00
fawney19
209322b499
feat(gateway): unify background task runtime and storage
2026-05-09 21:19:29 +08:00
fawney19
e21fb58479
chore(proxy): guard metrics retention cleanup
2026-05-08 22:57:00 +08:00
fawney19
a703acd1fe
feat(proxy): record tunnel stability metrics
2026-05-08 22:03:17 +08:00
Entropy.Xu
3f29335fd6
Add async request body cleanup records
2026-05-08 13:50:18 +08:00
fawney19
31d142effc
Merge remote-tracking branch 'origin/pr/395' into aether-rust-pioneer
2026-05-08 02:47:07 +08:00
fawney19
66d8e90647
Merge remote-tracking branch 'origin/pr/394' into aether-rust-pioneer
2026-05-08 02:46:35 +08:00
fawney19
6247ac3edc
refactor: extract runtime state backends
2026-05-08 00:18:12 +08:00
Entropy.Xu
dd8c2ebec6
fix(admin): repair system maintenance controls
...
Implement server-side searchable user filtering for usage records, including backend search parameters and a shared frontend selector with loading, empty, and pinned-selected states.
Fix announcement deletion by cascading announcement read rows through a Postgres migration and defensive repository cleanup across supported backends.
Wire admin system purge and cleanup endpoints to real data deletion/maintenance flows, improve DataManagement messages, rebuild stats after stats purge, and add runtime OAuth token refresh maintenance when enabled.
Verified with rust-ci equivalent checks: cargo fmt, split clippy, split cargo tests, SQLite/Postgres/MySQL smoke tests, plus frontend npm ci, build, pages build, type-check, and targeted usage selector tests.
2026-05-07 21:26:40 +08:00
RWDai
738031696b
fix(users): thread rate limit presence through gateway
2026-05-07 19:16:49 +08:00
fawney19
2a124318b9
Merge branch 'pr-390' into aether-rust-pioneer
2026-05-07 01:34:38 +08:00
fawney19
df9d30340d
Revert "feat: combine usage quota and pool stats updates"
...
This reverts commit 1f5b294bd0 .
2026-05-07 01:33:40 +08:00
fawney19
1f5b294bd0
feat: combine usage quota and pool stats updates
2026-05-07 01:26:42 +08:00
fawney19
012f8bcdf7
feat: scope model mappings by endpoint
2026-05-07 00:48:15 +08:00
Kayphoon
79cb9b502a
feat(pool): add codex cycle stats mode
2026-05-07 00:07:32 +08:00
fawney19
68216bf868
Clean up transport fingerprint configuration
...
Remove legacy tls_profile handling, keep header fingerprint under transport profiles, and drop the duplicate auth_modules migration.
2026-05-06 13:54:33 +08:00
fawney19
aacab1a90c
Merge remote-tracking branch 'origin/aether-rust-pioneer' into aether-rust-pioneer
...
# Conflicts:
# crates/aether-data-contracts/src/repository/usage/mod.rs
# crates/aether-data/src/repository/global_models/postgres.rs
# crates/aether-data/src/repository/usage/postgres/mod.rs
2026-05-05 18:53:14 +08:00
fawney19
fce7e959e5
Add multi-database data layer
...
Introduce aether-data-schema and driver-specific schema generation for Postgres, MySQL, and SQLite.
Split data backends, lifecycle, repositories, and gateway runtime integration across database drivers.
Verified with cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings, and cargo test --workspace.
2026-05-05 18:27:36 +08:00
Entropy.Xu
ff1ed8b57d
feat(stats): 添加 Provider 性能统计分析
2026-05-05 11:24:16 +08:00
fawney19
53a5e18b20
Merge pull request #370 from yao177/aether-rust-pioneer
...
fix(proxy): record manual proxy node traffic
2026-05-03 21:40:20 +08:00
fawney19
6f00cabe96
Lazy load requested model candidates
2026-05-03 20:56:31 +08:00
fawney19
a24e4a793d
Refactor pool candidate scheduling
2026-05-03 20:14:29 +08:00
Yao177
c3d97b8c16
fix(proxy): record manual proxy node traffic
...
- add manual proxy traffic mutations to the data layer
- record sync and stream outcomes for manual proxy requests
- prevent tunnel proxy nodes from receiving manual traffic updates
2026-05-03 18:38:04 +08:00
jiuwovo-ai
3e2eca4fd0
fix: 修复手动代理节点请求不计数及延迟/心跳不显示的问题 ( #368 )
...
* fix: 修复手动代理节点请求不计数及延迟/心跳不显示的问题
问题描述:
- 手动添加的代理节点请求数始终为0,不会递增
- 手动代理节点的延迟和最后心跳时间不显示
根因:
Rust 重写版中缺失了 Python 版的手动代理节点请求计数逻辑。
隧道节点通过心跳上报计数,但手动节点没有心跳机制,
需要在 usage recording 路径中递增计数并更新延迟信息。
修复方案:
1. 在 ExecutionPlan 中提取 proxy 信息,注入到 request_metadata
2. 在 request_metadata 白名单中添加 proxy 字段
3. 新增 INCREMENT_MANUAL_PROXY_NODE_REQUESTS_SQL,
递增 total_requests/failed_requests,
同时更新 avg_latency_ms 和 last_heartbeat_at
4. 在 ProxyNodeWriteRepository trait 新增 increment_manual_node_requests 方法
5. 在 write_event_record 中解析 request_metadata 中的 proxy 信息,
对非隧道模式的手动节点调用递增方法
6. 为 GatewayDataState 实现 ManualProxyNodeCounter trait
影响范围:
- 仅影响手动代理节点的统计数据
- 隧道节点不受影响(继续通过心跳计数)
- 不影响请求转发逻辑
* style: cargo fmt
---------
Co-authored-by: root <root@ser406777952330.local >
2026-05-03 14:50:36 +08:00
fawney19
c4ea042eb4
feat: add model directive management
2026-05-03 14:48:25 +08:00
AAEE86
712b484bc8
fix(scheduler): 恢复正则模型映射作为上游模型 ( #355 )
...
保留 provider_model_mappings 的优先级选择逻辑,但恢复
GlobalModel model_mappings 正则命中后的行为:使用命中的
allowed_model 作为实际上游 mapped_model。
修复了 #354 请求绕过基于正则表达式的模型映射的问题
2026-04-28 10:36:50 +08:00
Kayphoon
5311eb0da1
Fix provider model mapping selection ( #354 )
2026-04-28 09:23:39 +08:00
fawney19
032dcf40e7
fix: filter candidate rows to resolved global model name only
2026-04-28 01:12:27 +08:00
fawney19
e9f03d8d29
Remove ranked minimal selection compatibility helper
2026-04-27 17:24:32 +08:00
fawney19
e5e09b49f4
Remove ranked candidate data read wrappers
2026-04-27 17:24:32 +08:00
fawney19
dda6f34a07
Rename ranked minimal candidate reads
2026-04-27 17:24:32 +08:00
fawney19
f10f5f071d
Clarify ranked minimal candidate selection
2026-04-27 17:24:32 +08:00
fawney19
3b542434a2
Unify candidate ranking pipeline
2026-04-27 17:24:31 +08:00
fawney19
ea3dc3257e
clean up legacy openai cli adapter names
2026-04-26 23:59:53 +08:00
fawney19
780f09c1a2
feat(billing): 引入 model_id 精确计费查找路径,传播模型 ID 至用量事件与 report context
...
- UsageEventData 新增 model_id / global_model_id 字段,write.rs seed 结构体同步补充
- report_context 新增 model_id / global_model_id / global_model_name,各 payload 构建时从 candidate 传入
- event_enrichment 优先按 model_id 精确查找计费上下文,回退为按名称多轮查找(保留 NoRule 结果降级逻辑)
- BillingReadRepository 新增 find_model_context_by_model_id,memory/sql 分别实现;SQL 查询重构支持按 provider_model_name 和 mappings 匹配并按优先级排序
- pricing.rs 修复:model_tiered_pricing 为空 tiers 时回退到 default_tiered_pricing
- request_metadata 允许字段列表补充 model_id / global_model_id / global_model_name
- admin usage 路由信息输出及脱敏字段列表同步新增三个 model 相关字段
2026-04-24 14:40:28 +08:00
fawney19
fa328e18a1
feat: provider api_formats 可空继承、OpenAI 图片 edit/variation 与用量配额多项补强
...
- 鉴权: provider_api_keys.api_formats 改为可空,OAuth 托管 key 自动继承 provider endpoints 激活格式,相关 handler/测试同步更新
- 图片 planner: OpenAI 图片路由新增 edit/variation 操作并完善参数校验、响应合并与流式处理
- 用量: user me usage 返回区分 client_requested_stream/upstream_is_stream,前端 usage 列表筛选与展示增强
- 统计: stats_daily_model 新增 cache_creation_ephemeral_5m/1h tokens 字段与回填链路
- 配额/observability: quota repository 新增内存与 SQL 扩展,admin observability usage 字段扩充
- 其它: OAuth 导入/轮询收敛、provider 汇总与 pool admin 读写链路小修、新增 system_config 缓存与 provider template handler
Closes #318
Co-authored-by: Entropy.Xu <53283266+Entropy-Xu@users.noreply.github.com >
2026-04-23 14:42:51 +08:00
fawney19
cf6228f525
feat(stats,rules): api_key 用量统计(total_tokens 字段 + 回填)与 body rules 新增 append/insert/regex_replace/name_style 操作
...
- 新增迁移 20260422120000_add_api_key_usage_stats.sql,为 api_keys 表添加 total_tokens 列
- 新增回填 20260422120000_backfill_api_key_usage_stats.sql,按历史 usage 重建 api_key 维度汇总
- 在 UsageWriteRepository trait 中添加 rebuild_api_key_usage_stats,补齐 SQL/内存实现及上层调用链
- 内存实现中新增 apply_usage_stats_delta,支持增量更新 api_key 统计快照
- dev.sh:改进临时日志目录管理,并在网关异常退出时输出错误提示
- frontend EndpointFormDialog:将 append 操作从 insert 分支拆分,提供独立 path/value 输入 UI
- rules.rs:扩展 body rules 支持,新增 append/insert/regex_replace/name_style 操作及 WildcardSlice 路径段
2026-04-22 20:16:57 +08:00
fawney19
a5e6bd3b62
feat(stats): 新增聚合读路径与回填机制并重构 dashboard/usage 读取链路
...
- 新增 stats_user_summary 及 user_daily_provider/api_format/cost_savings 等聚合表
- 扩展 stats_daily/hourly 有效 token 与响应时间等字段,maintenance runtime 同步写入
- 新增 backfill 模块与 --apply-backfills 命令补齐历史聚合数据
- 重写 dashboard_filters、usage_heatmap、user_rollups 查询改走聚合表
- 同步更新 baseline_v2.sql 与 migration 集,README/dev.sh 补充回填用法
2026-04-22 17:29:39 +08:00
AAEE86
6666992d01
feat(admin): 将用户管理的用量统计改为全量累计口径 ( #314 )
...
- 新增按用户 ID 批量汇总 usage 的后端查询
- 在 /api/admin/users 中返回 request_count 和 total_tokens
- 移除用户管理页面额外的 usage 聚合请求
- 为管理端用户列表补充累计统计回归测试
2026-04-19 01:26:22 +08:00
AAEE86
bafb63a665
持久化 provider key 使用统计并移除 usage 汇总覆盖 ( #313 )
...
* 持久化 provider key 使用统计并移除 usage 汇总覆盖
- 在 usage upsert 时按请求前后差值同步 provider_api_keys 统计
- 增加基于保留 usage 记录的 provider key 统计重建能力
- 号池管理列表直接读取 provider_api_keys 统计字段
* fix: harden provider key usage stats sync
---------
Co-authored-by: fawney19 <elky0401@gmail.com >
2026-04-19 01:02:09 +08:00
fawney19
3363592751
Refactor usage body capture and stream terminal reporting
2026-04-18 17:48:21 +08:00
fawney19
0ce61bc91c
fix(gateway): align provider restrictions with provider catalog
2026-04-17 18:59:13 +08:00
Entropy.Xu
6964729cb7
feat(payments): 增加兑换码与支付适配框架 ( #299 )
...
* feat(payments): 增加兑换码与支付适配框架
* fix(ci): 对齐 Rust 1.95 lint 与格式要求
* fix(payments): harden redeem code wallet credits
---------
Co-authored-by: fawney19 <elky0401@gmail.com >
2026-04-17 10:07:52 +08:00
fawney19
1e0bc61526
feat(gateway/data): 新增 usage 关键词搜索、缓存命中摘要、结算成本摘要及 dashboard 聚合查询能力
...
- 新增 UsageAuditKeywordSearchQuery,支持多关键词、用户名、API Key 交叉过滤
- 新增 UsageCacheHitSummaryQuery/StoredUsageCacheHitSummary,统计请求缓存命中率
- 新增 UsageSettledCostSummaryQuery/StoredUsageSettledCostSummary,汇总结算成本
- 新增 UsageDashboardSummaryQuery、UsageBreakdownSummaryQuery 等 dashboard 聚合类型
- SQL 层实现对应查询方法,含 list_by_ids、list_usage_audits_by_keyword_search、count_usage_audits_by_keyword_search
- 将上述能力通过 GatewayDataState / AdminAppState 暴露给 handler 层
- user_me_usage 及 dashboard_filters 切换为新查询接口,移除旧的内存过滤逻辑
- 同步更新 memory 层及测试
2026-04-17 01:00:38 +08:00
fawney19
0dce667019
feat(tunnel/usage): proxy writer 双优先级队列、hub 连接压力感知选择、usage 请求记录级别控制及 trace 页面 proxy timing 增强
2026-04-16 20:14:50 +08:00
fawney19
65cd9dc3e5
fix(admin): 修复 usage 观测全表扫描并下推聚合查询
...
- 收紧 admin usage/stats 默认时间范围和 active 轮询查询
- 将 summary/records/aggregation/time-series/leaderboard 下推到 SQL 侧
- 统一前端时间参数并补齐 admin usage/stats 回归测试
2026-04-16 17:46:19 +08:00