[Rust Frontend] Extend renderer/parser roundtrip tests to support token ids#47110
Conversation
…en ids Signed-off-by: Bugen Zhao <i@bugenzhao.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c5870043ae
ℹ️ 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".
|
|
||
| gemma4 => [tool_call_mix], // Gemma4 strips reasoning in history if there's no tool call | ||
| kimi_k25 => [tool_call_mix], // Kimi K2.5 strips reasoning in history | ||
| gpt_oss => [tool_call_mix], // Harmony strips reasoning in history if there's no tool call |
There was a problem hiding this comment.
Take the Harmony cache lock for GPT-OSS roundtrip
This new GPT-OSS case loads the Harmony renderer/output path, which calls load_harmony_encoding; the Harmony output tests document that tests loading this encoding need the shared harmony_tiktoken_cache file lock so cargo nextest cannot populate the upstream tiktoken cache concurrently (rust/src/chat/src/output/harmony/tests.rs:1-4). Because this integration test only takes the per-model hf_gpt_oss lock, a full cargo nextest run -p vllm-chat can run it in parallel with the locked Harmony tests and reintroduce that cache race; add the same #[file_serial(harmony_tiktoken_cache)] attribute to this fixture.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Good catch but not correct fix direction. I just realized after #46799 we don't even need existing harmony_tiktoken_cache anymore, since it embeds necessary vocab files directly into the binary and won't download at all.
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
…en ids (vllm-project#47110) Signed-off-by: Bugen Zhao <i@bugenzhao.com>
…en ids (vllm-project#47110) Signed-off-by: Bugen Zhao <i@bugenzhao.com>
…en ids (vllm-project#47110) Signed-off-by: Bugen Zhao <i@bugenzhao.com> Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
Purpose
Some model paths are token-id native: renderers may directly yield token ids, and output processors may directly consume token ids. This PR extends the roundtrip tests to support raw token ids in those cases, demonstrated by the GPT-OSS/Harmony path.
Test Plan
Test Result
All passed locally. I also verified that
roundtrip_gpt_ossfails if generated chunk token ids are cleared, which confirms the test covers the token-id output path.Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.