feat(voyage): add voyage-context-4 and voyage-4 family models - #2
Conversation
- Add voyage-context-4 (contextual embeddings, $0.12/M, 120k ctx) - Add voyage-4, voyage-4-large, voyage-4-lite and voyage-multimodal-3.5 - Normalize contextual embedding input so bare str becomes List[str] - Update Voyage provider docs and tests
Open-weight voyage-4 family member (32k ctx). No public API price; input/output cost set to 0.0.
The Voyage contextualized embeddings API requires inputs to be a List[List[str]]. Normalize bare string and flat List[str] inputs into a single-document List[List[str]] so the request always matches the API contract. Update tests and docs accordingly.
|
VERDICT:APPROVED Reviewed model config, pricing, contextual-input handling, and lineup completeness against the current Voyage docs (embeddings, pricing, contextualized-chunk, multimodal pages). Solid PR — ships correctly. Pricing / config — all correct
Context windows consistent with existing siblings (context-4 = 120000 matches context-3; multimodal-3.5 = 32000 matches multimodal-3). Both JSON files updated identically. Contextual input normalization — correctAPI accepts Lineup — complete for embeddingsAll current Voyage embedding models present: voyage-4 family, context-4, multimodal-3.5 added; code-3 / 3.5 / context-3 / multimodal-3 / finance-2 / law-2 already existed. No missing embedding models. (Rerank models out of scope.) Non-blocking notes
None block merge. |
|
Correct the followings:
|
|
Starting fresh to test the v2 flow end-to-end. |
Summary
Adds VoyageAI's latest models and fills in missing pricing/context data.
New models
voyage/voyage-context-4— contextualized chunk embeddings (latest), $0.12/M, 120K max total tokensvoyage/voyage-4— $0.06/M, 32K contextvoyage/voyage-4-large— $0.12/M, 32K contextvoyage/voyage-4-lite— $0.02/M, 32K contextvoyage/voyage-4-nano— open-weight, 32K contextAdded to both
model_prices_and_context_window.jsonandlitellm/model_prices_and_context_window_backup.json.Contextual embeddings input
The Voyage contextualized embeddings API expects
inputsasList[str]orList[List[str]].transform_embedding_requestnow normalizes a barestrinto aList[str]so the API is always called with the shape it accepts;List[str]/List[List[str]]pass through unchanged.Docs & tests
docs/my-website/docs/providers/voyage.mdwith the new models and input formats.tests/llm_translation/test_voyage_ai.pyfor context-4 detection and string normalization.To double-check
voyage-4-nanois open-weight with no listed per-token price; included in model map without a price override.