server, webui: accept continue_final_message flag for vLLM API compat#23012
Open
ServeurpersoCom wants to merge 3 commits into
Open
server, webui: accept continue_final_message flag for vLLM API compat#23012ServeurpersoCom wants to merge 3 commits into
ServeurpersoCom wants to merge 3 commits into
Conversation
Contributor
Author
|
cc @aldehir |
allozaur
approved these changes
May 13, 2026
Add the continue_final_message body flag from the vLLM and transformers API. When set together with add_generation_prompt false, it triggers the existing prefill_assistant code path, regardless of the server side opt.prefill_assistant option. Mutual exclusion with add_generation_prompt true is enforced, matching vLLM behavior. WebUI sends continue_final_message and add_generation_prompt false on the Continue button, with the matching opt in option on the chat service. Pure API alignment, no change to the prefill logic itself. Paves the way for the upcoming per-template prefill plumbing in common/chat.
918af57 to
972f4a7
Compare
ngxson
approved these changes
May 13, 2026
Contributor
Author
|
I've tested my production endpoint, I'm testing the test Python script, a quick check and that'll done. |
Two cases on top of the existing assistant prefill coverage. First, continue_final_message true with add_generation_prompt false produces the same rendered prompt as the prefill_assistant heuristic, proving the new flag is a correct alias of the existing path. Second, both flags set to true is rejected with HTTP 400, matching the vLLM/transformers mutual exclusion contract.
ngxson
approved these changes
May 13, 2026
aldehir
approved these changes
May 13, 2026
Contributor
aldehir
left a comment
There was a problem hiding this comment.
Thank you @ServeurpersoCom! Will follow up.
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.
Overview
Add the continue_final_message body flag from the vLLM and transformers API. When set together with add_generation_prompt false, it triggers the existing prefill_assistant code path, regardless of the server side opt.prefill_assistant option. Mutual exclusion with add_generation_prompt true is enforced, matching vLLM behavior.
WebUI sends continue_final_message and add_generation_prompt false on the Continue button, with the matching opt in option on the chat service.
Pure API alignment, no change to the prefill logic itself. Paves the way for the upcoming per-template prefill plumbing in common/chat.
Additional information
Follow-up PR #22727 for vLLM compat
Requirements