[sgl-router] Match DeepSeek V4 rendering to SGLang (#40530)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Shangming Cai <csmthu@gmail.com>
This commit is contained in:
Kan Wu
2026-09-21 17:56:41 +08:00
committed by GitHub
co-authored by Claude Fable 5.1 Shangming Cai
parent 2016f5e7a1
commit 0abb251a20
8 changed files with 526 additions and 51 deletions
+10
View File
@@ -211,6 +211,16 @@ Detailed content-format parity coverage follows in #39133.
The Dynamo crates are pinned exactly and `Cargo.lock` is committed; CI builds
with `--locked`, so rendered bytes cannot change without a reviewed diff.
## DeepSeek V4
Native V4 rendering follows SGLang's serving path (`serving_chat.py`), not
Dynamo's OpenAI defaults: all declared tools are rendered with SGLang's schema
defaults, reasoning effort comes from `reasoning` / `reasoning_effort`, and the
official/preview effort profile is detected from the checkpoint's
`encoding/encoding_dsv4.py` or overridden by `dsv4_reasoning_effort_profile` in
`config.json`, as in SGLang. Reference prompts live in `tests/fixtures/deepseek/`
and are regenerated by `tests/scripts/generate_deepseek_parity.py`.
## Kimi-K3
Kimi-K3 renders through dynamo-render's native XTML formatter with SGLang's