Commit Graph

85 Commits

Author SHA1 Message Date
fawney19
1a196c8cf2 Merge pull request #443 from AAEE86/rust
feat(admin): add Done-hub provider ops template
2026-05-13 18:42:28 +08:00
fawney19
5d1460e051 refactor: extract provider pool abstractions 2026-05-13 18:19:15 +08:00
AAEE86
afbb656510 feat(admin): add Done-hub provider ops template
- 新增 Done-hub Cookie 认证架构
- 使用 /api/user/profile 查询余额,按 quota / 500000 换算
- 补充余额解析、认证头和校验相关测试
2026-05-13 16:10:59 +08:00
AAEE86
bfbf7a4663 fix(usage): 统一用户排行榜 Token 统计口径
- 将用户排行榜 Tokens 调整为与仪表盘今日 Token 一致
- 统一 effective input、cache creation fallback、cache read 计算规则
- 补齐 Postgres 聚合、admin 内存构建和内存仓库回退路径
- 增加缓存命中场景的统计口径测试
2026-05-11 22:34:37 +08:00
fawney19
ef4cc55c9a Record per-candidate upstream error bodies 2026-05-11 02:30:45 +08:00
fawney19
228253c166 Merge pull request #410 from Entropy-Xu/codex/codex-image-progress-heartbeat
Add Codex image progress heartbeat
2026-05-10 17:57:33 +08:00
fawney19
d246f6b42c fix: align user group access controls 2026-05-10 17:28:23 +08:00
fawney19
79b3a76dc1 Merge pull request #411 from buniakinazach-dev/feat/codex-spark-quota
新增 Codex Spark 额度展示
2026-05-10 09:25:44 +08:00
fawney19
c2bf17b4dd Fix Codex Spark quota formatting 2026-05-10 09:14:19 +08:00
fawney19
0f42a6ed82 Fix Codex image progress heartbeat merge regressions 2026-05-10 02:10:23 +08:00
fawney19
79d07ac79a Improve request trace upstream diagnostics 2026-05-09 10:46:04 +08:00
Alice
757c264e3e 新增 Codex Spark 额度展示
解析 GPT-5.3-Codex-Spark 额度窗口,并在号池页面和提供商账号抽屉中展示 Spark 周额度与 5H 额度。Spark 额度仅用于展示,不影响普通 Codex 周额度和 5H 额度的调度与筛选逻辑。
2026-05-09 10:44:45 +08:00
Entropy.Xu
eda3738d59 Merge branch 'aether-rust-pioneer' of https://github.com/fawney19/Aether into codex/codex-image-progress-heartbeat
# Conflicts:
#	frontend/src/features/usage/components/__tests__/HorizontalRequestTimeline.spec.ts
2026-05-09 01:26:44 +08:00
Entropy.Xu
3b4f27f767 Add Codex image progress heartbeat 2026-05-09 01:21:26 +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
fawney19
fa22384f24 Merge remote-tracking branch 'origin/pr/399' into aether-rust-pioneer
# Conflicts:
#	crates/aether-data/src/lifecycle/bootstrap/postgres.rs
#	crates/aether-data/src/lifecycle/migrate/tests.rs
2026-05-08 02:52:13 +08:00
fawney19
c52ef1993f Improve provider OAuth device flow 2026-05-08 01:33:23 +08:00
Entropy.Xu
cc5cb3475e feat: add management token permissions 2026-05-07 23:48:29 +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
fawney19
47a755a585 Merge branch 'pr-389' into aether-rust-pioneer 2026-05-07 01:34:30 +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
Codex
41f75a3f19 feat: show chatgpt web image quota 2026-05-06 22:58:47 +08:00
fawney19
33ed7c0737 Fix admin import export version checks 2026-05-06 16:06:45 +08:00
Codex
7eaf3e7d03 feat: support chatgpt web access token import 2026-05-06 14:45:39 +08:00
fawney19
2eb4afbec4 Merge remote-tracking branch 'origin/pr/384' into codex/pr-376-377-383-384-combined
# Conflicts:
#	frontend/src/views/admin/PerformanceAnalysis.vue
2026-05-06 02:39:53 +08:00
fawney19
cf27773582 feat: improve admin performance analysis 2026-05-06 02:01:32 +08:00
fawney19
3264857e4a fix(usage): repair aggregate usage statistics 2026-05-06 01:13:23 +08:00
Entropy.Xu
ff1ed8b57d feat(stats): 添加 Provider 性能统计分析 2026-05-05 11:24:16 +08:00
Kayphoon
5abe664d65 feat: add embedding and rerank support 2026-05-03 17:32:41 +08:00
fawney19
c4ea042eb4 feat: add model directive management 2026-05-03 14:48:25 +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
4fc7cecf30 Fix OAuth token import and table filters 2026-05-01 02:14:49 +08:00
fawney19
9e2faa7e5b Tighten local auth allow-list matching 2026-04-30 00:26:33 +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
17f09fc8c1 Expose ranking metadata in request trace 2026-04-27 17:24:32 +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
912a92cd1a refactor(rules): 规则引擎容错优化,无效规则条目跳过而非中止整个规则集
- header/body rules 的 _are_locally_supported 简化为仅检查是否为数组
- apply 逻辑中遇到格式错误/不支持的规则条目改为 continue 跳过,而非 return false
- 允许非字符串 header value,自动序列化为 JSON 字符串
- 宽松处理无效 regex flag,不再拒绝整条规则

fix(gateway): Claude CLI 路由仅检查 bearer 头,不排斥同时携带 x-api-key 的请求

feat(observability): 监控链路候选展示解密 auth_config 的账号标签和 OAuth 计划类型
2026-04-25 19:46:52 +08:00
fawney19
00744c0ce5 feat(observability): 引入错误链路 error_flow 元数据并区分上游/客户端错误
- 网关在本地 failover 时构建 error_flow 元数据(分类/决策/传播策略),写入 report_context
- scheduler-core 解析并透传 error_flow 至候选 extra_data
- admin usage 详情拆分 request/upstream/client/failure_summary 错误域,敏感上游错误标记为 suppressed
- 前端 RequestDetailDrawer 拆出"返回客户端"与"上游响应"双错误卡片
- HorizontalRequestTimeline 节点详情展示真实请求错误及 error_flow 标签
2026-04-25 17:01:07 +08:00
fawney19
f695238e8a feat(billing): 引入 billing v3 settlement snapshot 及 usage_billing_facts 视图
- 新增迁移 20260424000000:为 usage_settlement_snapshots 添加 settlement_snapshot、
  billing_dimensions、billing_input/output/cache tokens、billing_total_cost_usd 等列,
  并创建 usage_billing_facts 视图(从 settlement snapshot 覆盖原始 usage token/cost 字段)
- event_enrichment:构建结构化 settlement_snapshot(含 pricing_snapshot、billing_plan_snapshot、
  resolved_dimensions、cost_breakdown 等),写入 request_metadata
- pricing:新增 pricing_source() 方法区分 provider_override / global_default / unpriced
- sql.rs:settlement snapshot 写入新列;用量汇总查询改用 usage_billing_facts 视图
- maintenance/runtime:所有统计查询的 FROM usage 替换为 FROM usage_billing_facts
- admin observability:在 settlement 响应中暴露 settlement_snapshot / billing_dimensions,
  并从 metadata 中剥离对应字段
- request_metadata:允许 settlement_snapshot / billing_dimensions 字段传播
- stream execution:在首个数据帧到达时记录 TTFB,补全流式请求的 streaming 事件
2026-04-24 17:52:33 +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
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