Skip to content

[Rust Frontend][1/3] Preserve developer instructions and media order - #1

Open
franciscojavierarceo wants to merge 315 commits into
codex/responses-stack-basefrom
codex/responses-renderer
Open

franciscojavierarceo wants to merge 315 commits into
codex/responses-stack-basefrom
codex/responses-renderer

Conversation

@franciscojavierarceo

@franciscojavierarceo franciscojavierarceo commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Overview

active upstream review: vllm-project/vllm#63901. this fork PR keeps the isolated native-stack diff and previous comments. all layers were rebased onto 3d81a510f9; the fork's pinned base was advanced to that commit.

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

  • preserve string and OpenAI-array content shapes, including multimodal parts, when consolidating system messages.
  • carry media source order through rendering so placeholders stay aligned with extracted media.
  • keep the change in the shared Chat Completions/Responses renderer; this layer adds no endpoint.

Validation

Latest upstream synchronization — October 28

current head: 90cc52cdd0; rebased onto upstream f4fd1ab68e. the fork keeps its native stacked bases; upstream PRs still target main.

  • resolved the shared error-handler overlap with upstream's missing-LoRA 404 change. both NotFound and ResponseNotFound retain 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.
  • strict Clippy for server/chat/text/CLI, applicable pre-commit hooks, and git diff --check: passed. cargo nextest remains unavailable.
  • range-diff shows only the error-handler conflict adaptation; all other feature/fix patches are unchanged. all branch tips passed merge-tree checks against f4fd1ab68e.
  • the old umbrella [Rust Frontend] Add OpenAI Responses API endpoint vllm-project/vllm#58783 was synchronized without rewriting its original history. its source tree equals the tested complete stack and it stays draft.

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.
  • the final stack's full server/chat/text suite passed 1,107 tests (one existing text test ignored).
  • strict Clippy, applicable pre-commit hooks, formatting, and git diff --check: passed.
  • all three tips merge cleanly with upstream f8f7634cb4 using git merge-tree --write-tree origin/main <layer>. the fork's isolated stack bases are preserved.

commands ran from rust/ with OPENSSL_DIR pointing to the local OpenSSL build. cargo nextest was 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-checklist skill. (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)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

SherifWaly and others added 18 commits October 29, 2026 12:06
…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: namgyu-youn <namgyu.dev@gmail.com>
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>
njhill and others added 30 commits November 2, 2026 01:47
…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>
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.