Repository navigation
Conversation
This branch has not been deployed
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.
Matryoshka embedding models (for example the Voyage
voyage-4family,voyage-code-4,voyage-code-3,voyage-3-largeandvoyage-3.5) can return smaller vectors, but there was no way to ask for one: the README saysdimensionsis a model-wide setting, yet no model-wide setting existed, and it is rejected inindexing_params/query_params. The docs also showed onlyvoyage-4-largeandvoyage-code-3as Voyage examples.This adds
embedding.dimensions(LiteLLM provider only). It is passed to every embedding call, so indexing, the size probe and queries always agree. Invalid values, and use withsentence-transformers, are rejected when the settings load. Because LiteLLM silently drops parameters a model does not support, the embedder now fails if the returned vectors do not have the configured size instead of indexing at the model's native size. Changing the value changes the embedder's memo key, so the index is rebuilt on the next indexing run.EMBEDDINGS.mdnow lists the ten Voyage text embedding models that work through LiteLLM.Tested with the live Voyage API through
ccc init,ccc index,ccc searchandccc doctor: all ten models at their default size, eight Matryoshka models at 2048, 512 and 256 dimensions, an 80-file index (more than one embedding batch), and the failure cases (voyage-finance-2with 512 andvoyage-4-litewith 300 both surface Voyage's accepted-values message).uv run prek run --all-filespasses, and so does the Docker e2e suite on macOS (the two Linux-only tests are skipped).