feat: Add VoyageAI embedder support #1049
Open
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.
feat: Add VoyageAI embedder support
Overview
Adds support for VoyageAI embeddings via the
universal_apibackend, providing state-of-the-art semantic embeddings for production use.Motivation
VoyageAI offers superior embedding quality compared to standard models:
Changes
1. VoyageAI Backend Mapping
Maps
MOS_EMBEDDER_BACKEND=voyageaitouniversal_apiembedder with VoyageAI-specific defaults:2. Environment Variables
New environment variable support:
VOYAGE_API_KEY- VoyageAI API key (convenience alias)MOS_EMBEDDER_BACKEND=voyageai- Enables VoyageAI modeBackward compatible with existing
MOS_EMBEDDER_API_KEYandMOS_EMBEDDER_API_BASE.3. Intelligent Defaults
When
backend=voyageai:https://api.voyageai.com/v1VOYAGE_API_KEYenvironment variableMOS_EMBEDDER_*vars if not setUsage
Basic Configuration
Advanced Configuration
Docker Compose Example
Available Models
VoyageAI supports multiple models optimized for different use cases:
voyage-3-largevoyage-3voyage-3-litevoyage-code-3voyage-finance-2voyage-law-2See VoyageAI docs for latest models.
Testing
Tested with:
voyage-3-litemodel (production)universal_apibackendImpact
universal_apiembedderMigration
Existing users can continue using
ollama,sentence_transformer, oruniversal_api. VoyageAI is opt-in viaMOS_EMBEDDER_BACKEND=voyageai.Related
UniversalAPIEmbedderinfrastructureChecklist
References