fawney19
f8545c5141
chore: bump aether-proxy version to 0.3.2
2026-04-19 01:04:55 +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
RWDai
425227509a
Fix/provider query cli model tests ( #312 )
...
* fix(admin): support openai cli provider-query model tests
* fix(admin): support claude and gemini cli provider-query model tests
* fix(admin): preserve provider-query prompts on cli fallback
* test(usage): relax async status wait for local usage checks
* fix(gateway): align provider-query CLI auth and headers
* fix(gateway): resolve provider-query clippy lint
---------
Co-authored-by: fawney19 <elky0401@gmail.com >
2026-04-18 23:05:39 +08:00
fawney19
f2a3836877
Improve tunnel proxy diagnostics and request body spooling
2026-04-18 21:13:37 +08:00
fawney19
3363592751
Refactor usage body capture and stream terminal reporting
2026-04-18 17:48:21 +08:00
fawney19
569242d72f
refactor gateway orchestration and failover effects
2026-04-18 11:35:11 +08:00
fawney19
3321bb3ccc
Implement independent provider pool scheduling runtime
2026-04-17 23:05:49 +08:00
RWDai
dd4641d618
Fix/provider query non kiro tests ( #311 )
...
* fix(admin): enable local provider-query tests for non-kiro providers
* test(admin): cover non-kiro provider-query model execution
* fix(admin): preserve provider-query test errors and failover retries
* fix(admin): handle provider-query test alias and HTTP retry edges
* fix(admin): extend provider-query failover coverage and fallback behavior
* fix(admin): prefer supported endpoints for provider-query tests
* fix(admin): prefer provider-query endpoints with compatible keys
* fix(admin): fall back to compatible provider-query endpoints
* fix(admin): align provider-query local tests with transport policy
---------
Co-authored-by: fawney19 <elky0401@gmail.com >
v0.7.0-rc9
2026-04-17 19:45:20 +08:00
fawney19
0ce61bc91c
fix(gateway): align provider restrictions with provider catalog
2026-04-17 18:59:13 +08:00
fawney19
cb647d95f9
Hide format_conversion_disabled skips when exact-format candidate shares the same key
...
Also switch failover test to surface an auth failure instead of a 502 upstream error.
2026-04-17 18:24:36 +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
AAEE86
e5d3722adf
fix(admin): force manual oauth refresh to bypass local cache ( #308 )
...
Co-authored-by: fawney19 <elky0401@gmail.com >
2026-04-17 14:12:15 +08:00
RWDai
ff4e853fd3
Fix/usage transfer filter ( #307 )
...
* fix(usage): 恢复 usage 列表中的 fallback 路由信号
* fix(admin): 支持 usage 记录展示和筛选 fallback 转移
* fix(usage): 在用户 usage 记录中暴露 fallback 标记
* fix(usage): 共享 usage 页面支持 fallback 筛选
* fix(usage): 对齐 fallback 筛选相关前端类型
* fix(usage): propagate has_fallback through active polling
---------
Co-authored-by: fawney19 <elky0401@gmail.com >
2026-04-17 13:38:23 +08:00
fawney19
654a41c3b0
Revert "fix(admin): force manual oauth refresh to bypass local cache"
...
This reverts commit 85a630cfa9 .
2026-04-17 13:36:51 +08:00
Entropy.Xu
c6af4791f8
fix(oauth): 对齐 OpenAI 回调 state 解析与提交流程 ( #306 )
...
Co-authored-by: fawney19 <elky0401@gmail.com >
2026-04-17 13:26:23 +08:00
fawney19
85a630cfa9
fix(admin): force manual oauth refresh to bypass local cache
2026-04-17 13:23:51 +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
RWDai
96a25d058b
Fix OpenAI family local auth to use bearer ( #302 )
...
* Fix OpenAI family local auth to use bearer
* test(gateway): fix bearer auth assertions for openai local flows
* test(usage): make local usage status wait resilient
* style(gateway): apply rustfmt to usage test helper
---------
Co-authored-by: fawney19 <elky0401@gmail.com >
2026-04-17 11:10:05 +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
54d77598ae
ci(rust): 将环境变量提升至全局,各 job 添加 toolchain 显示步骤
v0.7.0-rc8
2026-04-17 01:58:12 +08:00
fawney19
0bcfc7d352
fix(ci): 将 rustfmt/clippy 组件安装改为独立 rustup 步骤
2026-04-17 01:53:59 +08:00
fawney19
faaaec28e1
fix(clippy): 修复冗余 into_iter、sort_by 及 match 嵌套 if 等 lint 警告
2026-04-17 01:43:45 +08:00
fawney19
dde02e6111
fix(ci): 恢复 rust-toolchain@stable,版本由 rust-toolchain.toml 控制
2026-04-17 01:17:29 +08:00
fawney19
aadc6b665c
chore: 锁定 Rust 版本为 1.95.0,统一本地与 CI 环境
2026-04-17 01:15:16 +08:00
fawney19
6730e821b2
fix(clippy): 修复 collapsible_match 和 unnecessary_sort_by 警告
2026-04-17 01:12:43 +08:00
fawney19
05ab09c469
fix(data): 修复 global_models 插入时缺少 usage_count 字段导致的列数不匹配问题
2026-04-17 01:09:14 +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
github-actions[bot]
6e5af5ef70
chore(proxy): update download links for proxy-v0.3.1
2026-04-16 12:41:35 +00:00
fawney19
d312c397e1
chore: bump aether-proxy version to 0.3.1
proxy-v0.3.1
2026-04-16 20:34:02 +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
AAEE86
10605d9fb0
fix(admin): 同步 OAuth 刷新后的状态快照有效期 ( #300 )
...
手动刷新 OAuth Token 后同步回写 status_snapshot.oauth
修复号池管理页面仍显示旧有效期的问题
补充刷新后快照更新的回归测试
2026-04-16 14:37:59 +08:00
AAEE86
af9711c2a2
fix(pool): 修复 Codex 配额倒计时不准确 ( #297 )
...
* fix(pool): 修复 Codex 配额倒计时不准确
- 后端号池 keys payload 增加 upstream_metadata 透传
- 前端补充 PoolKeyDetail.upstream_metadata 与 Codex reset_after_seconds 类型
- 号池页倒计时优先使用 reset_at/reset_seconds/updated_at 结构化数据计算
- 仅在缺少结构化字段时回退 account_quota 文案解析
* fix(pool): 将已重置的 Codex 配额恢复为 100%
- reset_after_seconds/reset_seconds 会按 updated_at 扣减经过时间(不再当作静态值)
- 若窗口已重置(剩余秒数 <= 0),该窗口 used_percent 按 0 处理
2026-04-16 13:34:41 +08:00
fawney19
9a41b2c0dc
feat: 候选排序引入 API 格式偏好, 追踪页面展示完整格式转换信息
...
- 候选排序优先同 kind (chat/cli) 再同 family, 替代原有固定顺序
- 不再隐藏 format_conversion_disabled 候选, 保留完整追踪链路
- DecisionTrace 新增 provider/endpoint/key 格式转换相关字段
- 前端追踪面板新增 Key 支持端点和转换策略展示
2026-04-16 13:00:44 +08:00
fawney19
d805a28c9a
feat: 请求候选追踪添加 proxy 元数据, 修复 usage 状态回退, 优化前端轮询
...
- 在各 planner decision payload 中注入 proxy trace 信息 (node_id, node_name, url, source)
- request_candidate 报告上下文支持 proxy 字段, extra_data 合并逻辑改为 merge 而非覆盖
- SQL/内存仓库防止 usage status 从 streaming 回退到 pending
- 前端移除活跃请求完成时的全表刷新, active discovery 尊重 globalAutoRefresh 开关
2026-04-16 11:57:42 +08:00
fawney19
ffe34120c1
tune(tunnel): 放宽 ping 间隔和超时参数, 增大出站队列容量
...
- gateway ping 间隔 500ms -> 15s, 出站队列 128 -> 512
- proxy ping 间隔 1s -> 10s, 连接超时 1.5s -> 3s, stale 超时 5s -> 30s
proxy-v0.3.0
v0.7.0-rc7
2026-04-16 11:05:44 +08:00
fawney19
47a11ee0b5
feat(tunnel): 添加流帧分发超时机制和结构化请求日志
...
- dispatcher: 为 stream handler 的帧接收添加超时保护, 防止单个
handler 阻塞 WebSocket 读循环; 超时后发送 StreamError 并清理流
- stream_handler: 在所有请求完成和错误路径添加结构化日志, 记录
method/host/path/status/duration 等关键信息
- 将常规隧道连接/断开日志从 info 降级为 debug, 减少日志噪音
2026-04-16 10:32:05 +08:00
fawney19
28a489acbe
fix(tunnel): writer 退出时立即标记连接关闭, 防止后续请求堵塞
...
- ws_tx.send 添加 15s 超时, 防止 TCP 背压导致 writer 无限阻塞
- writer 退出时立即 request_close(), 不等 reader 结束即从路由表摘除连接
- ws_tx.close 添加 5s 超时, 防止 close 握手阻塞
2026-04-16 02:29:36 +08:00
fawney19
7597caa3a5
修改日志格式
2026-04-16 02:13:27 +08:00
fawney19
586d2cc42b
fix(tunnel): 为 hub reader body 推送添加超时, 防止流间 head-of-line blocking
...
push_body_chunk 原先使用无超时的 channel send, 当消费端慢时会阻塞
整条 proxy 连接的 reader, 导致同连接上其他 stream 的帧无法路由。
添加 5 秒超时后, 单个 stream 的背压不再影响其他 stream。
2026-04-16 02:11:32 +08:00
fawney19
1fd1f8216d
fix(gateway): 补充 example 中缺失的 idle_timeout 字段
2026-04-16 01:14:49 +08:00
fawney19
0c3f730852
fix(testkit): 补充 TunnelConnConfig 缺失的 idle_timeout 字段
2026-04-16 01:09:53 +08:00
fawney19
b678132176
fix(tunnel): 默认禁用 proxy idle timeout (设为 0)
...
保留 idle timeout 机制但默认不启用,避免误断连。
2026-04-16 00:56:24 +08:00
fawney19
e4be1d6b56
Revert "refactor(tunnel): 移除 proxy 连接 idle timeout 机制"
...
This reverts commit b004551fe5 .
2026-04-16 00:53:40 +08:00
fawney19
5f0fba1807
diag(tunnel): writer/reader 帧计数诊断日志
...
- writer task 记录发送帧数、Binary 帧大小、send 失败原因
- reader 记录接收帧总数,disconnect 时输出
- 用于定位 gateway→proxy 数据流是否正常
2026-04-16 00:31:10 +08:00
fawney19
205f78b39c
style: cargo fmt
2026-04-15 23:54:14 +08:00
fawney19
5aa8883865
fix(tunnel): gateway 回复 WebSocket Pong 防止 proxy stale 断连
...
gateway reader 之前用 `_ => {}` 忽略了 proxy 发来的 WebSocket Ping,
导致 proxy 的 stale_timeout (5s) 持续触发断连重连循环,
所有隧道请求都因等待 response headers 超时而失败。
同时补充 hub 诊断日志和连续请求集成测试。
2026-04-15 23:45:22 +08:00
fawney19
1e2c3fc4fc
fix(tunnel): 移除 testkit 和 example 中残留的 idle_timeout 引用
2026-04-15 22:18:41 +08:00
fawney19
b004551fe5
refactor(tunnel): 移除 proxy 连接 idle timeout 机制
...
idle timeout 在实际使用中容易误断活跃连接,移除该逻辑并简化 reader 循环。
2026-04-15 22:10:30 +08:00