{"record":{"id":"f5eff4688122c74d","repo":"vllm-project/vllm","slug":"lmcachempconnector-only-works-without-hybrid-kv-ca","errorCode":null,"errorMessage":"LMCacheMPConnector only works without hybrid kv cache manager. Please pass --disable-hybrid-kv-cache-manager when starting vllm","messagePattern":"LMCacheMPConnector only works without hybrid kv cache manager\\. Please pass --disable-hybrid-kv-cache-manager when starting vllm","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"vllm/distributed/kv_transfer/kv_connector/v1/lmcache_mp_connector.py","lineNumber":78,"sourceCode":"    from vllm.forward_context import ForwardContext\n    from vllm.v1.core.kv_cache_manager import KVCacheBlocks\n    from vllm.v1.core.kv_cache_utils import BlockHash\n    from vllm.v1.kv_cache_interface import KVCacheConfig\n    from vllm.v1.request import Request\n\nlogger = lmcache_init_logger(__name__)\n\n\n# Helper functions\ndef reformat_block_ids(block_ids: tuple[list[int], ...] | None) -> list[int]:\n    if block_ids is None:\n        return []\n    assert isinstance(block_ids, tuple), (\n        f\"Expected block_ids to be a tuple of lists, but got {type(block_ids)}\"\n    )\n\n    if len(block_ids) > 1:\n        raise RuntimeError(\n            \"LMCacheMPConnector only works without hybrid kv cache manager. \"\n            \"Please pass --disable-hybrid-kv-cache-manager when starting vllm\"\n        )\n\n    return block_ids[0]\n\n\ndef extract_world_size_and_kv_rank(\n    world_size: int,\n    rank: int,\n    vllm_config: VllmConfig,\n) -> tuple[int, int]:\n    \"\"\"\n    Convert the rank for the MLA.\n    \"\"\"\n    use_mla = mla_enabled(vllm_config.model_config)\n    if not use_mla:\n        return world_size, rank","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/distributed/kv_transfer/kv_connector/v1/lmcache_mp_connector.py#L60-L96","documentation":"RuntimeError from reformat_block_ids in LMCacheMPConnector: the scheduler delivered a tuple of MORE than one block-id list, which is the format the hybrid KV cache manager uses (one list per cache 'slide'/allocator). The multi-process LMCache connector only understands a single flat block list, so vLLM must run with the hybrid KV cache manager disabled. Note the asymmetry: block_ids=None returns [] and a single-element tuple passes; only len>1 tuples raise.","triggerScenarios":"Starting vLLM with the LMCacheMPConnector (e.g. LMCacheMP, LMCacheMPGroup) while the hybrid KV cache manager is active, so block_ids arrives as (sliding_ids, full_ids); default behavior on vLLM versions where hybrid KV cache manager is on by default.","commonSituations":"Upgrading vLLM to a version that enables the hybrid KV cache manager by default while keeping an LMCacheMP deployment config unchanged; new LMCacheMP users missing the required flag.","solutions":["Add --disable-hybrid-kv-cache-manager to the vLLM server/worker launch command, exactly as the message instructs.","Alternatively set the equivalent cache_config option in a programmatic launch (cache_config.disable_hybrid_kv_cache_manager = True).","Check LMCache release notes for when native hybrid-manager support lands if you need both features."],"exampleFix":"# before\nvllm serve model --kv-transfer-config lmcache_mp_config\n# after\nvllm serve model --kv-transfer-config lmcache_mp_config --disable-hybrid-kv-cache-manager","handlingStrategy":"validation","validationCode":"def validate_block_ids(block_ids):\n    if isinstance(block_ids, tuple) and len(block_ids) > 1:\n        raise RuntimeError(\"hybrid KV manager active; pass --disable-hybrid-kv-cache-manager\")\n    return list(block_ids[0]) if block_ids else []","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always launch LMCacheMP deployments with --disable-hybrid-kv-cache-manager","Add the flag to deployment templates and CI smoke tests so upgrades cannot silently re-enable hybrid mode"],"tags":["lmcache","hybrid-kv-cache","config","kv-transfer","cli-flag"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}