Skip to content

[ResponseAPI] Simplify input/output message serialization#26620

Merged
yeqcharlotte merged 1 commit intovllm-project:mainfrom
Jialin:response-api
Oct 13, 2025
Merged

[ResponseAPI] Simplify input/output message serialization#26620
yeqcharlotte merged 1 commit intovllm-project:mainfrom
Jialin:response-api

Conversation

@Jialin
Copy link
Copy Markdown
Collaborator

@Jialin Jialin commented Oct 11, 2025

Purpose

Simplify #26185 by moving serialization into utils which could be applied to both input/output messages.

Test Plan & Test Result

HF_HUB_DISABLE_XET=1 pytest tests/entrypoints/openai/test_response_api_with_harmony.py

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: Jialin Ouyang <Jialin.Ouyang@gmail.com>
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 refactors the message serialization logic by extracting it into new utility functions, serialize_message and serialize_messages, which is a good improvement for code clarity and maintainability. However, I've identified a critical issue in the implementation of serialize_message that could lead to runtime errors and malformed JSON output. My review includes a detailed explanation and a suggested fix.

@Jialin
Copy link
Copy Markdown
Collaborator Author

Jialin commented Oct 11, 2025

CC @qandrew @yeqcharlotte

Copy link
Copy Markdown
Collaborator

@yeqcharlotte yeqcharlotte left a comment

Choose a reason for hiding this comment

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

LGTM

@github-project-automation github-project-automation bot moved this from To Triage to Ready in gpt-oss Issues & Enhancements Oct 13, 2025
@yeqcharlotte yeqcharlotte enabled auto-merge (squash) October 13, 2025 08:06
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 13, 2025
@yeqcharlotte yeqcharlotte merged commit 4073c82 into vllm-project:main Oct 13, 2025
52 of 53 checks passed
1994 pushed a commit to 1994/vllm that referenced this pull request Oct 14, 2025
…ct#26620)

Signed-off-by: Jialin Ouyang <Jialin.Ouyang@gmail.com>
Signed-off-by: 1994 <1994@users.noreply.github.com>
Dhruvilbhatt pushed a commit to Dhruvilbhatt/vllm that referenced this pull request Oct 14, 2025
…ct#26620)

Signed-off-by: Jialin Ouyang <Jialin.Ouyang@gmail.com>
Signed-off-by: Dhruvil Bhatt <bhattdbh@amazon.com>
bbartels pushed a commit to bbartels/vllm that referenced this pull request Oct 16, 2025
…ct#26620)

Signed-off-by: Jialin Ouyang <Jialin.Ouyang@gmail.com>
Signed-off-by: bbartels <benjamin@bartels.dev>
lywa1998 pushed a commit to lywa1998/vllm that referenced this pull request Oct 20, 2025
…ct#26620)

Signed-off-by: Jialin Ouyang <Jialin.Ouyang@gmail.com>
alhridoy pushed a commit to alhridoy/vllm that referenced this pull request Oct 24, 2025
…ct#26620)

Signed-off-by: Jialin Ouyang <Jialin.Ouyang@gmail.com>
0xrushi pushed a commit to 0xrushi/vllm that referenced this pull request Oct 26, 2025
…ct#26620)

Signed-off-by: Jialin Ouyang <Jialin.Ouyang@gmail.com>
Signed-off-by: 0xrushi <6279035+0xrushi@users.noreply.github.com>
0xrushi pushed a commit to 0xrushi/vllm that referenced this pull request Oct 26, 2025
…ct#26620)

Signed-off-by: Jialin Ouyang <Jialin.Ouyang@gmail.com>
Signed-off-by: 0xrushi <6279035+0xrushi@users.noreply.github.com>
rtourgeman pushed a commit to rtourgeman/vllm that referenced this pull request Nov 10, 2025
…ct#26620)

Signed-off-by: Jialin Ouyang <Jialin.Ouyang@gmail.com>
devpatelio pushed a commit to SumanthRH/vllm that referenced this pull request Nov 29, 2025
…ct#26620)

Signed-off-by: Jialin Ouyang <Jialin.Ouyang@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend gpt-oss Related to GPT-OSS models ready ONLY add when PR is ready to merge/full CI is needed

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants