feat(embedding): add Voyage dense embedding support#635
Merged
qin-ctx merged 4 commits intovolcengine:mainfrom Mar 16, 2026
Merged
feat(embedding): add Voyage dense embedding support#635qin-ctx merged 4 commits intovolcengine:mainfrom
qin-ctx merged 4 commits intovolcengine:mainfrom
Conversation
Add first-class Voyage dense embedding support with a dedicated embedder, provider validation, model-aware default dimensions, and focused tests. Keep the configuration surface intentionally narrow: - use the existing dimension field and map it to Voyage's output_dimension request field - do not expose Voyage-only output_dtype - do not expose query/document mode until OpenViking has separate index/query embedder configuration This keeps the PR aligned with the current OpenViking architecture, which stores and retrieves dense float vectors through a single dense embedder configuration. Verification: - .venv/bin/python -m pytest tests/unit/test_voyage_embedder.py tests/unit/test_embedding_config_voyage.py --noconftest -o addopts='' -q - .venv/bin/python -m pytest tests/misc/test_config_validation.py -o addopts='' -q - .venv/bin/ruff check openviking/models/embedder/voyage_embedders.py openviking_cli/utils/config/embedding_config.py tests/unit/test_embedding_config_voyage.py tests/unit/test_voyage_embedder.py
ZaynJarvis
reviewed
Mar 15, 2026
Remove the trivial Voyage-specific helper and inline the output_dimension payload construction at the two call sites. This keeps the request shape unchanged while making the embedder implementation more direct.
1 task
ZaynJarvis
approved these changes
Mar 16, 2026
Contributor
Author
|
Also added missing 'ollama' to the doctoring Should I add it also to the docs? (ofc it is not related to Voyage - but the doctoring was a conflict so I added it as well) |
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
VoyageDenseEmbedderfor Voyage's OpenAI-compatible embeddings APIvoyageas a first-class dense embedding provider in configWhy this version is intentionally narrow
This PR adds Voyage dense text embeddings in a way that matches OpenViking's current embedding architecture.
Today OpenViking:
Because of that, this PR intentionally does not expose Voyage-specific features that do not fit the current architecture yet:
output_dtypeconfig fieldInstead, the PR keeps the public surface to the existing generic fields:
providerapi_keyapi_basemodeldimensionFor Voyage,
dimensionis mapped internally to Voyage'soutput_dimensionrequest field.Review feedback addressed
This revision directly addresses the review concerns from #614:
output_dtypeis not added toEmbeddingModelConfigquery/document mode is not documented as a supported config knob
input_type: document/queryat this stage would imply asymmetric retrieval support that the current config model does not provide yet.Voyage support still remains first-class
Implementation details
openviking/models/embedder/voyage_embedders.pyVoyageDenseEmbedderopenviking_cli/utils/config/embedding_config.pyprovider: \"voyage\"get_effective_dimension()when schema dimension is omitteddocs/en/guides/01-configuration.mdVerification
.venv/bin/python -m pytest tests/unit/test_voyage_embedder.py tests/unit/test_embedding_config_voyage.py --noconftest -o addopts='' -q.venv/bin/python -m pytest tests/misc/test_config_validation.py -o addopts='' -q.venv/bin/ruff check openviking/models/embedder/voyage_embedders.py openviking_cli/utils/config/embedding_config.py tests/unit/test_embedding_config_voyage.py tests/unit/test_voyage_embedder.py