- The distribution name is
lmcache_inprocess, while its import namespace islmcache.inprocessfor compatibility with existing integrations. - This repository owns
lmcache/inprocess/**,docs/source/legacy/**, plus the single compatibility shimlmcache/integration/vllm/vllm_v1_adapter.pyrequired by vLLM's canonical connector import. Do not addlmcache/__init__.pyor copy sharedlmcache/v1/**modules; those belong to thelmcachedependency. - Native extensions are built and shipped by LMCache. This project must remain a pure-Python wheel.
NO_NATIVE_EXT=1LMCache builds are CLI-only and do not define thedevice_opsrequired by the in-process connector. UseNO_GPU_EXT=1for CPU-only packaging and smoke validation so the common native extension is present.- Record every imported upstream snapshot in
UPSTREAM_REVISIONand keep its dependency lower bound synchronized with the first compatible LMCache release. UPSTREAM_REVISIONis a key/value manifest; CI installers must read therevision=<40-character-sha>entry rather than treating its first line as the revision.scripts/sync_from_lmcache.shmust accept both ordinary clones and linked Git worktrees. Detect a repository withgit rev-parse; do not assume that<upstream>/.gitis a directory.
- Build with
python -m buildand validate withpython -m twine check dist/*. - Inspect wheel contents and verify that they contain
lmcache/inprocess/**plus only the explicitly allowed vLLM compatibility shim outside that tree. - Run
python -m pytest -q tests/smokeafter installing a compatible LMCache build. Accelerator-specific tests belong on the matching self-hosted runner. - For H200 builds of the LMCache dependency, use
TORCH_CUDA_ARCH_LIST=9.0 MAX_JOBS=1unless broader targets are required. vllm/vllm-openai:lateststartsvllm serve; use--entrypoint bashfor build and debug containers.- For an InProcess-specific vLLM E2E, do not rely only on the registered
LMCacheConnectorV1name: current vLLM resolves that name through its own wrapper module. Setkv_connectortoLMCacheConnectorV1Dynamicandkv_connector_module_pathtolmcache.inprocess.integration.vllm.lmcache_connector_v1, then require the log to show that exact module path, a non-zeroLMCache hit tokensvalue on the second request, and noLMCacheMPConnectorcreation.
- Python files require an SPDX Apache-2.0 header.
- Commits must include a
Signed-off-bytrailer. - Run
pre-commit run --all-filesbefore push. On macOS, document the Linux-only Rust limitation inherited from LMCache if Rust validation is relevant; this repository itself contains no Rust sources.