[responsesAPI][bugfix] serialize harmony messages#26185
Merged
yeqcharlotte merged 7 commits intovllm-project:mainfrom Oct 7, 2025
Merged
[responsesAPI][bugfix] serialize harmony messages#26185yeqcharlotte merged 7 commits intovllm-project:mainfrom
yeqcharlotte merged 7 commits intovllm-project:mainfrom
Conversation
Signed-off-by: Andrew Xia <axia@meta.com>
Signed-off-by: Andrew Xia <axia@meta.com>
Signed-off-by: Andrew Xia <axia@meta.com>
Contributor
Author
|
cc @lacora , @houseroad , @yeqcharlotte , @alecsolder this is ready for review |
alecsolder
reviewed
Oct 3, 2025
Signed-off-by: Andrew Xia <axia@meta.com>
Signed-off-by: Andrew Xia <axia@meta.com>
Signed-off-by: Andrew Xia <axia@meta.com>
yeqcharlotte
approved these changes
Oct 7, 2025
Collaborator
yeqcharlotte
left a comment
There was a problem hiding this comment.
thanks for adding the tests
6 tasks
Jialin
reviewed
Oct 10, 2025
Comment on lines
+2132
to
+2141
| serialized = [] | ||
| for m in msgs: | ||
| if isinstance(m, dict): | ||
| serialized.append(m) | ||
| elif hasattr(m, "__dict__"): | ||
| serialized.append(m.to_dict()) | ||
| else: | ||
| # fallback to pyandic dump | ||
| serialized.append(m.model_dump_json()) | ||
| return serialized |
Collaborator
There was a problem hiding this comment.
Seems we could consolidate majority of the code (e.g. message to serialized_message mapping) to a separate function? It could allow us to
- replace list.append with a simple list comprehensive (with better readability and better performance)
- better individual unit tests.
5 tasks
Dhruvilbhatt
pushed a commit
to Dhruvilbhatt/vllm
that referenced
this pull request
Oct 14, 2025
Signed-off-by: Andrew Xia <axia@meta.com> Co-authored-by: Ye (Charlotte) Qi <yeq@meta.com> Signed-off-by: Dhruvil Bhatt <bhattdbh@amazon.com>
lywa1998
pushed a commit
to lywa1998/vllm
that referenced
this pull request
Oct 20, 2025
Signed-off-by: Andrew Xia <axia@meta.com> Co-authored-by: Ye (Charlotte) Qi <yeq@meta.com>
5 tasks
alhridoy
pushed a commit
to alhridoy/vllm
that referenced
this pull request
Oct 24, 2025
Signed-off-by: Andrew Xia <axia@meta.com> Co-authored-by: Ye (Charlotte) Qi <yeq@meta.com>
rtourgeman
pushed a commit
to rtourgeman/vllm
that referenced
this pull request
Nov 10, 2025
Signed-off-by: Andrew Xia <axia@meta.com> Co-authored-by: Ye (Charlotte) Qi <yeq@meta.com>
devpatelio
pushed a commit
to SumanthRH/vllm
that referenced
this pull request
Nov 29, 2025
Signed-off-by: Andrew Xia <axia@meta.com> Co-authored-by: Ye (Charlotte) Qi <yeq@meta.com>
This was referenced Dec 2, 2025
This was referenced Mar 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
harmony messages are not being serialized properly, this was the state prior to this PR.
We fix it by adding a custom serialization method in protocol.py. I filed a issue: openai/harmony#78
Test Plan
added unit tests, and ran locally successfully
server
client
^ note output_messages has content as text and not null (that was the previous bug).
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.