[Feature][V1]: suupports cached_tokens in response usage (#18149)

Co-authored-by: simon-mo <xmo@berkeley.edu>
This commit is contained in:
Chauncey
2025-05-23 01:41:03 -07:00
committed by GitHub
co-authored by simon-mo
parent 54af915949
commit b046cf792d
5 changed files with 27 additions and 5 deletions
+3
View File
@@ -107,6 +107,9 @@ class EngineCoreOutput(
events: Optional[list[EngineCoreEvent]] = None
kv_transfer_params: Optional[dict[str, Any]] = None
# The number of tokens with prefix cache hits.
num_cached_tokens: int = 0
@property
def finished(self) -> bool:
return self.finish_reason is not None