diff --git a/vllm/config.py b/vllm/config.py index b61d1a22c8a08..aa8b16920a97f 100644 --- a/vllm/config.py +++ b/vllm/config.py @@ -1146,7 +1146,7 @@ class CacheConfig: if not self.enable_prefix_caching: return - if self.sliding_window is not None: + if self.sliding_window is not None and not envs.VLLM_USE_V1: raise NotImplementedError( "Prefix caching is not supported with sliding window. " "Run with --disable-sliding-window to use prefix caching.")