Skip to content

2.0.0-next.1 — unified embeddings interface (opencode V2)

Pre-release
Pre-release

Choose a tag to compare

@xykbear xykbear released this 08 Oct 13:16

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.
  • builtin is self-contained: the bundled python/embed_server.py serves OpenAI-compatible
    POST /v1/embeddings and auto-downloads the model into ~/.opencode-md-memory/models/<model>/onnx
    on first use (MDM_EMBED_MODEL_DIR to override, MDM_EMBED_AUTO_FETCH=0 to 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 .part download; /health reports the model
  • index rebuilds on any model change (including a dimension-preserving swap)
  • universal loader: accepts any ONNX text model (sentence_embedding or 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 latest tag (1.3.0).