fawney19
0c03c188f1
fix codex window usage stats
2026-05-07 13:35:25 +08:00
fawney19
64af7b1d8a
fix: preserve selected keys for quota refresh
2026-05-07 12:55:39 +08:00
fawney19
fd44906bb7
fix provider pool quota status handling
2026-05-07 11:28:44 +08:00
fawney19
10e679bb2f
Add provider key cycle stats reset handling
2026-05-07 03:23:20 +08:00
fawney19
6c0ac2e8da
chore: omit deprecated python quota changes
2026-05-07 01:39:48 +08:00
Codex
41f75a3f19
feat: show chatgpt web image quota
2026-05-06 22:58:47 +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
fawney19
099653f732
Cap Codex pool cooldowns and add key circuit breaker
2026-05-04 02:15:32 +08:00
Kayphoon
fe27fb17fb
feat: add provider-key concurrent limit ( #352 )
...
* feat: add provider-key concurrent limit
* Fix provider key concurrent limit checks
---------
Co-authored-by: fawney19 <elky0401@gmail.com >
2026-05-03 01:55:23 +08:00
fawney19
e3ea2d1451
feat: configure auth channel mismatch formats
2026-05-03 00:49:22 +08:00
jiuwovo-ai
bfd1ea72b3
fix: codex free accounts incorrectly marked as quota exhausted ( #366 )
...
* fix: codex free accounts incorrectly marked as quota exhausted when skip_exhausted_accounts enabled
- Cross-validate stored exhausted flag against window used_ratio in snapshot reader
- Guard has_credits:false check with window data presence in upstream_metadata fallback
- Add windows.is_empty() precondition to exhausted_by_credits in snapshot builder
Free codex accounts have has_credits:false (they use window-based quotas, not credits),
but the old logic treated this as credits depleted, skipping actual window usage checks.
This caused all free accounts to be incorrectly marked exhausted.
* test: cover codex free quota windows
---------
Co-authored-by: root <root@ser488556369540.local >
Co-authored-by: fawney19 <elky0401@gmail.com >
2026-05-02 14:11:29 +08:00
fawney19
c130d0e2c9
refactor ai serving modules and crates
2026-05-02 13:23:54 +08:00
fawney19
4fc7cecf30
Fix OAuth token import and table filters
2026-05-01 02:14:49 +08:00
fawney19
e751289dfb
Support per-format provider key auth
2026-04-29 15:46:50 +08:00
fawney19
07a319259b
Normalize canonical API formats
2026-04-29 10:20:41 +08:00
fawney19
230e7d6259
Normalize management token prefixes
2026-04-28 19:46:38 +08:00
fawney19
65e915fd1d
refactor(api-keys): 网关 API Key 改为 32 位字母数字随机串
...
由 UUID 拼接(48 位 hex)改为 base62 字母数字,缩短长度并提升可读性
2026-04-25 10:04:04 +08:00
AAEE86
a9d10163af
fix(oauth): 修复 OAuth 刷新后 Token 有效期不更新问题 ( #324 )
...
- 持久化刷新后的 `expires_at` 到 Provider Key SQL 更新链路
- 手动刷新接口优先返回本次刷新得到的过期时间
- 按当前 Key 字段重建 OAuth 状态快照,避免旧快照覆盖
- 前端刷新后防止旧列表数据回退覆盖新有效期
2026-04-24 09:35:25 +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
25a2b417be
refactor: 优化调度候选排序与用量写入链路并改进 Fernet 缓存与前端批量列表
2026-04-21 16:19:07 +08:00
fawney19
c5c56ff92f
feat(oauth): 允许替换已失效的活跃 OAuth 账号并同步 status_snapshot
...
- 活跃但 token 已过期或刷新失败的重复账号视为可替换
- 清除失效标记、刷新配额时同步更新 status_snapshot.oauth
- oauth_invalid 清除接口同时识别 invalid_at 与 invalid_reason 两种标记
- 批量导入任务状态区分 created_count / replaced_count,前端据此展示新增/替换统计
- 补充重复替换场景的集成测试,用量测试等待超时从 10s 提升到 30s 以适应并行压力
2026-04-20 22:59:02 +08:00
fawney19
77aac74590
feat(oauth): 完善账号异常识别并在调度/展示层拦截失效 OAuth 密钥
...
- 新增 aether-admin provider status 模块,统一解析账号状态(禁用/工作区停用等)
- 调度器 runtime 增加 oauth_invalid 判定,跳过刷新失败或已撤销的 OAuth 密钥(REQUEST_FAILED 保留可选)
- gateway state 在 local oauth 刷新返回 4xx 时持久化失败原因并同步状态快照
- admin pool 列表/详情回填 account 状态与 scheduling 阻塞原因(account_blocked)
- 共享 catalog 的 status_snapshot payload 附加 account 字段
2026-04-19 20:50:31 +08:00
fawney19
3321bb3ccc
Implement independent provider pool scheduling runtime
2026-04-17 23:05:49 +08:00
fawney19
7eae1f90f6
Unify quota snapshots and oauth refresh handling
2026-04-17 18:22:41 +08:00
RWDai
b8702ae124
Fix/api key concurrency runtime miss ( #309 )
...
* test(cli): 覆盖 API key 并发等待与超时路径
* feat(scheduler): API key 并发饱和时等待可用槽位
* fix(proxy): 区分 API key 并发受限与真正的 runtime miss
* fix(outcome): runtime miss 仅归因真实执行候选
* feat(api-keys): 统一 concurrent_limit 默认值与校验辅助
* feat(admin): 独立 Key 接口支持 concurrent_limit
* feat(admin): 用户 API Key 路由支持 concurrent_limit
* feat(public): 自助 API Key 路由支持 concurrent_limit
* feat(import): 导入与存储层持久化 concurrent_limit
* feat(frontend): 同步 API Key concurrent_limit 类型定义
* feat(frontend): 独立 Key 表单支持 concurrent_limit
* feat(frontend): 管理员用户 API Key 表单支持 concurrent_limit
* feat(frontend): 自助 API Key 页面支持 concurrent_limit
* chore(fmt): 统一 runtime 归因相关 Rust 格式
* chore(fmt): 统一 admin API key 路由 Rust 格式
* chore(fmt): 统一 public 路由与相关测试 Rust 格式
* fix(test): 对齐 no-execution usage 归因断言
* test(middleware): 固定 access log tracing 用例线程模型
* fix(frontend): 提取用户 API Key payload 默认并发辅助
* fix(frontend): 保留用户 Key 的 concurrent_limit 默认值
* fix(api-keys): remove hardcoded concurrent limit default
---------
Co-authored-by: fawney19 <elky0401@gmail.com >
2026-04-17 14:21:43 +08:00
Entropy.Xu
ac1a126756
fix(kiro,pool,model): 对齐 Kiro 管理链路并修复全局模型删除行为 ( #305 )
...
* feat(pool): 号池支持跳过额度耗尽账号
- 新增 pool_advanced.skip_exhausted_accounts 开关及高级设置 UI, 默认关闭并兼容旧配置
- 为 Codex/Kiro 增加额度耗尽判定, 接入请求侧候选跳过并新增 account_quota_exhausted skip reason
- 号池列表将额度耗尽账号标记为 blocked/额度耗尽, 并补充前后端相关测试
* fix(kiro): 对齐账号管理与 provider-query 的 Rust 行为
- 修复 Kiro 单条导入误走 import-refresh-token 的前端分流, 并为误用路径返回明确错误提示
- 为 Kiro 导入与本地请求链补齐 bearer 兼容, 同步放开账号启停等 Key 更新操作的 auth_type 校验
- 实现 Kiro provider-query 本地模型测试与 failover 执行链, 并修复结果弹窗在无 trace 时无法展示 attempts/响应体的问题
* fix(model): 删除全局模型时级联清理关联提供商模型
- 对齐 Python 版本删除逻辑, GlobalModel 删除前先在事务内清理关联的 Provider Model 记录
- 修复已绑定 Provider 的模型在 Rust SQL 仓库下会被外键约束拦住、无法正常删除的问题
- 增加管理端回归测试, 覆盖绑定 Provider Model 的 GlobalModel 删除场景
* fix(kiro,ci): 恢复 Kiro OAuth 持久化并修复 Rust CI
* Fix oauth-managed provider key semantics
---------
Co-authored-by: fawney19 <elky0401@gmail.com >
2026-04-17 12:57:06 +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
a4e7ac1df6
feat(proxy): 重构 Proxy 节点管理与隧道系统
...
- 重构 proxy_nodes 管理端,支持节点注册、心跳、隧道生命周期管理
- 增强 tunnel 嵌入式 hub 和隧道协议
- 重构 aether-proxy 配置、隧道客户端、心跳和调度机制
- 调整 admin OAuth/配额/导入等处理器的参数传递
- 扩展数据迁移模块
- 补充 proxy nodes、OAuth、配额、系统导入等测试
- 更新前端 proxy nodes 视图和 API
2026-04-14 22:51:02 +08:00
fawney19
861ae81ff0
feat(admin): 完善代理节点与 OAuth 授权管理
2026-04-14 14:09:24 +08:00
fawney19
5bb08e6aa4
feat(gateway): 重构 usage 数据层、迁移系统与系统导入
...
数据库迁移:
- 引入 baseline v2 bootstrap,空库首次启动自动初始化
- 服务启动不再自动执行迁移,需显式 `--migrate` 运行
- 新增 pending migration 检测,schema 落后时拒绝启动
Usage 数据层:
- usage body 存储外部化为独立 blob 表
- 新增 HTTP audit 表拆分存储请求/响应头与 body ref
- 后台清理任务支持 legacy body ref 元数据迁移
- usage runtime 写入迁移到专用 tokio runtime(独立线程池, 8MB 栈)
系统导入/导出:
- 支持用户、API Keys、钱包数据的完整导入
- 兼容 legacy 与 v1.3+ 两种导出格式
其他改进:
- executor outcome 增加 runtime miss 诊断上下文
- 主 tokio runtime 栈大小调整为 8MB
- 前端 provider 管理支持 base URL 配置
- dev.sh 支持 --migrate 参数
2026-04-13 14:01:22 +08:00
fawney19
9703840a36
feat(proxy): 实现代理节点批量升级回滚、隧道重定向跟随及远程配置管理
...
核心功能:
- 新增代理节点批量升级回滚工作流,支持分批升级、健康探针、跳过/重试/取消等操作
- proxy 隧道流处理器支持 HTTP 重定向跟随(最多 10 跳),区分 307/308 可重播与不可重播请求体
- proxy 协议新增 follow_redirects / http1_only 字段,网关侧同步支持
- 新增代理节点远端配置变更接口(名称、允许端口、调度状态、升级目标等)
- 新增代理节点注册/反注册/心跳的 Admin API,及节点过期清理维护任务
- gateway 隧道 owner-relay 支持流式代理大请求体,新增 5 MiB 默认限制
- 新增 ProxyNodeRegistrationMutation / ProxyNodeRemoteConfigMutation 数据类型
- proxy 配置新增重定向重播预算、心跳间隔等参数,TUI 安装向导同步更新
- 前端 ProxyNodes 页面新增批量升级操作面板及滚动进度展示
2026-04-12 16:02:38 +08:00
fawney19
a9f610fa69
feat(admin): 实现系统数据导入导出功能,支持提供商和模型批量配置
2026-04-11 21:39:04 +08:00
fawney19
801e16c988
refactor(gateway): 统一 AETHER_GATEWAY_BIND 为 APP_PORT,新增 API Key 前缀配置和启动自举管理员
...
- 绑定地址固定 0.0.0.0,仅通过 APP_PORT 控制端口,简化 CLI/Docker/systemd/dev.sh/前端代理全链路
- 新增 API_KEY_PREFIX 环境变量,抽取 handlers/shared/api_keys.rs 消除 admin/public 重复逻辑
- 新增 bootstrap_admin.rs,启动时通过 ADMIN_* 环境变量在无管理员时自动创建首个本地管理员
- 前端密码输入改用 type=password,API Key 占位符改为动态前缀
- 删除过时的 pyproject.toml/uv.lock 和旧部署文档
- 更新 .env.example/README 反映新配置项
2026-04-11 17:39:02 +08:00
fawney19
5014e2f5fd
refactor: 抽离 AI pipeline 与调度共享能力逻辑
2026-04-10 01:46:14 +08:00
fawney19
b0b40c16ff
feat: 全栈功能增强 - 扩展 provider/pool 管理、完善调度与数据层、重构前端 Pool 页面
...
后端:
- 扩展 pool_admin payloads 和 provider query models,增强 endpoint key 管理
- 完善 scheduler-core 候选排序与请求候选逻辑
- 增强 usage-runtime 写入、provider-transport 网络层与 OAuth 刷新
- 改进 AI pipeline 响应转换与流式处理
- 扩展 global_models/provider_catalog 数据层查询能力
- 增强 video-tasks-core 多 provider 支持
- 新增大量集成测试覆盖 pool/keys/provider_query/frontdoor
前端:
- 重构 PoolManagement 页面,拆分状态管理/对话框逻辑到独立模块
- 新增 poolAdvancedDialog/poolSchedulingDialog/poolManagementState/poolMobilePresentation 工具函数及测试
- 改进 Dialog 组件与 provider tabs 显示
部署:
- 更新 Rust CI workflow 和 Dockerfile 构建配置
Closes #275
Co-authored-by: AAEE86 <ppk0227@hotmail.com >
2026-04-09 13:51:50 +08:00
fawney19
4fc95adfb9
refactor: 大规模模块拆分与重组,新增 aether-admin crate
...
- 新建独立 aether-admin crate 承载 admin 相关共享契约与纯辅助函数
- 拆分 ai_pipeline 下 kiro/private_envelope/conversion/planner 等大文件为子模块目录
- 重组 admin handlers 各业务域(billing/oauth/provider/system/users 等)为目录结构,移除 shared.rs/builders.rs 等反模式
- 移除 ai_pipeline runtime adapters 旧实现(claude/openai/gemini/kiro/vertex/antigravity 等),改由 provider transport 统一承载
- 移除 control_facade/execution_facade/auth_snapshot_facade 等冗余 facade 层
- 拆分 query/billing 与 query/monitoring 模块、state/runtime/payments 与 security 模块
- 扩展架构测试覆盖 admin_billing/admin_model/admin_users 等新模块
- 删除 docs/architecture/refactor-execution-plan.md 已完成的执行计划文档
2026-04-09 00:10:38 +08:00
fawney19
29055c575f
refactor: 拆分 system.rs 大文件,将 email_templates/proxy_errors/system_config 下沉到 shared 层
...
- 删除 1666 行的 admin/system/shared/system.rs,按职责拆分到独立模块
- 新增 handlers/shared/email_templates.rs 和 system_config_values.rs 存放跨层共用的模板/配置工具函数
- 新增 admin/system/shared/email_templates.rs 存放 admin 专用的模板操作逻辑
- 新增 admin/shared/proxy_errors.rs 存放 build_proxy_error_response
- 清理 public/system_modules_helpers 中不属于 public 层的导出
- 新增架构测试守护模块归属边界
2026-04-07 08:19:26 +08:00
fawney19
5d96d6673b
refactor: 大规模模块拆分与代码精简,新增 ai-pipeline/data-contracts 独立 crate
...
- 新增 aether-ai-pipeline 和 aether-data-contracts crate,将 pipeline 逻辑与数据契约从 gateway 中解耦
- 重构 admin handlers:拆分单体模块为 auth/billing/endpoint/features/model/observability/provider/system 等独立子模块
- 合并 chat/cli 重复代码路径:精简 conversion、finalize、planner 中的 sync/chat/cli 分支
- 重构 scheduler/executor/data 层,引入 facade 模式降低模块间耦合
- 移除冗余的 intent 模块,将 plan_fallback/policy/stream_path/sync_path 迁移至 executor
- 前端适配:调整 admin API 调用和 provider 模型测试对话框
2026-04-07 02:50:19 +08:00
fawney19
763ff03a7b
refactor: 拆分 gateway 单体为独立 crate,新增 systemd 部署方案
...
将 gateway 内部的 model-fetch、provider-transport、scheduler-core、
usage-runtime、video-tasks-core 模块提取为独立 crate;重构 gateway
内部模块结构(state/router/cache/data/query 等);移除大量遗留模块
文件;新增 systemd 二进制部署骨架及相关文档;更新前端 usage 相关
API 和组件。
2026-04-05 20:23:16 +08:00
fawney19
cbc811f6ce
refactor: 移除 Python upstream 依赖,清理全部 legacy/Python 兼容层
...
- 移除 upstream_base_url 参数及 AETHER_GATEWAY_UPSTREAM 环境变量,gateway 不再需要指向 Python 宿主
- 删除所有 LEGACY_*/PYTHON_* 常量、路由组、header 定义及 sunset/phaseout 机制
- 将 legacy_gateway_bridge 重命名为 internal_gateway,executor 相关命名统一为 execution_runtime
- dev.sh 新增 Postgres/Redis 预检查,移除 upstream 相关启动参数和提示
- 新增 ai_public 路由处理器
- 全量适配 handler、test、state、control 等模块的命名和接口变更
2026-04-04 01:40:24 +08:00
fawney19
1d9c77522a
refactor: 移除 Python 后端源码,全面迁移至 Rust gateway 架构
...
- 删除全部 Python 源码 (src/) 及 Alembic 迁移脚本,归档至 _deprecated_py_src/
- 重构 Rust gateway ai_pipeline: 拆分 planner/finalize 模块,新增 contracts/adaptation 层
- 重组 handlers 模块为 admin/public/proxy/internal/shared 子模块结构
- 新增 executor 模块,引入 Rust 原生数据库迁移 (aether-data/migrations)
- 简化 CI/Docker 构建流程,移除 base image 二级构建,统一为单一 app image
- 移除 Python 相关基础设施文件 (entrypoint.sh, gunicorn_conf.py, Dockerfile.base)
2026-04-03 16:26:16 +08:00
fawney19
8f26e1a31f
refactor: 移除独立 hub/proxy/executor/gateway crate,统一为 gateway tunnel 架构
...
- 删除 aether-hub、aether-proxy 独立项目及其 Dockerfile/配置
- 删除 crates/aether-executor 和 crates/aether-gateway 全部模块
- 新增 apps/ 目录作为应用入口
- 将 hub 概念重构为 gateway tunnel transport
- 将 executor 重构为 execution runtime
- 新增 tunnel.rs 合约定义和 testkit tunnel/execution_runtime 模块
- 更新 Python 服务层和测试适配新架构命名
2026-04-03 14:59:58 +08:00