Repository navigation
[Rust Frontend][1/3] Preserve developer instructions and media order - #1
Open
franciscojavierarceo wants to merge 315 commits into
Open
franciscojavierarceo wants to merge 315 commits into
franciscojavierarceo wants to merge 315 commits into
Conversation
This was referenced Oct 7, 2026
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
It changes shared multimodal rendering behavior without model-backed multimodal validation.
Review effort: Balanced
Findings: None
What changed in this PR
Preserves developer instructions and multimodal ordering when HF templates fall back to system messages.
Changes:
- Detects developer-role support and consolidates unsupported developer messages.
- Preserves content shape and media ordering.
- Adds string and OpenAI-array regression coverage.
| File | Description |
|---|---|
rust/src/chat/src/renderer/hf/template.rs |
Caches developer-role support detection. |
rust/src/chat/src/renderer/hf/mod.rs |
Implements fallback consolidation. |
rust/src/chat/src/renderer/hf/media.rs |
Reorders media sources with placeholders. |
rust/src/chat/src/multimodal.rs |
Tests multimodal alignment. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
6 tasks done
franciscojavierarceo
force-pushed
the
codex/responses-renderer
branch
from
October 27, 2026 03:41
3e27fcf to
699ef82
Compare
franciscojavierarceo
marked this pull request as ready for review
October 27, 2026 11:39
franciscojavierarceo
force-pushed
the
codex/responses-renderer
branch
2 times, most recently
from
October 28, 2026 10:32
07c86b4 to
90cc52c
Compare
…t KV pool (vllm-project#64345) Signed-off-by: Sherif Waly <sherif.waly@mistral.ai> Co-authored-by: Mistral Vibe <vibe@mistral.ai>
Signed-off-by: freyfwt <freytian1996@gmail.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Codex <noreply@openai.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: vllm-agent <claw@inferact.ai>
Signed-off-by: mingjiang.li <mingjiang.li@iluvatar.com>
…roject#59934) Signed-off-by: aoshen02 <aoshen@inferact.ai> Signed-off-by: Dakai An <dakaian108@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Dakai An <dakaian108@gmail.com> Co-authored-by: Dakai An <77474977+andakai@users.noreply.github.com>
…vllm-project#64367) Signed-off-by: Andrew Sansom <andrew@protopia.ai> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Felix Li <felix.li@amd.com> Co-authored-by: OpenAI Codex <noreply@openai.com> Co-authored-by: Fangzhou Ai <31551580+Fangzhou-Ai@users.noreply.github.com>
…nd hangs forever (Python rejects it since vllm-project#54887) (vllm-project#64390) Signed-off-by: SIDDARTHA REDDY <75976672+SIDDARTHAREDDY8@users.noreply.github.com> Co-authored-by: vllm-agent <claw@inferact.ai>
…roject#63896) Signed-off-by: Vegetog <110553275+Vegetog@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Chauncey <chaunceyjiang@gmail.com>
…ject#61777) Signed-off-by: qianlihuang <yiliu.dong@qq.com> Co-authored-by: Codex <noreply@openai.com> Co-authored-by: vllm-agent <claw@inferact.ai>
… version (vllm-project#58468) Signed-off-by: Shengliang Xu <shengliangx@nvidia.com> Co-authored-by: vllm-agent <claw@inferact.ai>
…nel FP8 weights (vllm-project#60163) Signed-off-by: wenfei qi <ms1419344875@outlook.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…-project#63218) Signed-off-by: Jeremy Bottleson <jbottleson@nvidia.com> Signed-off-by: jbottleson-nvidia <jbottleson@nvidia.com> Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk> Co-authored-by: vllm-agent <claw@inferact.ai>
…ct#63585) Signed-off-by: Yuanheng <jonathan.zhaoyh@gmail.com> Co-authored-by: codex <codex@openai.com> Co-authored-by: vllm-agent <claw@inferact.ai> Co-authored-by: Isotr0py <Isotr0py@outlook.com>
…re mistral-common 1.13.0 (vllm-project#64169) Signed-off-by: Julien Denize <40604584+juliendenize@users.noreply.github.com> Co-authored-by: vllm-agent <claw@inferact.ai> Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
…ct#64481) Signed-off-by: namgyu-youn <namgyu.dev@gmail.com> Co-authored-by: vllm-agent <claw@inferact.ai>
…fore graph capture (vllm-project#64423) Signed-off-by: Andreas Karatzas <akaratza@amd.com>
…-project#57662) Signed-off-by: 葛昊宇 <haoyu_ge@intsig.net>
…4914) Signed-off-by: Nick Hill <nickhill123@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…for MMEncoderAttention (vllm-project#64944) Signed-off-by: Dongji Gao <dongjig@nvidia.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: vllm-agent <claw@inferact.ai>
… scale (vllm-project#63232) Signed-off-by: Yongye Zhu <zyy1102000@gmail.com> Co-authored-by: qizixi <22851944+zixi-qi@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…n SDK requirements (vllm-project#35508) Signed-off-by: Jaeyeon Kim <anencore94@gmail.com> Co-authored-by: vllm-agent <claw@inferact.ai>
…ts (vllm-project#63971) Signed-off-by: whx-sjtu <xiaowang990929@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Fangzhou Ai <31551580+Fangzhou-Ai@users.noreply.github.com>
vllm-project#61950) Signed-off-by: whx-sjtu <xiaowang990929@gmail.com> Co-authored-by: Codex <noreply@openai.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…scores (vllm-project#61219) Signed-off-by: SCcagg5 <sccagg5@gmail.com> Signed-off-by: Nick Hill <nickhill123@gmail.com> Co-authored-by: Robert Shaw <114415538+robertgshaw2-redhat@users.noreply.github.com> Co-authored-by: Nick Hill <nickhill123@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…1/messages (vllm-project#64971) Signed-off-by: Maroon Ayoub <mayoub@redhat.com> Co-authored-by: Flora Feng <4florafeng@gmail.com>
…project#61267) Signed-off-by: cjackal <44624812+cjackal@users.noreply.github.com>
…equests in flight (vllm-project#64616) Signed-off-by: heyemlee <heyemlee@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: linitra24 <renshuang.zhou@daocloud.io>
…llm-project#65044) Signed-off-by: esmeetu <jasonailu87@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: vllm-agent <claw@inferact.ai>
…peer bases late (vllm-project#63892) Signed-off-by: Oxana Korzh <okorzh@amd.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Shanshan Shen <467638484@qq.com>
Signed-off-by: Nick Hill <nickhill123@gmail.com> Co-authored-by: Zhuohan Li <zhuohan123@gmail.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…hem as valid JSON (vllm-project#63992) Signed-off-by: saifltr <bagmarusaif@gmail.com> Co-authored-by: Si Chen <62344747+cs-fisha@users.noreply.github.com> Co-authored-by: Chauncey <chaunceyjiang@gmail.com>
…lm-project#61764) Signed-off-by: Tianyu Guo <guoty@inferact.ai> Co-authored-by: vllm-agent <claw@inferact.ai>
…llm-project#64614) Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com>
…ject#65045) Signed-off-by: Jee Jee Li <jeejeelee@inferact.ai>
…teps on MI355X (--monokernel) (vllm-project#63440) Signed-off-by: Aliasger Zaidy <aliasger.zaidy@amd.com> Signed-off-by: Fangzhou Ai <31551580+Fangzhou-Ai@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Fangzhou Ai <31551580+Fangzhou-Ai@users.noreply.github.com>
…#64852) Signed-off-by: Thien Tran <gau.nernst@yahoo.com.sg> Co-authored-by: Kimi Code <noreply@moonshot.cn> Co-authored-by: vllm-agent <claw@inferact.ai>
…oject#64181) Signed-off-by: Thang Nguyen <thangnguyenvn647@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…lm-project#64355) Signed-off-by: Thang Nguyen <thangnguyenvn647@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…n automatic sharding (22 jobs) (vllm-project#64594) Signed-off-by: Thang Nguyen <thangnguyenvn647@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…tic sharding (17 jobs) (vllm-project#64597) Signed-off-by: Thang Nguyen <thangnguyenvn647@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ic sharding (4 jobs) (vllm-project#64598) Signed-off-by: Thang Nguyen <thangnguyenvn647@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…bs in automatic sharding (6 jobs) (vllm-project#64599) Signed-off-by: Thang Nguyen <thangnguyenvn647@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…64179) Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com>
…e-AR loads, tagged x rows (vllm-project#64029) Signed-off-by: seungrokj <seungrok.jung@amd.com> Signed-off-by: hyukjlee <hyukjlee@amd.com> Co-authored-by: seungrokj <seungrok.jung@amd.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: vllm-agent <claw@inferact.ai>
…g hooks (vllm-project#65080) Signed-off-by: Alex-Wengg <hanweng9@gmail.com>
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
preserve developer instructions and media order when an HF template falls back from developer to system messages.
upstream review order: 1/3: renderer vllm-project/vllm#63901 → 2/3: non-streaming vllm-project/vllm#63902 → 3/3: streaming vllm-project/vllm#63903. all three upstream review PRs target
main; later diffs include earlier layers.Claims
Validation
Latest upstream synchronization — October 28
current head:
90cc52cdd0; rebased onto upstreamf4fd1ab68e. the fork keeps its native stacked bases; upstream PRs still targetmain.NotFoundandResponseNotFoundretain their existing wire envelopes; the LoRA/gRPC and Responses HTTP regressions pass.cargo test --locked -p vllm-chat --lib -- --test-threads=1: 438 passed as part of the full-stack run.git diff --check: passed.cargo nextestremains unavailable.f4fd1ab68e.the model-backed HTTP/Codex evidence below predates this synchronization (complete-stack head
3db4c9abf0); it was not repeated after this rebase. today's evidence covers compilation and deterministic wire/route/renderer regressions, not new model qualification. CI reruns on these new heads are separate from the earlier successful workflows. agentic-api was not changed or pushed.Earlier review and runtime evidence
reviewed again on October 27; renderer head:
699ef82150. no new renderer change was needed.cargo test --locked -p vllm-chat --lib -- --test-threads=1: 430 passed.git diff --check: passed.f8f7634cb4usinggit merge-tree --write-tree origin/main <layer>. the fork's isolated stack bases are preserved.commands ran from
rust/withOPENSSL_DIRpointing to the local OpenSSL build.cargo nextestwas unavailable. tests ran serially after the previous parallel chat run exposed a shared audio-metrics collector collision; the isolated test and complete serial suites passed.fresh model-backed HTTP and real Codex checks on the revised complete stack are recorded in vllm-project#63903. these are text/function-tool interoperability checks, not a multimodal evaluation. deterministic renderer/media-extraction regressions cover string and OpenAI-array content formats; fresh model-backed multimodal qualification remains outstanding.
Details
a plain-string merge can lose policies for array-based templates; moving system/developer messages can also reorder placeholders without moving their media. preserve the effective content representation and its source order.
the rebase retains upstream's request-template fuel controls and uses the normal template constructor in the new upstream fuel-test fixture. the renderer changes also affect Chat Completions.
these are the existing vllm-project#58783 layers opened upstream at @BugenZhao's request, rather than competing implementations. the original authored history and discussion remain in vllm-project#58783. @gcanlin's vllm-project#53380 implementation is credited in the endpoint and streaming commits. duplicate checks found vllm-project#63497 affects DeepSeek renderers and vllm-project#56391 affects Python's HF renderer; neither covers this Rust HF path. the fork layer retains the isolated review history.
diff against the new base: 4 files, +274 / -10. Codex assistance was used. human review of every changed line and independent validation remain required before merge.
Pull Request Checklist
I used vLLM's
/pr-checklistskill. (Mandatory for agents, optional for humans).AI assistance was used during the creation of this PR.
Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.
Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.
Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.
Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.
BEFORE SUBMITTING, PLEASE READ https://docs.vllm.ai/en/latest/contributing (anything written below this line will be removed by GitHub Actions)