vllm - ✅(Solved) Fix [Bug]: LLM offline infer miss mm_processor_kwargs [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#40134Fetched 2026-04-18 05:52:24
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
labeled ×1

PR fix notes

PR #40251: [Bugfix] Forward mm_processor_kwargs in offline generate APIs

Description (problem / solution / changelog)

Summary

Fixes #40134.

Propagate mm_processor_kwargs through the offline completion path so multimodal overrides work consistently across the public offline APIs:

  • add mm_processor_kwargs to LLM.generate()
  • add mm_processor_kwargs to LLM.enqueue()
  • thread the override through _run_completion(), _add_completion_requests(), _preprocess_cmpl(), and _preprocess_cmpl_one()
  • pass the override into renderer.render_cmpl(..., prompt_extras=...)
  • only pass prompt_extras when mm_processor_kwargs is explicitly provided, so prompt-local mm_processor_kwargs are not overwritten by None
  • add focused regression tests for the public API forwarding and renderer handoff

This matches the existing LLM.chat() behavior and fixes the current mismatch between the offline API surface and multimodal processing expectations.

Why this is not duplicating an existing PR

Duplicate checks run against vllm-project/vllm on 2026-04-18:

  • gh issue view 40134 --repo vllm-project/vllm --comments
  • gh pr list --repo vllm-project/vllm --state open --search '40134 in:body' --limit 20
  • gh pr list --repo vllm-project/vllm --state open --search 'mm_processor_kwargs offline generate enqueue' --limit 20

The issue exists and has no comments claiming ownership, and the two PR searches returned no open PRs for this fix. I also checked adjacent multimodal PRs during local triage; the open ones I found were addressing different problems.

Test Plan

/home/wuyingjun/llm/vllm/.venv/bin/python -m pytest tests/entrypoints/llm/test_mm_processor_kwargs.py -v
/home/wuyingjun/llm/vllm/.venv/bin/python -m py_compile vllm/entrypoints/llm.py tests/entrypoints/llm/test_mm_processor_kwargs.py
/home/wuyingjun/llm/vllm/.venv/bin/pre-commit run --files vllm/entrypoints/llm.py tests/entrypoints/llm/test_mm_processor_kwargs.py

Test Result

  • pytest: 6 passed in the targeted regression file
  • py_compile: passed
  • pre-commit: passed for all hooks on the changed files, including ruff, mypy, SPDX, and repository-specific validation hooks

AI assistance disclosure

AI assistance was used to draft and implement this change, then the changes and targeted validation were reviewed locally before submission.

Changed files

  • tests/entrypoints/llm/test_mm_processor_kwargs.py (added, +173/-0)
  • vllm/entrypoints/llm.py (modified, +31/-3)

Code Example

Your output of `python collect_env.py` here
RAW_BUFFERClick to expand / collapse

Your current environment

<details> <summary>The output of <code>python collect_env.py</code></summary>
Your output of `python collect_env.py` here
</details>

🐛 Describe the bug

<img width="2560" height="1319" alt="Image" src="https://github.com/user-attachments/assets/a2b99070-cf11-4e17-9507-813d76cfc57a" /> <img width="2560" height="1319" alt="Image" src="https://github.com/user-attachments/assets/bce1100e-e012-4d7a-b86e-7864b3523129" /> show as image mm_processor_kwargs not passed in chat_params

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

extent analysis

TL;DR

The issue can be resolved by passing the required mm_processor_kwargs in the chat_params.

Guidance

  • Verify that mm_processor_kwargs is correctly defined and passed to the function or method that requires it.
  • Check the documentation or code comments to ensure that mm_processor_kwargs is a required parameter for the specific function or method being used.
  • Review the code to identify where chat_params is being constructed and modify it to include the necessary mm_processor_kwargs.
  • If using a library or framework, ensure that the version being used is up-to-date and supports the required parameters.

Example

No code snippet can be provided without more context, but the fix likely involves adding mm_processor_kwargs to the chat_params dictionary, e.g., chat_params = {'mm_processor_kwargs': {...}}.

Notes

The exact solution depends on the specific code and library being used, which is not provided in the issue.

Recommendation

Apply workaround by passing the required mm_processor_kwargs in the chat_params, as this is the most direct way to resolve the issue based on the information provided.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

vllm - ✅(Solved) Fix [Bug]: LLM offline infer miss mm_processor_kwargs [1 pull requests, 1 participants]