[Frontend][Core][Spec Decode] Per-request acceptance stats in OpenAI API responses (#48915)

Signed-off-by: Matthew Kotila <7692737+matthewkotila@users.noreply.github.com>
Co-authored-by: Reed Meyerson <31574681+reed-meyerson@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matthew Kotila
2026-08-20 15:42:49 -07:00
committed by GitHub
co-authored by Reed Meyerson Claude Opus 4.8
parent 2f41c894e3
commit 7cfb97e337
25 changed files with 798 additions and 76 deletions
+9 -1
View File
@@ -16,7 +16,11 @@ from vllm.lora.request import LoRARequest
from vllm.multimodal.inputs import MultiModalFeatureSpec
from vllm.pooling_params import PoolingParams
from vllm.sampling_params import SamplingParams
from vllm.v1.metrics.stats import PrefillStats, SchedulerStats
from vllm.v1.metrics.stats import (
PrefillStats,
RequestSpecDecodeMetrics,
SchedulerStats,
)
from vllm.v1.outputs import LogprobsLists, LogprobsTensors, SamplingMaskLists
from vllm.v1.serial_utils import UtilityResult
@@ -225,6 +229,10 @@ class EngineCoreOutput(
new_sampling_mask: SamplingMaskLists | None = None
# Per-request spec-decode acceptance; attached only on the final output.
# Appended last so `array_like` positional serialization stays compatible.
spec_decode_metrics: RequestSpecDecodeMetrics | None = None
@property
def finished(self) -> bool:
return self.finish_reason is not None