feat: Remote text embeddings compute#4064
Open
mattkjames7 wants to merge 20 commits intomasterfrom
Open
Conversation
11 tasks
Contributor
Author
Tracking
Standard development
CI Testing Labels
Documentation checklist
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds LiteLLM-backed remote embedding providers to the embeddings query module while preserving the existing local sentence-transformers execution path, plus CI-safe tests for remote failure behavior.
Changes:
- Route embedding computation to LiteLLM remote providers based on
model_nameprefixes; keep bare/HF-style names local. - Add remote-only configuration options (e.g.,
api_base,timeout,num_retries,remote_batch_size,concurrency,normalize) and remote model dimension probing with caching. - Add e2e tests for graceful remote failures and opt-in pytest e2e tests for real OpenAI/Ollama providers.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| release/package/mgbuild.sh | Ensures build deps are installed in the container before building the gssapi wheel. |
| mage/python/embeddings.py | Implements LiteLLM remote routing, batching/concurrency, client-side normalization, nullable dimension, and remote model-info probing/cache. |
| mage/tests/e2e/embeddings_test/test_remote_text_failure/test.yml | CI-safe e2e test verifying remote embeddings.text failure returns success=false with null outputs. |
| mage/tests/e2e/embeddings_test/test_remote_node_sentence_failure/test.yml | CI-safe e2e test verifying remote embeddings.node_sentence failure doesn’t write embeddings. |
| mage/tests/e2e/embeddings_test/test_remote_node_sentence_failure/input.cyp | Fixture graph data for the remote node_sentence failure test. |
| mage/tests/e2e/embeddings_test/test_remote_openai.py | Opt-in real-provider e2e tests for OpenAI embeddings/model_info/node_sentence. |
| mage/tests/e2e/embeddings_test/test_remote_ollama.py | Opt-in real-provider e2e tests for Ollama embeddings/model_info/node_sentence. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
antejavor
requested changes
Apr 27, 2026
11 tasks
|
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.




Add remote embedding providers to the embeddings query module
Adds support for any embedding provider supported by LiteLLM — OpenAI, Azure OpenAI, Ollama, Cohere, Voyage, Mistral, Jina, Bedrock, Vertex AI, Hugging Face, and any OpenAI‑compatible endpoint — while keeping the local sentence-transformers path unchanged.
Summary
Backwards compatibility
Zero Cypher changes required. CALL embeddings.node_sentence(null, {}) and CALL embeddings.text([...], {}) keep the local path with the same default model and return shape.
Tests