vLLM Dynamic Connector#

Upstream Integration:#

LMCache integration with official upstream vLLM was introduced in early February 2025.

vLLM imports the connector from the lmcache package and wraps it in vllm/distributed/kv_transfer/kv_connector/v1/lmcache_connector.py:

from lmcache.integration.vllm.vllm_v1_adapter import LMCacheConnectorV1Impl

This means that any updates to LMCache connector need to be synced/updated in the upstream vLLM.

Example usage of vLLM upstream connector:

Pythonic Transfer Config:

from vllm.config import KVTransferConfig
ktc = KVTransferConfig(
    kv_connector="LMCacheConnectorV1",
    kv_role="kv_both",
)

Command Line Transfer Configs:

vllm serve "YOUR_MODEL" \
    --kv-transfer-config \
    '{"kv_connector":"LMCacheConnectorV1", "kv_role":"kv_both"}'

Dynamic Connector:#

In June 2025, vLLM supports dynamic loading of KV connector implementations so we can directly reference connectors from the LMCache package without having to update vLLM.

Example usage of dynamic connector from LMCache:

Pythonic Transfer Config:

from vllm.config import KVTransferConfig
ktc = KVTransferConfig(
    kv_connector="LMCacheConnectorV1Dynamic",
    kv_role="kv_both",
    kv_connector_module_path="lmcache.integration.vllm.lmcache_connector_v1",
)

Command Line Transfer Config:

vllm serve "YOUR_MODEL" \
    --kv-transfer-config \
    '{"kv_connector":"LMCacheConnectorV1Dynamic","kv_role":"kv_both","kv_connector_module_path":"lmcache.integration.vllm.lmcache_connector_v1"}'

This allows LMCache to modify/develop connectors and quickly plug-and-play.

Any custom adapters will be documented here in the future as well as possible deprecations to the upstream connector.