Repository navigation
Releases: xykbear/opencode-md-memory
Releases · xykbear/opencode-md-memory
Release list
2.0.0-next.1 — unified embeddings interface (opencode V2)
Embedding access is now unified on a single OpenAI-compatible interface.
Migration (breaking — no backward-compatible aliases)
| Old | New |
|---|---|
embeddingBackend: "python" |
embeddingBackend: "builtin" |
embeddingBackend: "remote" |
embeddingBackend: "endpoint" |
remoteApiUrl |
embeddingBaseUrl |
remoteApiKey |
embeddingApiKey |
- Default model:
nomic-embed-text-v1→embeddinggemma-2(multilingual). The index records its
embedding-space identity and auto-rebuilds on the next session — both are 768-dim, so the change
is detected by identity, not dimension. builtinis self-contained: the bundledpython/embed_server.pyserves OpenAI-compatible
POST /v1/embeddingsand auto-downloads the model into~/.opencode-md-memory/models/<model>/onnx
on first use (MDM_EMBED_MODEL_DIRto override,MDM_EMBED_AUTO_FETCH=0to disable).endpoint: point at any OpenAI-compatible embeddings service — llama.cpp / Ollama / TEI /
LM Studio / OpenAI — through the same interface.
Changes
- unify embedding backends on one OpenAI-compatible client (
builtin/endpoint) python/embed_server.py: serves/v1/embeddings; atomic.partdownload;/healthreports the model- index rebuilds on any model change (including a dimension-preserving swap)
- universal loader: accepts any ONNX text model (
sentence_embeddingor mean-pool;token_type_ids
and image/video/audio feature inputs handled when present)
Compatibility
- opencode V2 (
@opencode/plugin >=2.0.0 <3) — this line. Pre-release. - For opencode V1, install the
latesttag (1.3.0).
1.3.0 — unified embeddings interface (opencode V1)
Embedding access is now unified on a single OpenAI-compatible interface.
Migration (breaking — no backward-compatible aliases)
| Old | New |
|---|---|
embeddingBackend: "python" |
embeddingBackend: "builtin" |
embeddingBackend: "remote" |
embeddingBackend: "endpoint" |
remoteApiUrl |
embeddingBaseUrl |
remoteApiKey |
embeddingApiKey |
- Default model:
nomic-embed-text-v1→embeddinggemma-2(multilingual). The index records its
embedding-space identity and auto-rebuilds on the next session — both are 768-dim, so the change
is detected by identity, not dimension. builtinis self-contained: the bundledpython/embed_server.pyserves OpenAI-compatible
POST /v1/embeddingsand auto-downloads the model into~/.opencode-md-memory/models/<model>/onnx
on first use (MDM_EMBED_MODEL_DIRto override,MDM_EMBED_AUTO_FETCH=0to disable).endpoint: point at any OpenAI-compatible embeddings service — llama.cpp / Ollama / TEI /
LM Studio / OpenAI — through the same interface.
Changes
- unify embedding backends on one OpenAI-compatible client (
builtin/endpoint) python/embed_server.py: serves/v1/embeddings; atomic.partdownload;/healthreports the model- index rebuilds on any model change (including a dimension-preserving swap)
- universal loader: accepts any ONNX text model (
sentence_embeddingor mean-pool;token_type_ids
and image/video/audio feature inputs handled when present)
Compatibility
- opencode V1 (
@opencode-ai/plugin >=1.4.0) — this line. - For opencode V2, install
opencode-md-memory@next(2.0.0-next.1).
v1.2.0
v1.2.0
Highlights
- 语义标题取自正文 H1:向量的语义标题不再绑定文件名 slug,而是取正文首个
# H1标题(无 H1 时回退文件名)。内容换题只需改 H1,下次注入自动重嵌;纯正文编辑不改 H1 不触发重嵌,保持编辑零成本。
Bug fix
- 嵌入服务自愈:修复嵌入服务死亡(idle-timeout 自卸载 / 进程重启孤儿断管)后整场会话每条消息超时失败、注入完全失效的问题。
- 请求失败 → 丢弃缓存 → 重建后端(python respawn / remote 重建客户端)→ 重试一次
- loopback 地址(127.0.0.1)加入 NO_PROXY,死端口即刻失败(~8ms)而非经代理等待 ~3s
- 正常日志(model loaded / [embed] 计时)改走 info 级,不再被 opencode TUI 当错误渲染
- embed server stdout 打印容错 BrokenPipeError,孤儿断管服务不再导致 /embed 500
Chore
- 索引 title 提取改为 stat 键控缓存,未变更文件零读取(减少每次注入的全量读盘)
Notes
- 配置项无变更,可直接升级(opencode plugin opencode-md-memory -f -g;若未生效需
rm -rf ~/.cache/opencode/packages/opencode-md-memory*后重装)
v1.1.0
Highlights
- Binary vector index — vectors now live in a flat
vectors.bin(Float32Array) alongside a slimindex.json(id + title only). Smaller index, faster loads. - L1 index cache — parsed index is cached in-memory and invalidated by mtime, avoiding re-parsing on every injection.
- Similarity score in references — injected
<memory_reference>entries now show their cosine score.
Config unification
semanticModel and remoteModel are removed. Use a single option for both backends:
{
"plugin": [
[
"opencode-md-memory",
{
"embeddingBackend": "remote",
"embeddingModel": "text-embedding-3-small"
}
]
]
}embeddingModelis passed to the OpenAI-compatible/embeddingsAPI (remote backend).- For the python backend it resolves the model directory at
~/.opencode-md-memory/models/{model}/onnx/, and is forwarded to the embed server via the new--model-nameflag.
Bug fix
- Dimension-mismatch safety — switching embedding models (a different output dimension) now rebuilds the index from scratch instead of mixing old/new vectors, which previously could corrupt
vectors.binor surfaceNaNscores. A defensive check inwriteIndexfails loudly on any mixed-dimension write.
Breaking change
semanticModel/remoteModelconfig keys removed → useembeddingModel.
Full Changelog: https://github.com/xykbear/opencode-md-memory/commits/v1.1.0