[Parser] Migrate response api streaming to unified parser#38755
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the streaming event processing logic by introducing a parse_delta method in the Parser class to orchestrate reasoning and tool extraction using a new StreamState dataclass. Feedback points out that the parser initialization in serving.py lacks the required tools argument, which is necessary for tool call extraction. Additionally, the parse_delta implementation contains a bug where reasoning deltas are overwritten by tool deltas when both are present in a single chunk, leading to potential data loss.
aarnphm
left a comment
There was a problem hiding this comment.
LGTM. will run ready tag for this.
|
Thanks for the review! |
Signed-off-by: sfeng33 <4florafeng@gmail.com> Signed-off-by: Andrew Xia <axia@meta.com>
Signed-off-by: sfeng33 <4florafeng@gmail.com>
|
Hi @sfeng33 and @chaunceyjiang did you see/consider my bug fixing effort here: #38227 ? (I was hoping that vllm moves forward with these fixes...) |
…ct#38755) Signed-off-by: sfeng33 <4florafeng@gmail.com> Signed-off-by: Andrew Xia <axia@meta.com>
…ct#38755) Signed-off-by: sfeng33 <4florafeng@gmail.com> Signed-off-by: Andrew Xia <axia@meta.com>
…ct#38755) Signed-off-by: sfeng33 <4florafeng@gmail.com> Signed-off-by: Andrew Xia <axia@meta.com>
…ct#38755) Signed-off-by: sfeng33 <4florafeng@gmail.com> Signed-off-by: Andrew Xia <axia@meta.com>
…ct#38755) Signed-off-by: sfeng33 <4florafeng@gmail.com> Signed-off-by: Andrew Xia <axia@meta.com>
…ct#38755) Signed-off-by: sfeng33 <4florafeng@gmail.com> Signed-off-by: Andrew Xia <axia@meta.com> Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored with @qandrew
Purpose
Move the reasoning/tool-call streaming orchestration logic out of OpenAIServingResponses and into a new parse_delta() method in the unified parser. No behaviour change.
Test Plan