docs,tests: cover Qwen3.8 preserve_thinking support - #4869
Open
lvhan028 wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds coverage and documentation updates for reasoning/preserve-thinking behaviors, including Qwen3.8 multi-turn prompt rendering and updated reasoning-parser naming guidance for the API server.
Changes:
- Add pytest coverage for Qwen3.8
preserve_thinkingbehavior (including tool-call turns) by matching HFapply_chat_templateoutput. - Update reasoning API server docs (EN/ZH) to use
--reasoning-parser default, documentpreserve_thinking, and refresh the supported parser-name list and custom-parser guidance.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/test_lmdeploy/test_model.py | Adds Qwen3.8 prompt-compat tests for preserve_thinking and tool-call turn behavior. |
| docs/zh_cn/llm/api_server_reasoning.md | Updates Chinese reasoning-server docs: parser name default, preserve-thinking guidance, and custom parser instructions. |
| docs/en/llm/api_server_reasoning.md | Updates English reasoning-server docs: parser name default, preserve-thinking guidance, and custom parser instructions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+66
to
+70
| LMDeploy also accepts `reasoning` as an input alias for | ||
| `reasoning_content`. Omitting `preserve_thinking` leaves the behavior to the | ||
| model's chat template; Qwen3.8 preserves earlier reasoning by default. Set it | ||
| to `False` to remove reasoning from completed earlier turns. Preserved | ||
| reasoning is part of the input prompt and increases its token count. |
Comment on lines
+66
to
+69
| LMDeploy 也接受 `reasoning` 作为 `reasoning_content` 的输入别名。不传 | ||
| `preserve_thinking` 时,由模型的聊天模板决定默认行为;Qwen3.8 默认保留历史 | ||
| 推理。将其设为 `False` 可移除已经完成的较早轮次中的推理。保留的推理内容会 | ||
| 成为输入提示词的一部分,并增加输入 Token 数量。 |
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.
No description provided.