Skip to content

[Rust Frontend] Add hy_v3 reasoning parser - #48800

Closed
ricky-chaoju wants to merge 5 commits into
vllm-project:mainfrom
ricky-chaoju:feat/rust-hy-v3-reasoning-parser
Closed

ricky-chaoju wants to merge 5 commits into
vllm-project:mainfrom
ricky-chaoju:feat/rust-hy-v3-reasoning-parser

Conversation

@ricky-chaoju

Copy link
Copy Markdown
Contributor

This PR is the reasoning half of Hunyuan V3 support in the Rust frontend. The hy_v3 tool parser landed in #43872, but the reasoning parser was missing, so reasoning output from a Hy3 model isn't split out. Roadmap item is hy_v3 under #44280.

Hy3 uses standard <think> / </think> tags, so this registers hy_v3 as the eighth Qwen3ReasoningParser alias, next to DeepSeek V3/V4, GLM45, Kimi K2, MiniMax M2, Nemotron V3, and Step3, plus hy3 / hy_v3 model patterns mirroring the tool side. No new parser code. The Python parser's two hy_v3-specific behaviors are covered by the prompt-first design: the Hy3 template always leaves a reasoning boundary at the end of the generation prompt (<think></think> for no_think, <think> for low/high), so prompt-boundary initialization already lands in the right state, and token_suffix is only non-empty on the opensource checkpoint, not the preview one vLLM tests against; a suffixed checkpoint fails parser creation loudly rather than misparsing.

I also added a roundtrip fixture over the real tencent/Hy3-preview template (public, ungated), covering the no_think default path end to end. The thinking path can't roundtrip on this template at all since history rendering strips reasoning, same reason gemma4/kimi_k25 are restricted, and the extraction state machine is already covered by the qwen3/glm45/deepseek_v4 roundtrips sharing the same parser. tool_call_mix needs harness work due to per-turn eos differences, so I left it out on purpose. Hy3 shares the Qwen3 delimited parser; only the registered name differs.

Signed-off-by: RickyChen / 陳昭儒 <ricky.chen@infinirc.com>

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

@mergify mergify Bot added the rust label Jul 16, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

…soning-parser

Signed-off-by: RickyChen / 陳昭儒 <ricky.chen@infinirc.com>

# Conflicts:
#	rust/src/chat/src/lib.rs
#	rust/src/chat/tests/roundtrip.rs
…soning-parser

Signed-off-by: RickyChen / 陳昭儒 <ricky.chen@infinirc.com>

# Conflicts:
#	rust/src/chat/src/lib.rs
@ricky-chaoju

Copy link
Copy Markdown
Contributor Author

@BugenZhao PTAL. Thanks!

@mergify

mergify Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @ricky-chaoju.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Aug 21, 2026
@ricky-chaoju

Copy link
Copy Markdown
Contributor Author

Superseded by #53054

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant