[Front-end] [Messages] Populate num_cache_creation_tokens (#48535)

Signed-off-by: Yifan Zong <yzong@redhat.com>
This commit is contained in:
yzong-rh
2026-07-18 13:04:35 -04:00
committed by GitHub
parent e94243893d
commit a287eb163f
15 changed files with 201 additions and 127 deletions
@@ -103,6 +103,9 @@ pub struct PrefillStats {
/// Tokens to be prefilled from external KV transfer.
#[serde(default)]
pub num_external_cached_tokens: u32,
/// Prompt tokens newly admitted into the local prefix cache.
#[serde(default)]
pub num_cache_creation_tokens: u32,
}
/// Stats for debugging the metrics calculation.
+1
View File
@@ -375,6 +375,7 @@ mod tests {
num_cached_tokens: 4,
num_local_cached_tokens: 4,
num_external_cached_tokens: 0,
..Default::default()
}),
..Default::default()
},