From c7f674e427b066e54927af8fb95931f3a5f8c176 Mon Sep 17 00:00:00 2001 From: Cheng Wan <54331508+ch-wan@users.noreply.github.com> Date: Sun, 10 May 2026 01:13:46 -0700 Subject: [PATCH] [Bug] Add dsv4 state_type branch to mooncake disaggregation (#24878) Co-authored-by: Cheng Wan Co-authored-by: Claude Opus 4.7 (1M context) --- python/sglang/srt/disaggregation/mooncake/conn.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/python/sglang/srt/disaggregation/mooncake/conn.py b/python/sglang/srt/disaggregation/mooncake/conn.py index 7bdd4a601..5cd9558e2 100644 --- a/python/sglang/srt/disaggregation/mooncake/conn.py +++ b/python/sglang/srt/disaggregation/mooncake/conn.py @@ -995,8 +995,13 @@ class MooncakeKVManager(CommonKVManager): prefill_state_indices, dst_state_data_ptrs, ) - elif state_type in ["swa", "nsa"]: - # SWA and NSA hybrid models do not support different TP sizes yet + elif state_type in ["swa", "nsa", "dsv4"]: + # SWA / NSA / DSv4 hybrid models do not support different TP sizes + # yet. (DSv4 carries a flat heterogeneous state pool of + # SWA + compress + indexer buffers; reusing this branch routes it + # through the same ``_send_kvcache_generic`` path that + # ``get_mla_kv_ptrs_with_pp`` already handles for compressed-MLA + # PP/MTP layouts.) if ( target_rank_registration_info is not None and not self.is_mla_backend