[Frontend] Add return_mm_kwargs to render requests (#60728)

Signed-off-by: Maroon Ayoub <mayoub@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Maroon Ayoub
2026-10-09 08:14:13 +00:00
committed by GitHub
co-authored by Claude
parent f43e4c39e3
commit 8a03ccf7b3
8 changed files with 90 additions and 9 deletions
@@ -197,6 +197,18 @@ class CompletionRequest(OpenAIBaseModel):
),
)
return_mm_kwargs: bool = Field(
default=True,
description=(
"If false, the render response's `features` set `kwargs_data` "
"and `mm_metadata` to null, for callers that need only the token "
"layout and item hashes, such as cache-aware routers. Do not send "
"such a response to `/inference/v1/generate`, which reads a null "
"`kwargs_data` as every item being cached. Only supported on the "
"render endpoints; ignored on regular generation endpoints."
),
)
cache_salt: str | None = Field(
default=None,
min_length=1,