Skip to content

[Bugfix][Rust Frontend][Renderer] Align DeepSeek V4 historical developer message handling - #54854

Merged
BugenZhao merged 1 commit into
vllm-project:mainfrom
reidliu41:fix-deepseek-v4-drop-developer-history
Sep 2, 2026
Merged

[Bugfix][Rust Frontend][Renderer] Align DeepSeek V4 historical developer message handling#54854
BugenZhao merged 1 commit into
vllm-project:mainfrom
reidliu41:fix-deepseek-v4-drop-developer-history

Conversation

@reidliu41

@reidliu41 reidliu41 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Purpose

The Rust DeepSeek V4 renderer kept developer messages that appeared before the
last user-like turn when thinking=true and effective drop_thinking=true.

The Python tokenizer and the official DeepSeek encoding remove those historical
developer messages while preserving assistant answers and dropping historical
reasoning.

Align the Rust DeepSeek V4 renderer with the Python tokenizer and the official
DeepSeek encoding when dropping historical thinking messages.

Test Plan

  cargo test -p vllm-chat developer -- --nocapture

  cargo test -p vllm-chat \
    renderer::deepseek_v4::tests \
    -- --nocapture

Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

Signed-off-by: reidliu41 <reid201711@gmail.com>
@mergify mergify Bot added deepseek Related to DeepSeek models rust DSv4 bug Something isn't working labels Sep 2, 2026
@reidliu41
reidliu41 marked this pull request as ready for review September 2, 2026 01:02

@claude claude Bot 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.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@BugenZhao

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-02T18:46:44.318740Z a77796f Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: a77796f50a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@BugenZhao BugenZhao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@BugenZhao BugenZhao added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 2, 2026
@BugenZhao
BugenZhao enabled auto-merge (squash) September 2, 2026 20:16
@BugenZhao

Copy link
Copy Markdown
Member

/ci run

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

@reidliu41, CI is now available for this PR.

  • /ci run starts upstream CI; /amd-ci run starts AMD CI only.
  • /ci retry retries failed jobs in the CI build for the current PR head. If the current head has no CI build, it starts a new CI build for the current head containing only jobs that failed in the latest earlier CI build for this PR.
  • /amd-ci retry retries failed jobs in AMD CI for the current PR head. Use /amd-ci run when the current head has no AMD CI build.
  • /ci cancel cancels scheduled or running CI builds for this PR branch; /amd-ci cancel does the same for AMD CI only.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite CI #86936 for commit a77796f50a95.

@BugenZhao
BugenZhao merged commit 60857ba into vllm-project:main Sep 2, 2026
47 of 48 checks passed
mylibrar pushed a commit to tanyuqian/vllm that referenced this pull request Sep 3, 2026
…per message handling (vllm-project#54854)

Signed-off-by: reidliu41 <reid201711@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working deepseek Related to DeepSeek models DSv4 ready ONLY add when PR is ready to merge/full CI is needed rust

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants