Skip to content

[Frontend] Complete OpenAI render delegation#37287

Merged
DarkLight1337 merged 8 commits intovllm-project:mainfrom
sagearc:complete-openai-render-delegation
Mar 17, 2026
Merged

[Frontend] Complete OpenAI render delegation#37287
DarkLight1337 merged 8 commits intovllm-project:mainfrom
sagearc:complete-openai-render-delegation

Conversation

@sagearc
Copy link
Copy Markdown
Contributor

@sagearc sagearc commented Mar 17, 2026

Completes the disaggregated frontend work from #36166 by delegating all remaining OpenAIServing preprocessing methods to OpenAIServingRender — the canonical GPU-less render layer — and removing the now-duplicate copies from the base class.

Changes

  • ServingTokens — routes preprocess_completion through openai_serving_render
  • OpenAIServingPooling — routes preprocess_completion, preprocess_cmpl, preprocess_chat, and validate_chat_template through openai_serving_render
  • OpenAIServingResponses — pulls down _render_next_turn and _generate_with_builtin_tools from the base class (exclusively used here)
  • OpenAIServing — 5 methods and their associated imports removed

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.

sagearc added 8 commits March 17, 2026 09:46
…ngRender

Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
…ingResponses

Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
@DarkLight1337 DarkLight1337 enabled auto-merge (squash) March 17, 2026 10:31
Copy link
Copy Markdown
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 completes the delegation of rendering logic to OpenAIServingRender by moving several preprocessing methods out of the base OpenAIServing class. The changes are well-structured and consistently applied across multiple components, including ServingTokens, OpenAIServingPooling, and OpenAIServingResponses. The refactoring centralizes the rendering logic, improving code organization and separation of concerns. The moved methods and their call sites have been updated correctly. Overall, this is a solid refactoring effort with no apparent issues.

@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Mar 17, 2026
Comment on lines 34 to 49
@@ -47,6 +48,7 @@ def __init__(
self,
engine_client: EngineClient,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can the "OpenAI" and "openai_" prefixes of OpenAIServingRender be removed? I think this has nothing to do with OpenAI.

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.

Yeah let's do that in the next PR

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We can discuss scope, but it does have something to do with OpenAI — the main entrypoints accept CompletionRequest and ChatCompletionRequest, which are OpenAI API types.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In my understanding, the renderer is the preprocessing layer of vLLM and is vendor-independent, as it will be used by the entrypoints of all vendors.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

From my understanding that might make more sense for the renderer itself? class LLM seems to use it directly via its own API, without going through much of the logic in OpenAIServingRender.

@DarkLight1337 DarkLight1337 merged commit 59192df into vllm-project:main Mar 17, 2026
50 checks passed
@sagearc sagearc deleted the complete-openai-render-delegation branch March 17, 2026 14:25
Lucaskabela pushed a commit to Lucaskabela/vllm that referenced this pull request Mar 17, 2026
Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
andylolu2 pushed a commit to andylolu2/vllm that referenced this pull request Mar 18, 2026
Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
wendyliu235 pushed a commit to wendyliu235/vllm-public that referenced this pull request Mar 18, 2026
Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
fxdawnn pushed a commit to fxdawnn/vllm that referenced this pull request Mar 19, 2026
Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
QiuMike pushed a commit to QiuMike/vllm-omni that referenced this pull request Mar 25, 2026
with vllm top commit 1b6cb920e6ebcac57154e6154578c39d4892a16c
has some diffs with vllm-omni,

vllm-project/vllm#32104
vllm-project/vllm#32951
vllm-project/vllm#37287
vllm-project/vllm#36483

just modify vllm-omni to work

Signed-off-by: Michael Qiu <qiudayu.qdy@antgroup.com>
khairulkabir1661 pushed a commit to khairulkabir1661/vllm that referenced this pull request Mar 27, 2026
Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
Monishver11 pushed a commit to Monishver11/vllm that referenced this pull request Mar 27, 2026
Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
Signed-off-by: Monishver Chandrasekaran <monishverchandrasekaran@gmail.com>
JiantaoXu pushed a commit to JiantaoXu/vllm that referenced this pull request Mar 28, 2026
Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
vrdn-23 pushed a commit to vrdn-23/vllm that referenced this pull request Mar 30, 2026
Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
Signed-off-by: Vinay Damodaran <vrdn@hey.com>
EricccYang pushed a commit to EricccYang/vllm that referenced this pull request Apr 1, 2026
Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
Signed-off-by: EricccYang <yangyang4991@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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