elky
10d369f59c
feat(providers): add provider transfer limits
2026-07-26 15:06:56 +08:00
elky
713010fa0a
fix(gateway): restore auth role refresh and Rust checks
...
Refresh the resolved user role without bypassing owner group and key policies. Resolve Rust 1.95 Clippy failures and make the pending persistence bound test scheduler-independent.
2026-07-22 11:25:24 +08:00
elky
fc92c4f431
perf(gateway): scale request hot paths for 20k streams
...
Shard and singleflight hot-path caches, batch and prioritize candidate and usage lifecycle persistence, and extend database and pressure-test instrumentation for 20k concurrent streams.
2026-07-22 02:11:08 +08:00
elky
e58621a735
Merge PR #669 : align GPT-5.6 and Codex request protocols
2026-07-12 21:50:20 +08:00
elky
7f61bb43c7
feat(security): harden gateway request and runtime controls
2026-07-12 14:10:54 +08:00
MMEXA
0b30cc6b0f
feat(openai): unify tier authorization and settlement
2026-07-11 12:27:05 +08:00
elky
2f1cdb6a0b
Record exhausted usage failures synchronously
2026-07-02 16:08:04 +08:00
elky
6f00e9fc67
Improve gateway transport and usage runtime
2026-06-25 22:36:27 +08:00
elky
d336d1a7fa
Improve gateway scheduling and runtime admission
2026-06-24 01:53:45 +08:00
elky
e9b4efc2d4
fix(ai-serving): preserve explicit request encoding
2026-06-10 18:16:55 +08:00
elky
ef6a11c146
fix(gateway): preserve heartbeat no-path fallback
2026-06-03 00:25:01 +08:00
Entropy.Xu
bb5a4454a5
feat(gateway): 添加标准文本非流式心跳
2026-05-29 14:35:16 +08:00
fawney19
7e76c9763d
Clarify stream first byte timeout message
2026-05-26 15:02:50 +08:00
Novick Yuan
5dfccdec3e
Fix stream candidate watchdog timeout semantics
2026-05-25 21:43:13 +08:00
fawney19
d3249485fa
Fix stream timeout semantics
2026-05-25 20:09:37 +08:00
fawney19
d18b13a91a
fix: harden frontdoor and usage ingestion
2026-05-22 23:57:38 +08:00
stabey and Claude Opus 4.7
40434005c0
fix(gateway): use total_ms for non-stream upstream watchdog
...
When the endpoint forces upstream_stream_policy=force_non_stream while
the client streams, the local stream candidate watchdog still preferred
timeouts.first_byte_ms — a non-stream upstream produces no early first
byte, so the watchdog fired before the HTTP request_timeout and aborted
otherwise-healthy attempts at ~300s.
Read upstream_is_stream from report_context and invert the priority:
non-stream upstreams use total_ms first, falling back to first_byte_ms
and then the default; streaming upstreams keep the previous order.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 15:26:42 +08:00
fawney19
1b570daf72
Revert "Merge PR #504 "
...
This reverts commit d216a9e219 , reversing
changes made to 21e82abd54 .
2026-05-19 17:23:57 +08:00
fawney19
d8a9d7eb5e
chore: format merged PR changes
2026-05-19 08:13:56 +08:00
MMEXA
4317ff78b1
Expose local scheduling failures in usage UI
2026-05-18 16:28:37 +00:00
Kayphoon
2958041dc7
feat(gateway): add reversible chat pii redaction
2026-05-13 18:25:13 +08:00
fawney19
bacb14e5f0
refactor: lazy pool key scheduling
2026-05-11 00:12:05 +08:00
Entropy.Xu
5268f62a64
feat: add sync image heartbeat toggle
2026-05-10 12:40:52 +08:00
Entropy.Xu
3b4f27f767
Add Codex image progress heartbeat
2026-05-09 01:21:26 +08:00
fawney19
fd44906bb7
fix provider pool quota status handling
2026-05-07 11:28:44 +08:00
fawney19
f959f02d40
Implement transport profile routing
2026-05-05 22:21:23 +08:00
fawney19
a24e4a793d
Refactor pool candidate scheduling
2026-05-03 20:14:29 +08:00
fawney19
47ee8b9c13
refactor: fold ai surfaces into formats
2026-05-02 18:19:39 +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
07a319259b
Normalize canonical API formats
2026-04-29 10:20:41 +08:00
fawney19
3b542434a2
Unify candidate ranking pipeline
2026-04-27 17:24:31 +08:00
fawney19
4ec591fbf2
centralize openai responses alias handling
2026-04-26 23:59:53 +08:00
fawney19
5b914aa78c
migrate ai format conversion to responses adapters
2026-04-26 23:59:53 +08:00
fawney19
baa0ddd787
Improve runtime miss usage diagnostics
2026-04-26 01:44:54 +08:00
fawney19
429fdb47e6
fix(usage): 简化本地执行错误提示
2026-04-25 20:46:22 +08:00
fawney19
f3c9835759
feat(pool): 引入 pro_first 调度预设、Pool 候选持久化跳过与诊断信息优化
...
- 新增 pro_first 调度预设(Pro 优先),更新 plus_first 仅针对 Plus 计划,移除 free_team_first
- Pool 内部候选(pool_key_index 不为空)跳过 DB 持久化(available/skipped/unused 均适用)
- LRU 排序新增 catalog_lru_score 回退:runtime 无记录时使用 last_used_at_unix_secs
- 执行路径 miss 诊断消息细化为中文,按 reason 分类输出可读说明
- build_local_request_candidate_status_record 补充 extra_data 和 created_at_unix_ms 字段
- OpenAI CLI 计划构建流程补充候选评估进度跟踪与 terminal reason 设置
- 前端 PoolSchedulingDialog 增加 pro_first 预设展示,修复 LRU 默认预设检测逻辑
2026-04-24 13:29:05 +08:00
Entropy.Xu
0f94f92c37
fix(provider): 将rust分支的gemini cli端点行为对齐到python分支 ( #321 )
...
* fix(provider): 对齐 Vertex/Gemini 上游发包与 Python master
- provider-transport: 为 custom+aiplatform 推断 Vertex API key 上下文并统一 URL 构建顺序,复用共享 request_url 构建最终上游地址
- ai-pipeline/gateway: Vertex Gemini 路径改为仅使用 URL query key,不再向上游附带 x-goog-api-key header;同步对齐 standard/admin/test-connection/runtime miss 摘要中的最终 URL
- gemini conversion: 按 Python master 输出 Gemini 请求体,补齐 system_instruction / generation_config / tool_config / function_declarations 形态,并移植 Gemini schema 清洗逻辑
- scheduler/executor: 将最终 upstream_url、mapped_model、key_name 写入候选 extra_data,运行时 miss 诊断优先展示真实展开后的上游 URL 便于服务器排障
* fix(provider): 修复 Vertex provider 测试与本地调度链路
* fix(provider): 对齐 Vertex 本地执行与 Rust CI
2026-04-23 23:01:06 +08:00
fawney19 and Entropy.Xu
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
Entropy.Xu
f55f22d2e8
feat(codex-image): 封装 GPT Image 2 图片接口并收紧错误处理
...
- 新增 openai:image 路由、planner 与 finalize,内部通过 Codex responses image_generation tool 执行生图
- 补充 Codex OAuth/header 兼容、图片 success report 本地处理与相关前后端/集成测试
- 禁止 chat/completions 使用 gpt-image-2,图片接口限制 n=1,并移除 Provider 模型页的图片能力开关
2026-04-22 22:46:28 +08:00
fawney19
226a6e58d5
refactor(gateway): 重构格式转换候选资格检查并优化测试基础设施
...
- 将 format_conversion_disabled 的过滤提前到候选遴选阶段,替代原来的 skip_reason 标记机制
- 为测试添加 execution_runtime_sync_override 直接注入支持,避免启动额外 HTTP 服务器
- 将 submit_terminal_event 改为 async record_terminal_event 确保失败用量事件可靠入库
- 新增 test_support 模块封装可重试的 loopback 端口绑定逻辑
- 前端:poolTrace 将 skipped 从隐藏状态移除,新增 buildPoolParticipatedCandidates 统一新旧链路逻辑,并将 skipped 状态色改为 foreground
2026-04-20 16:59:18 +08:00
RWDai and fawney19
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
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
ec0bde819a
refactor: 简化 outcome clippy lint 并移动 usage 测试模块至文件末尾
2026-04-11 09:35:31 +08:00
fawney19
6144473ebe
feat: 新增 frontdoor 执行回环守卫与多项可观测性增强
...
- 新增 frontdoor_loop_guard 模块,检测并拒绝 execution runtime 回环到本地网关的请求(HTTP 508)
- candidate loop 引入 span tracking、执行尝试日志与流式看门狗超时
- 本地故障转移策略支持从 report_context 加载,新增 append_local_failover_policy_to_value
- runtime tracing 美化:移除 identity 前缀,按 span 深度树形缩进,target 固定宽度展示
- Codex OpenAI CLI 补齐 chatgpt-account-id/x-client-request-id/session_id/conversation_id 请求头
- OpenAI CLI same/cross-format 聚合规则放宽以支持 openai:compact 客户端格式,并过滤 error-like 响应体
- auth/proxy/finalize 日志补充 user_id/api_key_id/api_key_name/balance_remaining 等字段
- 启动日志拆分为 starting/ready/config 三段,新增 resolve_bind_http_base_url
- access_log middleware 将生成的 trace_id 回注到下游请求头
- Cargo.toml 启用 serde_json preserve_order 特性
2026-04-11 01:50:24 +08:00
fawney19
010ab127e2
feat: 扩展 cache creation token 细分统计与 effective_input_tokens 计费逻辑
...
- 新增 cache_creation_ephemeral_5m/1h_input_tokens 字段,区分不同 TTL 的缓存写入 token
- 引入 effective_input_tokens(扣除 cache read 后的有效输入 token),暴露给 usage 接口
- billing 规则生成器支持 5m/1h ephemeral cache 独立定价与分级计费
- usage_mapper 增加 Claude/Anthropic 格式映射,修复 OpenAI responses 格式字段兼容性
- 迁移逻辑增强:支持 checksum 容错、applied/pending 数量日志、逐步执行信息输出
- executor 抽离 LocalExecutionRequestOutcome 类型,统一 sync/stream 路径返回语义
- provider-transport auth 层新增 complete passthrough headers 构建逻辑
- 前端 usage 类型全面补充 effective_input_tokens、cache_creation_tokens、total_input_context 字段
2026-04-10 17:44:55 +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
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