Skip to content

[Chore] Remove v0 code #2968

Merged
sammshen merged 1 commit intoLMCache:devfrom
sammshen:remove-v0-code
Apr 15, 2026
Merged

[Chore] Remove v0 code #2968
sammshen merged 1 commit intoLMCache:devfrom
sammshen:remove-v0-code

Conversation

@sammshen
Copy link
Copy Markdown
Contributor

@sammshen sammshen commented Apr 6, 2026

next task is to flatten v1 code into v0

What this PR does / why we need it:

Special notes for your reviewers:

If applicable:

  • this PR contains user facing changes - docs added
  • this PR contains unit tests

Note

Medium Risk
Removes legacy modules and an exposed console script, which can break downstream imports or workflows that still rely on the v0 server/protocol/serde APIs.

Overview
Removes legacy v0 code paths, including the old socket-based lmcache.server implementation, lmcache.protocol, and related storage backend helpers (evictors and serde implementations).

Updates packaging and tests to drop the v0 entrypoint (lmcache_v0_server) and associated protocol/server fixtures/tests, and makes small doc/CODEOWNERS adjustments to reflect current v1 metadata types and ownership.

Reviewed by Cursor Bugbot for commit 655d6e0. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread pyproject.toml
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request primarily involves a significant refactoring of the codebase to move modules from the lmcache.v1 namespace to the top-level lmcache package, along with associated import updates across the project. Additionally, the configuration system in lmcache/config.py has been overhauled to use a more robust, centralized definition approach, and the LMCacheServer in lmcache/server/__main__.py has been updated with improved logging and socket handling. My feedback focuses on ensuring compliance with the project's style guide regarding type hints and code cleanliness.

Comment thread lmcache/config.py
Comment thread lmcache/protocol.py
Comment thread lmcache/config.py
Comment thread lmcache/server/__main__.py
@ApostaC ApostaC added the full Run comprehensive tests on this PR label Apr 6, 2026
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0b41003. Configure here.

Comment thread lmcache/config.py
@sammshen sammshen force-pushed the remove-v0-code branch 3 times, most recently from 7f73d30 to bd9f161 Compare April 8, 2026 20:46
@DongDongJu
Copy link
Copy Markdown
Collaborator

DongDongJu commented Apr 10, 2026

WoW sorry for late @sammshen, I will take a look more closely at this night.
Always thanks for the great work

@sammshen sammshen changed the title [Chore] Remove v0 code and flatten lmcache/v1/ into lmcache/ [Chore] Remove v0 code Apr 15, 2026
Delete legacy v0 modules that are no longer used by the v1 runtime:

- lmcache/server/ (v0 server; v1 server lives at lmcache/v1/server/)
- lmcache/config.py, lmcache/protocol.py (v0 equivalents in lmcache/v1/)
- lmcache/storage_backend/evictor/ (only used by the v0 server)
- lmcache/storage_backend/serde/{fast,safe,torch}_serde.py (v0-only serializers)
- tests/test_protocol.py and the unused lmserver_process fixture in
  tests/conftest.py
- pyproject.toml: drop the lmcache_v0_server entry point
- .github/CODEOWNERS: drop the /lmcache/server/ entry

Keep lmcache/storage_backend/serde/cachegen_* and serde.py because they
are still imported by lmcache/v1/storage_backend/naive_serde. Flattening
lmcache/v1/ into lmcache/ (and the remaining cleanup that enables) will
follow in a separate PR.

Signed-off-by: Samuel Shen <slshen@uchciago.edu>
Copy link
Copy Markdown
Collaborator

@maobaolong maobaolong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally agree to remove all of v0 related codes 👍

@sammshen sammshen merged commit c075e85 into LMCache:dev Apr 15, 2026
38 checks passed
sammshen pushed a commit to sammshen/LMCache that referenced this pull request Apr 15, 2026
Move lmcache/v1/* up to lmcache/ and tests/v1/* up to tests/ now that v0
is gone (PR LMCache#2968). Resolves the utils namespace collision by converting
lmcache/utils.py into a package and absorbing v1/utils/bloom_filter.py
and v1/utils/cache_utils.py. Also folds lmcache/storage_backend/serde/
up to lmcache/serde/.

Rewrites all lmcache.v1.* / lmcache/v1/ (and tests.v1.* / tests/v1/)
references across code, tests, docs, CI configs, and CODEOWNERS.

Signed-off-by: Samuel Shen <slshen@uchciago.edu>
@sammshen sammshen mentioned this pull request Apr 15, 2026
2 tasks
ftian1 pushed a commit to ftian1/LMCache that referenced this pull request Apr 20, 2026
[Chore] Remove v0 code

Delete legacy v0 modules that are no longer used by the v1 runtime:

- lmcache/server/ (v0 server; v1 server lives at lmcache/v1/server/)
- lmcache/config.py, lmcache/protocol.py (v0 equivalents in lmcache/v1/)
- lmcache/storage_backend/evictor/ (only used by the v0 server)
- lmcache/storage_backend/serde/{fast,safe,torch}_serde.py (v0-only serializers)
- tests/test_protocol.py and the unused lmserver_process fixture in
  tests/conftest.py
- pyproject.toml: drop the lmcache_v0_server entry point
- .github/CODEOWNERS: drop the /lmcache/server/ entry

Keep lmcache/storage_backend/serde/cachegen_* and serde.py because they
are still imported by lmcache/v1/storage_backend/naive_serde. Flattening
lmcache/v1/ into lmcache/ (and the remaining cleanup that enables) will
follow in a separate PR.

Signed-off-by: Samuel Shen <slshen@uchciago.edu>
Co-authored-by: Samuel Shen <slshen@uchciago.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full Run comprehensive tests on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants