Skip to content

wizard: missing [onnx]/[web] extras not surfaced in summary #353

@memtomem

Description

@memtomem

Summary

After mm init finishes, the next-step commands can fail silently because the wizard doesn't detect missing pypi extras. Two failure modes, one root cause.

Reproduce (Korean preset, base install)

uv tool install memtomem             # base install, no extras
mm init                               # choose preset [3] Korean-optimized
mm web                                # → Error: Web UI requires the [web] extra

And via Web UI "Index now":

POST /api/index HTTP/1.1 200 OK
ERROR Embedding failed for ... fastembed is required for the ONNX embedding
provider. Install it with: pip install memtomem[onnx]

Root cause

  1. _step_embedding has a fastembed import-check (init_cmd.py:120-130) that only runs on the advanced 10-step path. Preset paths (minimal/english/korean) apply _apply_preset directly and skip every per-step check.
  2. The summary's [web] hint is gated on if not source_install and not project_install (init_cmd.py:1151). Source-install users who invoke the global mm binary (uv tool install) hit the same fastapi missing state, but no warning surfaces.

Net: wizard happily writes embedding.provider = "onnx" and tells the user to run mm web while the current Python interpreter lacks both fastembed and fastapi.

Expected

Before the "Next steps" block, the summary should name the missing extras, state which commands will fail, and print a single install hint (memtomem[all] when two extras are missing, narrower when one).

  [!] Missing extras: onnx, web
      'mm index' (embeddings) and 'mm web' (UI) will fail until installed.
      → uv tool install --reinstall "memtomem[all]"

Scope

Single-PR fix: centralize the missing-extras check in _write_config_and_summary so every path (preset + advanced + non-interactive) surfaces it. Covers both failure modes (onnx and web) since they share the same summary step.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions