Skip to content

feat(embedding): add jina and mistral providers, fix stale install hints#154

Merged
zc277584121 merged 1 commit into
zilliztech:mainfrom
zc277584121:feat/jina-mistral-embedding-providers
Jul 2, 2026
Merged

feat(embedding): add jina and mistral providers, fix stale install hints#154
zc277584121 merged 1 commit into
zilliztech:mainfrom
zc277584121:feat/jina-mistral-embedding-providers

Conversation

@zc277584121

Copy link
Copy Markdown
Collaborator

Summary

  • Compared MFS's embedding provider set against upstream Memsearch (the project this embeddings code was originally adapted from) and found two providers supported upstream but missing here: jina and mistral.
  • jina.py: talks to Jina's embeddings REST API (https://api.jina.ai/v1/embeddings) directly over the core httpx dependency — no new extra needed. Default model jina-embeddings-v4 (2048-dim, Matryoshka-truncatable).
  • mistral.py: uses the official mistralai SDK behind a new mistral extra. Default model mistral-embed (1024-dim).
  • Both wired into the provider registry (_PROVIDERS/DEFAULT_MODELS/_INSTALL_HINTS), the mfs-server setup --section embedding wizard, pyproject.toml, and docs/providers.md.
  • Also fixed a copy-paste leftover: openai.py, voyage.py, ollama.py, and local.py's module docstrings still told users to pip install memsearch (from when this code was adapted from Memsearch) instead of mfs-server. Swept the whole repo for other occurrences — these four were the only ones; the remaining "memsearch" mentions (README, docs/why.md, .gitignore) are legitimate references to the project itself.

Test plan

  • New tests/test_embeddings_registry.py: registry lists all 8 providers with a default model each; jina raises a clear RuntimeError without JINA_API_KEY; mistral raises the registry's install-hint ImportError when the SDK isn't installed; a mocked-transport test exercises JinaEmbedding.embed() end to end (request body, auth header, response parsing).
  • Verified the new mistral extra resolves cleanly (uv sync --extra mistral) and uv.lock picked it up correctly for both the mistral and all-providers extras.
  • Full pytest suite passes with no regressions.
  • ruff format --check / ruff check clean.

Compared MFS's embedding provider set against upstream Memsearch (the
project this code was originally adapted from) and found two gaps:

- jina and mistral are supported upstream but missing here. Both are
  ported over (jina talks to Jina's embeddings REST API directly over
  the core httpx dep, no extra needed; mistral uses the official SDK
  behind a new `mistral` extra), wired into the provider registry, the
  setup wizard, and docs/providers.md.
- openai.py, voyage.py, ollama.py, and local.py still told users to
  `pip install memsearch` in their module docstrings — leftover from
  when this code was copied over. Fixed to say mfs-server.

Signed-off-by: Cheney Zhang <chen.zhang@zilliz.com>
@zc277584121 zc277584121 merged commit 18580ab into zilliztech:main Jul 2, 2026
10 checks passed
@zc277584121 zc277584121 deleted the feat/jina-mistral-embedding-providers branch July 2, 2026 05:12
@zc277584121 zc277584121 mentioned this pull request Jul 10, 2026
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant