mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 17:30:23 +08:00
fix(usage): 修复缓存创建 token 展示并在总量中计入缓存组件
- gateway/admin 用量载荷在 cache_creation_input_tokens 为 0 时回填 ephemeral_5m/1h 合计 - 标准化用量写入时将 cache_creation/cache_read token 计入 total_tokens - 前端列表与轮询同步新增分类字段,修复缓存 token 列显示
This commit is contained in:
@@ -391,6 +391,10 @@ async function pollActiveRequests() {
|
||||
record.effective_input_tokens = update.effective_input_tokens ?? record.effective_input_tokens
|
||||
record.output_tokens = update.output_tokens
|
||||
record.cache_creation_input_tokens = update.cache_creation_input_tokens ?? undefined
|
||||
record.cache_creation_ephemeral_5m_input_tokens =
|
||||
update.cache_creation_ephemeral_5m_input_tokens ?? undefined
|
||||
record.cache_creation_ephemeral_1h_input_tokens =
|
||||
update.cache_creation_ephemeral_1h_input_tokens ?? undefined
|
||||
record.cache_read_input_tokens = update.cache_read_input_tokens ?? undefined
|
||||
record.cost = update.cost
|
||||
record.actual_cost = update.actual_cost ?? undefined
|
||||
|
||||
Reference in New Issue
Block a user