[sgl-router] Add SGLang-compatible DeepSeek V4.1 Flash rendering (#40532)

This commit is contained in:
Kan Wu
2026-09-21 18:35:09 +08:00
committed by GitHub
parent 0abb251a20
commit 0f6761b54f
9 changed files with 247 additions and 44 deletions
@@ -77,3 +77,22 @@ fn v4_matches_sglang_serving() {
"deepseek_v4",
);
}
#[test]
fn v41_matches_sglang_serving() {
check_fixture(
include_str!("../../fixtures/deepseek/v41.json"),
"deepseek_v41",
);
}
#[test]
fn v41_leaves_unsupported_shapes_to_the_worker() {
let formatter = ChatFormatter::deepseek_native(Some("deepseek_v41"), "alias").unwrap();
for request in [
json!({"messages":[{"role":"developer","content":"rule"}]}),
json!({"messages":[{"role":"user","content":[{"type":"image_url","image_url":{"url":"https://example.com/a.png"}}]}]}),
] {
assert!(formatter.render(&request).is_err(), "{request}");
}
}