[Security] Gate per-request multimodal processor kwargs (#58830)
Signed-off-by: Juan Pérez de Algaba <jperezde@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
2f41e00235
commit
31f2e70cd3
@@ -93,6 +93,11 @@ class BaseFrontendArgs:
|
||||
"""Whether to trust the chat template provided in the request. If False,
|
||||
the server will always use the chat template specified by `--chat-template`
|
||||
or the ones from tokenizer."""
|
||||
trust_request_mm_kwargs: bool = False
|
||||
"""Whether to trust per-request multimodal kwargs (`mm_processor_kwargs`
|
||||
and `media_io_kwargs`). If False, the server rejects non-empty values
|
||||
because they can change multimodal preprocessing resource usage. Only
|
||||
enable this when API clients are trusted."""
|
||||
default_chat_template_kwargs: dict[str, Any] | None = None
|
||||
"""Default keyword arguments to pass to the chat template renderer.
|
||||
These will be merged with request-level chat_template_kwargs,
|
||||
|
||||
Reference in New Issue
Block a user