Skip to content

refactor: consolidate API to server_api and remove deprecated stacks#1344

Merged
CaralHsi merged 5 commits intoMemTensor:dev-20260323-v2.0.11from
CaralHsi:chore/delete-useless-file
Mar 25, 2026
Merged

refactor: consolidate API to server_api and remove deprecated stacks#1344
CaralHsi merged 5 commits intoMemTensor:dev-20260323-v2.0.11from
CaralHsi:chore/delete-useless-file

Conversation

@CaralHsi
Copy link
Copy Markdown
Collaborator

@CaralHsi CaralHsi commented Mar 25, 2026

Summary

  • Consolidate API entrypoints to the server_api path and remove deprecated start_api / product_api surfaces.
  • Remove unused legacy modules (nebular graph implementation and old mem_os product wrappers) to reduce maintenance overhead and duplicate runtime paths.
  • Align CLI / Makefile / docker and handler initialization with the server-only path.

Why

The branch had multiple historical API/runtime paths that overlapped with current server_api behavior and increased ambiguity about supported interfaces. This cleanup keeps one primary server path and removes dead/deprecated implementations.

Scope of changes

  • Deleted deprecated API modules and tests:
    • src/memos/api/start_api.py
    • src/memos/api/product_api.py
    • src/memos/api/routers/product_router.py
    • tests/api/test_start_api.py
    • tests/api/test_product_router.py
  • Deleted deprecated graph/product modules:
    • src/memos/graph_dbs/nebular.py
    • src/memos/mem_os/product.py
    • src/memos/mem_os/product_server.py
    • src/memos/mem_os/client.py
  • Updated references and initialization paths:
    • Makefile serve target -> memos.api.server_api:app
    • src/memos/cli.py / tests/test_cli.py OpenAPI export path updates
    • docker/Dockerfile.krolik entrypoint alignment
    • handler dependency/init cleanup for removed mos_server
    • related config/factory updates to remove deleted backends

Validation

  • python -m pytest tests/test_cli.py -q -> passed
  • compileall on edited modules passed
  • Note: some integration tests are environment-dependent and still require optional modules such as redis / psycopg2.

Closes #1346

@CaralHsi CaralHsi changed the title chore: delete useless file refactor: consolidate API to server_api and remove deprecated stacks Mar 25, 2026
@CaralHsi CaralHsi marked this pull request as ready for review March 25, 2026 08:53
@CaralHsi CaralHsi merged commit d401ee7 into MemTensor:dev-20260323-v2.0.11 Mar 25, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant