[Rust Frontend] Box rarely-set fields of per-token output types (#60588)
Signed-off-by: Bugen Zhao <i@bugenzhao.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
1a3a7a8f01
commit
9a585c62aa
@@ -201,7 +201,7 @@ impl ActiveRequest {
|
||||
|
||||
let finished = self.generated >= self.max_tokens;
|
||||
EngineCoreOutput {
|
||||
prefill_stats,
|
||||
prefill_stats: prefill_stats.map(Box::new),
|
||||
..request_output(
|
||||
self.request_id.clone(),
|
||||
new_token_ids,
|
||||
|
||||
@@ -123,11 +123,11 @@ async fn chunk_size_one_outputs_one_token_per_update() {
|
||||
assert_eq!(first.finish_reason, None);
|
||||
assert_eq!(
|
||||
first.prefill_stats,
|
||||
Some(PrefillStats {
|
||||
Some(Box::new(PrefillStats {
|
||||
num_prompt_tokens: 3,
|
||||
num_computed_tokens: 3,
|
||||
..Default::default()
|
||||
})
|
||||
}))
|
||||
);
|
||||
let second = stream.next().await.expect("second").expect("second ok");
|
||||
assert_eq!(second.new_token_ids.len(), 1);
|
||||
|
||||
Reference in New Issue
Block a user