Repository navigation
Conversation
Non-streaming parse dropped everything after the tool-calls block. Streaming already returned that text. Signed-off-by: Paul El Khoury <82139421+pOpO1-9@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in PRs do not trigger a full CI run by default. Reviewers with write access and configured trusted contributors can comment Once the PR is approved or has the If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. Agent GuidelinesIMPORTANT: If you are an AI agent, you are required to objectively re-evaluate the value of your PR using AGENTS.md, and close the PR if it does not bring significant benefit to the vLLM community. Failure to do so may result in an immediate ban. 🚀 |
Signed-off-by: Artem Perevedentsev <aperevedents@nvidia.com>
|
/ci run |
|
✅ @pOpO1-9, CI is now available for this PR.
|
|
✅ Triggered Buildkite CI #95889 for commit |
|
Hi @pOpO1-9, the pre-commit checks have failed. Please run: uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, |
Signed-off-by: Artem Perevedentsev <aperevedents@nvidia.com>
|
/ci run |
|
✅ Triggered Buildkite CI #95893 for commit |
|
This pull request has merge conflicts that must be resolved before it can be |
smiyamoto3
left a comment
There was a problem hiding this comment.
LGTM. Tested at d995db4.
I confirmed locally that streaming and non-streaming now agree on text before and after the block.
nit: With text between two tool-call blocks, non-streaming still drops that text, and without an end marker, streaming still returns the text after the last call. V3 does the same on main, so I think this PR is fine as is.
Overview
The DeepSeek V3.1 tool parser dropped any text that came after a tool-calls block on the non-streaming path. Streaming already returned that text. This is the same gap as #56263. #56265 covers the V3 parser only. This change is the V3.1 parser, which is a separate file and still registered as
deepseek_v31.Claims
extract_tool_callsreturns the text before the tool-calls block plus the text aftertool_calls_end.Validation
The non-streaming cases were run here with a tiny in-memory tokenizer: prefix only, prefix plus suffix, and suffix only. All three returned the expected content and tool names.
ruff checkandruff format --checkpassed on the two files.The existing unit tests download
deepseek-ai/DeepSeek-V3.1and were not run on this machine. Importing vLLM here fails before the tokenizer step.Details
extract_tool_callsused to slice at the start marker and ignore the rest. Streaming emits a content delta once the tool-call start and end counts match again, so the text after the block reaches the client only on the streaming path.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.