Skip to content

[Frontend] Replace return_mm_kwargs with an mm_payload enum on render requests - #61427

Merged
DarkLight1337 merged 2 commits into
vllm-project:mainfrom
hickeyma:mm-payload-enum
Oct 15, 2026
Merged

DarkLight1337 merged 2 commits into
vllm-project:mainfrom
hickeyma:mm-payload-enum

Conversation

@hickeyma

@hickeyma hickeyma commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Replaces the return_mm_kwargs bool from #60728 with an mm_payload enum on render requests. This enables the "source bytes" option from #46722 has somewhere to go later.

Claims

  • New mm_payload: "tensors" | "none" field (default "tensors") on the chat, completions, Messages and Responses request models
  • return_mm_kwargs still works as a deprecated alias. false means mm_payload="none"
  • No behavior change for default requests or for clients already sending return_mm_kwargs: false

Validation

  • pytest tests/entrypoints/scale_out/token_in_token_out/test_mm_serde.py -v: passes
  • pre-commit run passes, including mypy

New test test_return_mm_kwargs_is_alias_for_mm_payload covers the alias on all four request models. No model output change, so no evals.

Details

return_mm_kwargs is in v0.32.0rc0 but not in a final release. This means it is the cheap time to change its shape. @vMaroon suggested one three valued field (tensors, source bytes, none) in #46722. This PR lands the first two values and leaves "source" to #53169.

If both fields are set, mm_payload overrides. extract_mm_features now takes mm_payload instead of include_mm_kwargs.

Not a duplicate, no open PR changes this flag. #58660 speeds up render serialization, #61418 only uses the flag and #53169 adds raw image bytes which would plug into this enum.

@vMaroon @DarkLight1337


Pull Request Checklist
  • I used vLLM's /pr-checklist skill. (Mandatory for agents, optional for humans).

  • AI assistance was used during the creation of this PR.

  • Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.

  • Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.

  • Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.

  • Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.

return_mm_kwargs from vllm-project#60728 is a bool, so it has no room for the
"source bytes" option discussed in vllm-project#46722. Switch to
mm_payload: "tensors" | "none" (default "tensors") on the chat,
completions, Messages and Responses request models.

return_mm_kwargs still works as a deprecated alias. false means
mm_payload="none" and mm_payload overrides  if both are set.

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
@hickeyma
hickeyma marked this pull request as ready for review October 13, 2026 14:21

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify

mergify Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Documentation preview: https://vllm--61427.org.readthedocs.build/en/61427/

@DarkLight1337 DarkLight1337 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@DarkLight1337

Copy link
Copy Markdown
Member

/ci run

@DarkLight1337
DarkLight1337 enabled auto-merge (squash) October 15, 2026 11:14
@github-actions github-actions Bot added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 15, 2026
@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #95118 for commit 7217ded2dea0.

@DarkLight1337
DarkLight1337 merged commit 252be28 into vllm-project:main Oct 15, 2026
107 checks passed
@hickeyma
hickeyma deleted the mm-payload-enum branch October 15, 2026 13:04
tessapham pushed a commit to tessapham/llm-d-router that referenced this pull request Oct 15, 2026
vLLM replaced the return_mm_kwargs render option with mm_payload in
vllm-project/vllm#61427 and kept return_mm_kwargs as an alias that is
ignored when mm_payload is set, so a client-sent mm_payload overrides
omitMMKwargs. Sending both keeps v0.32, which knows only
return_mm_kwargs, and lets the router's values win on later versions.

Signed-off-by: Maroon Ayoub <mayoub@redhat.com>
Signed-off-by: Maroon Ayoub <Maroonay@gmail.com>
@khluu khluu added this to the v0.32.0 cherry picks milestone Oct 15, 2026
khluu pushed a commit that referenced this pull request Oct 17, 2026
… requests (#61427)

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
michael-gpu pushed a commit to practical-inference/vllm-ampere-extended that referenced this pull request Oct 20, 2026
… requests (vllm-project#61427)

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
zbrad added a commit to zbrad/vllm that referenced this pull request Nov 2, 2026
Conflicts (17 files). Took upstream's side where the fork only carried
upstream PRs that v0.33.0 contains at the same shas (vllm-project#61718, vllm-project#61858,
vllm-project#61427, vllm-project#61409, vllm-project#58297, vllm-project#61556, vllm-project#61167, vllm-project#59815, vllm-project#59604). Kept the fork's
patches where they are fork-only:
- cmake/external_projects/vllm_flash_attn.cmake: GB10 prebuilt-package
  block kept; upstream's FetchContent GIT_TAG bump (b273a0262) applied.
- vllm/env_override.py: tuned-flags block kept; upstream removed the
  Triton force-first-config block, so it is dropped.
- vllm/model_executor/warmup/kernel_warmup.py: torchvision-missing guard
  kept; upstream's step5_dsa_warmup import added.
- requirements/cuda.txt: upstream's pins (humming 0.1.19).
Upstream's new model-microbenchmark skill moved under rules_advisory/.

Assisted-by: Claude
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation frontend ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants