[Bugfix] Expose usage field in GenerateResponse for disaggregated serving (#42748)

Signed-off-by: AIvashov <ivashov.aleksey@proton.me>
Signed-off-by: NickLucche <nicolo.lucchesi@mistral.ai>
Co-authored-by: NickLucche <nicolo.lucchesi@mistral.ai>
This commit is contained in:
Aleksei Ivashov
2026-07-01 10:00:19 +00:00
committed by GitHub
co-authored by NickLucche
parent e7d0fcbc09
commit 024b06b0dc
2 changed files with 4 additions and 2 deletions
@@ -221,8 +221,10 @@ class GenerateResponse(BaseModel):
"through out the inference process and return in response."
),
)
model: str | None = None
created: int | None = None
choices: list[GenerateResponseChoice]
usage: UsageInfo | None = Field(default=None)
prompt_logprobs: list[dict[int, Logprob] | None] | None = None
kv_transfer_params: dict[str, Any] | None = Field(
@@ -320,7 +320,7 @@ class ServingTokens(OpenAIServing):
request_metadata.final_usage_info = usage
response = GenerateResponse(
id=request_id,
request_id=request_id,
created=created_time,
model=model_name,
choices=choices,