feat(embedding): add jina and mistral providers, fix stale install hints#154
Merged
zc277584121 merged 1 commit intoJul 2, 2026
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
jinaandmistral.jina.py: talks to Jina's embeddings REST API (https://api.jina.ai/v1/embeddings) directly over the corehttpxdependency — no new extra needed. Default modeljina-embeddings-v4(2048-dim, Matryoshka-truncatable).mistral.py: uses the officialmistralaiSDK behind a newmistralextra. Default modelmistral-embed(1024-dim)._PROVIDERS/DEFAULT_MODELS/_INSTALL_HINTS), themfs-server setup --section embeddingwizard,pyproject.toml, anddocs/providers.md.openai.py,voyage.py,ollama.py, andlocal.py's module docstrings still told users topip install memsearch(from when this code was adapted from Memsearch) instead ofmfs-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
tests/test_embeddings_registry.py: registry lists all 8 providers with a default model each;jinaraises a clearRuntimeErrorwithoutJINA_API_KEY;mistralraises the registry's install-hintImportErrorwhen the SDK isn't installed; a mocked-transport test exercisesJinaEmbedding.embed()end to end (request body, auth header, response parsing).mistralextra resolves cleanly (uv sync --extra mistral) anduv.lockpicked it up correctly for both themistralandall-providersextras.pytestsuite passes with no regressions.ruff format --check/ruff checkclean.