Commit Graph
12 Commits
Author SHA1 Message Date
mayrain e5f1f52759 feat(model-test): wire image previews into provider tests 2026-05-16 21:15:27 +08:00
mayrain edacc5a7d0 feat(model-test): add image-aware request helpers 2026-05-16 21:15:27 +08:00
mayrain 43c476d54a fix: refine provider model test dialog 2026-05-12 20:11:37 +08:00
mayrain 9f26383de5 fix: route provider model tests through candidates 2026-05-12 20:11:16 +08:00
mayrain 8f082674d7 fix: align embedding provider request formats 2026-05-12 20:10:52 +08:00
mayrain fca3f24d91 fix: preserve legacy admin config imports 2026-05-12 20:10:27 +08:00
mayrain 54afe35fcc feat(usage): show output speed in usage records
Display completed request output speed in the usage records table while keeping active requests focused on first-byte latency and live total duration.

The visible table keeps the compact tps label, while the tooltip expands the same value as tokens/s alongside first-byte, total, and generation durations.

Constraint: Synced against aether-rust-pioneer at 77c04749 with no upstream diff

Confidence: high

Scope-risk: narrow

Tested: npm run test:run -- src/features/usage/components/__tests__/UsageRecordsTable.spec.ts src/features/usage/__tests__/performance.spec.ts

Tested: npm run type-check

Tested: npm run build

Not-tested: Full backend test suite
2026-05-06 17:32:23 +08:00
mayrain 6b6d32b4a3 feat(usage): 新增输出速度统计与请求详情性能分析
- 把 upstream_is_stream 物化到 usage 与 billing facts,避免 Provider 聚合回连 public.usage
- 统一前端标准/流式 TPS 计算与显示,流式按首字后生成耗时计算
- 新增请求详情抽屉展示单请求输出速度与 Provider 聚合 TPS
2026-05-05 17:34:12 +08:00
mayrain f0197b685f fix(data): 同步模型调用次数至 global_models 读模型
- 模型列表改为读取 global_models.usage_count,避免每次扫描 usage 明细表
- 通过历史 backfill 与 usage upsert delta 维护该读模型
- 详情页保留实时 facts 兜底,统一排除 pending/streaming 状态
2026-05-05 17:34:02 +08:00
mayrain 53fa33b0c5 fix(dashboard): 修复仪表盘与明细统计数值不一致并重建 cost_savings 聚合
- 统一 dashboard 聚合与 raw 查询的 token 计算,拆分今日节省和周期节省
- cache savings 改用 input price 估算未命中成本,修复历史 cost_savings 偏高
- raw 查询 total_tokens 改用 effective_input + output + cache_creation + cache_read 公式
- 新增独立 backfill 重建历史 cost_savings 聚合表,保留已发布 backfill 不变
2026-05-05 17:33:16 +08:00
mayrain 2f915b33c7 perf(usage): 重构多天聚合查询为数据库端按天分组计算
- 多天范围的模型、供应商和 API 格式分析复用已有用户日聚合表
- 只对未完成窗口回退明细查询,再合并排序截断
- 避免长范围直接扫 usage_billing_facts 视图
2026-05-05 17:33:04 +08:00
mayrain fd8230121c fix(usage): 修复多天统计 NUMERIC→f64 解码失败导致记录清空
- 多天统计从日聚合表 SUM numeric 字段后返回 NUMERIC,代码按 f64 解码失败
- 显式添加 ::DOUBLE PRECISION 类型转换
- 管理员统计加载失败时不再清空已加载的记录列表
2026-05-05 17:32:50 +08:00