test: enforce early CP HiCache storage rejection

This commit is contained in:
2026-05-08 00:50:52 +08:00
parent ffcbf904e4
commit 54f8cab7e7
2 changed files with 40 additions and 19 deletions

View File

@@ -1457,6 +1457,15 @@ class ServerArgs:
def _handle_model_specific_adjustments(self):
from sglang.srt.configs.model_config import is_deepseek_nsa
assert not (
self.enable_nsa_prefill_cp_shared_kv
and self.hicache_storage_backend is not None
), (
"enable_nsa_prefill_cp_shared_kv does not support "
"hicache_storage_backend in the host-only CP HiCache stage. "
"Disable hicache_storage_backend or disable CP shared KV."
)
if parse_connector_type(self.model_path) == ConnectorType.INSTANCE:
return
@@ -1586,11 +1595,6 @@ class ServerArgs:
"Phase 2 shared KV initially supports NSATokenToKVPool only; "
"HiSparseNSATokenToKVPool is not wired yet."
)
assert self.hicache_storage_backend is None, (
"enable_nsa_prefill_cp_shared_kv does not support "
"hicache_storage_backend in the host-only CP HiCache stage. "
"Disable hicache_storage_backend or disable CP shared KV."
)
if self.disaggregation_mode == "prefill":
assert envs.SGLANG_DISAGGREGATION_ALL_CP_RANKS_TRANSFER.get(), (
"Phase 2 shared KV with PD disaggregation requires "