Skip to content

docs,tests: cover Qwen3.8 preserve_thinking support - #4869

Open
lvhan028 wants to merge 1 commit into
InternLM:mainfrom
lvhan028:feat/preserving-think
Open

docs,tests: cover Qwen3.8 preserve_thinking support#4869
lvhan028 wants to merge 1 commit into
InternLM:mainfrom
lvhan028:feat/preserving-think

Conversation

@lvhan028

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI lite review requested due to automatic review settings August 16, 2026 05:34
@lvhan028 lvhan028 changed the title cover Qwen3.8 preserve_thinking support docs,tests: cover Qwen3.8 preserve_thinking support Aug 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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_thinking behavior (including tool-call turns) by matching HF apply_chat_template output.
  • Update reasoning API server docs (EN/ZH) to use --reasoning-parser default, document preserve_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 数量。
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.

2 participants