Fix missing embedding model manually
Short description
need a way to re-run downloading embedding model
What problem does this solve?
When embedding model failed to download for the first time run, it keeps show logs below:
[magic-context] embedding model failed to load: {"name":"ResolveMessage",
"position":null,"message":"Cannot find package 'onnxruntime-node' from 'C
:\\Users\\qufei\\.cache\\opencode\\packages\\@cortexkit\\opencode-magic-c
ontext@latest\\node_modules\\@huggingface\\transformers\\dist\\transforme
rs.node.mjs'","level":"error","specifier":"onnxruntime-node","importKind"
:"import-statement","referrer":"C:\\Users\\qufei\\.cache\\opencode\\packa
ges\\@cortexkit\\opencode-magic-context@latest\\node_modules\\@huggingfac
e\\transformers\\dist\\transformers.node.mjs"}
Proposed solution
Provide a slash command or a button in desktop app for re-running downloading embedding model.
Alternatives considered
No response
Area
Memory / historian / dreamer
Additional context
No response
Thanks for the detail. Worth clarifying what's actually happening, because it's not the embedding model — it's the embedding runtime.
Magic Context's local embeddings run through @huggingface/transformers, which does a static import "onnxruntime-node" (a native package with a platform-specific binary). On your install that package — or its Windows binary — didn't install correctly, so the import throws Cannot find package 'onnxruntime-node' on every embedding attempt. Re-downloading the model wouldn't help; the model file isn't the missing piece.
Two things are landing in the next release:
- Graceful degradation — Magic Context now detects this specific failure and disables local embeddings with a single clear, actionable log line instead of repeating the cryptic resolver error on every attempt. Your existing memories are untouched.
- Doctor detection —
doctornow inspects the installed plugin foronnxruntime-node(and its platform binary) and flags it up front with the fix, rather than letting you discover it in the logs.
Until that release, you can fix it by:
- reinstalling the plugin:
npx @cortexkit/magic-context@latest doctor --force, or - setting
embedding.providertoopenai-compatible(LM Studio / Ollama) oroff.
I'll follow up here when the release with the doctor check ships.
Shipped in v0.25.0 — following up as promised.
Both pieces landed:
- Graceful degradation — Magic Context now detects the missing local embedding runtime (
onnxruntime-node) and disables local embeddings with a single clear log line instead of repeating the resolver error on every attempt. Existing memories are untouched. - Doctor detection —
doctornow checks the installed plugin for the embedding runtime (layout-agnostic resolution) and flags it up front with the fix.
Update with npx @cortexkit/magic-context@latest doctor --force. Reopen if the doctor check doesn't catch your case.