Skip to content

[Plugin] Simplify IO Processor Plugin interface#34236

Merged
vllm-bot merged 12 commits intovllm-project:mainfrom
DarkLight1337:simplify-io-processor
Feb 11, 2026
Merged

[Plugin] Simplify IO Processor Plugin interface#34236
vllm-bot merged 12 commits intovllm-project:mainfrom
DarkLight1337:simplify-io-processor

Conversation

@DarkLight1337
Copy link
Member

@DarkLight1337 DarkLight1337 commented Feb 10, 2026

Purpose

  • Rename parse_request -> parse_data and pass request.data to it so there is no need to distinguish between offline and online APIs.
  • For the same reason, deprecate output_to_response, since we can construct the response automatically from the output data and provided request ID.
  • Split up validate_or_generate_params into merge_sampling_params and merge_pooling_params to make type annotation easier.

All changes are back-compatible until v0.19.

cc @maxdebayser @christian-pinto

Test Plan

Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
@DarkLight1337 DarkLight1337 added the ready ONLY add when PR is ready to merge/full CI is needed label Feb 10, 2026
@mergify
Copy link

mergify bot commented Feb 10, 2026

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

@mergify mergify bot added documentation Improvements or additions to documentation frontend labels Feb 10, 2026
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request simplifies the IOProcessor plugin interface by renaming parse_request to parse_data, deprecating output_to_response, and splitting validate_or_generate_params. The changes are aimed at unifying the online and offline APIs and improving type annotations, with backward compatibility in mind. However, I've identified a critical issue where removing request_id from the post_process method signature breaks the ability for plugins to maintain context between pre-processing and post-processing steps for a given request.

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
@DarkLight1337
Copy link
Member Author

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request simplifies the IOProcessor plugin interface by renaming, deprecating, and splitting methods for better clarity and type safety. The changes are well-documented and applied to the test plugin. However, I've identified a critical issue with the backward compatibility shims for merge_sampling_params and merge_pooling_params. These shims are not type-safe and could lead to runtime errors by returning objects of an incorrect type. I've included suggestions to make these shims robust and ensure true backward compatibility.

@mergify
Copy link

mergify bot commented Feb 10, 2026

Hi @DarkLight1337, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
@christian-pinto
Copy link
Contributor

Thanks @DarkLight1337, let me run a few tests.

assert self.io_processor is not None

pooling_params = self.io_processor.merge_pooling_params()
if pooling_params.task is None:
Copy link
Contributor

@maxdebayser maxdebayser Feb 10, 2026

Choose a reason for hiding this comment

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

This is nice, letting the plugin decide which task it will be instead of just setting "plugin". This is useful for plugins that just want to post process the output for existing tasks, for example.

@noooop
Copy link
Collaborator

noooop commented Feb 10, 2026

PTAL #34214

We need to make the renderer easily accessible to the IO Processor.

@maxdebayser
Copy link
Contributor

We need to make the renderer easily accessible to the IO Processor.

I was about to make the same comment :)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
@DarkLight1337
Copy link
Member Author

DarkLight1337 commented Feb 10, 2026

Yeah, this is the first step towards making that happen. I am planning to initialize IOProcessor and use it to process the input prompt regardless of plugin, with the default one being a no-op. Then plugins can have their custom IOProcessor subclass.

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
@mergify
Copy link

mergify bot commented Feb 10, 2026

Hi @DarkLight1337, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
@vllm-bot vllm-bot merged commit c9a1923 into vllm-project:main Feb 11, 2026
43 of 45 checks passed
@DarkLight1337 DarkLight1337 deleted the simplify-io-processor branch February 11, 2026 03:48
samutamm pushed a commit to samutamm/vllm that referenced this pull request Feb 11, 2026
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
eldarkurtic pushed a commit to eldarkurtic/vllm that referenced this pull request Feb 19, 2026
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: Eldar Kurtic <research@neuralmagic.com>
llsj14 pushed a commit to llsj14/vllm that referenced this pull request Mar 1, 2026
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
tunglinwood pushed a commit to tunglinwood/vllm that referenced this pull request Mar 4, 2026
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
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.

5 participants