You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mm init -y (non-interactive) accepts --provider onnx|ollama|openai and --tokenizer kiwipiepy without checking whether the corresponding Python extras (fastembed, ollama, openai, kiwipiepy) are importable. It writes the user-specified choice to config.json as if it were valid, and the failure only surfaces at runtime — as a warning from component_factory / fts_tokenizer, not at mm init time.
The interactive wizard already surfaces missing extras via _collect_missing_extras (Phase 1 of #360 / #361). The -y path bypasses the wizard steps entirely and doesn't call the equivalent check.
Adjacent to the packaging / docs story that just landed in #395 (primary install flipped to memtomem[all]), but orthogonal: even after that docs change, a user who takes the Minimal install path and then runs mm init -y --provider onnx ... gets exactly this gap.
Where (verified on 2026-04-23, fresh uv tool install memtomem no extras)
The (0d) in the summary is the tell — the provider is configured as onnx but the embedder's dimension is 0, because fastembed is not importable and the factory falls back silently.
Later, at index/search time:
WARNING Embedding dimension mismatch detected at startup — entering degraded mode.
WARNING DB embedding_dimension=0 but configured provider is 'onnx' — continuing in recovery mode.
Run 'mm embedding-reset --mode apply-current' to fix.
Same pattern for --tokenizer kiwipiepy on a fresh install:
$ mm init -y --tokenizer kiwipiepy --mcp skip # succeeds
$ mm search "..." # first call
WARNING kiwipiepy not installed — falling back to unicode61. Install with: pip install kiwipiepy
--provider ollama / --provider openai should behave the same (same importlib.util.find_spec seam) but I didn't re-test those in this session.
Why the gap exists (hypothesis, not verified in code)
The interactive wizard walks through steps and _collect_missing_extras runs at the appropriate step to surface an install-type-aware hint. The -y path short-circuits to the config writer using the flag values as given, with no call into _collect_missing_extras at all.
This is an architectural consistency gap, not a one-line bug — the remediation is to route the -y path through the same extras check the interactive wizard does, or to factor out a validation function both entry points call.
Handled by this issue
Route -y non-interactive flag handling through the same extras-availability check the interactive wizard already has.
Behavior choice on failure: fail with a clear error (consistent with mm web which exits loudly when fastapi is missing) is preferred over "warn and continue" for non-interactive flows, since -y is typically used in automation where a stale config is worse than a failed init.
Re-running wizard on config drift — different axis, different UX question.
Acceptance criteria
mm init -y --provider onnx on a fresh uv tool install memtomem (no extras) exits non-zero with a clear message pointing at the missing extra and the install-type-aware fix command.
mm init -y --tokenizer kiwipiepy on the same setup exits non-zero similarly.
Summary
mm init -y(non-interactive) accepts--provider onnx|ollama|openaiand--tokenizer kiwipiepywithout checking whether the corresponding Python extras (fastembed,ollama,openai,kiwipiepy) are importable. It writes the user-specified choice toconfig.jsonas if it were valid, and the failure only surfaces at runtime — as a warning fromcomponent_factory/fts_tokenizer, not atmm inittime.The interactive wizard already surfaces missing extras via
_collect_missing_extras(Phase 1 of #360 / #361). The-ypath bypasses the wizard steps entirely and doesn't call the equivalent check.Adjacent to the packaging / docs story that just landed in #395 (primary install flipped to
memtomem[all]), but orthogonal: even after that docs change, a user who takes the Minimal install path and then runsmm init -y --provider onnx ...gets exactly this gap.Where (verified on 2026-04-23, fresh
uv tool install memtomemno extras)The
(0d)in the summary is the tell — the provider is configured asonnxbut the embedder's dimension is 0, becausefastembedis not importable and the factory falls back silently.Later, at index/search time:
Same pattern for
--tokenizer kiwipiepyon a fresh install:--provider ollama/--provider openaishould behave the same (sameimportlib.util.find_specseam) but I didn't re-test those in this session.Why the gap exists (hypothesis, not verified in code)
The interactive wizard walks through steps and
_collect_missing_extrasruns at the appropriate step to surface an install-type-aware hint. The-ypath short-circuits to the config writer using the flag values as given, with no call into_collect_missing_extrasat all.This is an architectural consistency gap, not a one-line bug — the remediation is to route the
-ypath through the same extras check the interactive wizard does, or to factor out a validation function both entry points call.Handled by this issue
-ynon-interactive flag handling through the same extras-availability check the interactive wizard already has.mm webwhich exits loudly whenfastapiis missing) is preferred over "warn and continue" for non-interactive flows, since-yis typically used in automation where a stale config is worse than a failed init.uv sync --extra, project →uv add, tool →uv tool install --reinstall, uvx →uvx --with).Explicitly out of scope
-ymode — tracked in mm init: auto-install consistency for python extras + mismatch banner (Phase 2 of #360) #362 (Phase 2 of mm init: install-type detection vs runtime interpreter axis mismatch #360). The validation gap in this issue is the precondition check; mm init: auto-install consistency for python extras + mismatch banner (Phase 2 of #360) #362 is the remediation.[all]composition inpyproject.toml— docs-only flip already landed in docs(install): flip primary install to memtomem[all] #395.Acceptance criteria
mm init -y --provider onnxon a freshuv tool install memtomem(no extras) exits non-zero with a clear message pointing at the missing extra and the install-type-aware fix command.mm init -y --tokenizer kiwipiepyon the same setup exits non-zero similarly.CliRunnercoverage for the-y --provider <x>and-y --tokenizer <x>paths under missing-extras conditions. Use the_isatty/find_specseam established in feat(cli): add mm uninstall for state cleanup separate from binary removal #379 (seefeedback_clirunner_isatty_seam.md) for reliable patching.Related
_collect_missing_extras)Fact-check evidence
See this comment on #391 for the full fresh-install reproduction log that exposed this gap.