feat(logs): 实时日志展开显示单笔 token 用量与缓存命中率

- calllog 新增 peek_tokens(rid):只读不消耗,供实时日志展示(落库仍由 _row pop)
- AccessLog.add 把 token 挂到条目 tokens 字段
- 实时日志展开新增「Token 用量」块:输入/输出/缓存命中/推理 + 命中率(cached÷prompt)
- 调用日志详情弹窗补同样一行 token(数据取自 tok_* 列)
- 版本 2.9.3 → 2.9.4
This commit is contained in:
jidekin committed 2026-10-23 15:19:39 +08:00
1 parent fdeeee5066
commit d2214bd355
8 files changed
+90 -1

No files matched your search

+1 -1
View File
@@ -355,7 +355,7 @@ _docs_on = config.server.docs_enabled # 安全默认关(report: /docs、/ope
# 2026-09-30: 2.6.1 → 2.7.0(按老板要求整个删除「火山方舟 Coding Plan」供应商:配置/模型/代码/文档/前端下拉/环境变量全清)。
# 2026-09-30: 2.7.0 → 2.7.1(界面提示白话化:熔断器→供应商自动保护、引擎→运行环境、slug→标识;删 120 个未引用死键)。
# ★ 版本号纪律:每次改动都要往上加,小改动加小版本号、大改动加大版本号(README 有专章)。
VERSION = "2.9.3"
VERSION = "2.9.4"
app = FastAPI(
title="API Gateway",