feat(voyage): add voyage-context-4, voyage-4 family, voyage-4-nano and voyage-multimodal-3.5 - #8
Closed
fzowl wants to merge 3 commits into
Closed
feat(voyage): add voyage-context-4, voyage-4 family, voyage-4-nano and voyage-multimodal-3.5#8fzowl wants to merge 3 commits into
fzowl wants to merge 3 commits into
Conversation
- Add voyage-context-4 (contextual, 120K max tokens, $0.12/1M) - Add voyage-4, voyage-4-large, voyage-4-lite, and free voyage-4-nano - Normalize contextual embedding inputs so a flat list[str] is sent to the API as list[list[str]] (each document a list[str] of chunks) - Update Voyage provider docs and add contextual transformation tests
- Add voyage-multimodal-3.5 embedding model ($0.12/1M, 32k context) - Add pricing/registration tests for voyage-4 family, voyage-context-4, voyage-4-nano, and voyage-multimodal-3.5
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.
What
Adds the latest Voyage AI models and their pricing to the model cost map, and makes the contextual embeddings path robust to standard
list[str]inputs.New models
voyage/voyage-4voyage/voyage-4-largevoyage/voyage-4-litevoyage/voyage-4-nanovoyage/voyage-context-4voyage/voyage-multimodal-3.5voyage-4-nanois Voyage's free/open-weight model and works with the latestvoyageaipython package.Contextual embeddings
The contextualized embeddings API expects
inputsaslist[list[str]](each document alist[str]of chunks).transform_embedding_requestnow normalizes a plain string or a flatlist[str]into that nested shape, so callers using the standard embedding input still hit the API correctly. Nested inputs pass through unchanged.Files changed
model_prices_and_context_window.json+litellm/model_prices_and_context_window_backup.json— new model entrieslitellm/llms/voyage/embedding/transformation_contextual.py— input normalization tolist[list[str]]docs/my-website/docs/providers/voyage.md— document new modelstests/llm_translation/test_voyage_ai.py,tests/test_litellm/llms/voyage/embedding/test_voyage_contextual_transformation.py— testsTesting
All voyage tests pass.