Skip to content

feat(voyage): add voyage-context-4 and voyage-4 series models - #5

Closed
fzowl wants to merge 6 commits into
mainfrom
feat/voyage-context-4
Closed

feat(voyage): add voyage-context-4 and voyage-4 series models#5
fzowl wants to merge 6 commits into
mainfrom
feat/voyage-context-4

Conversation

@fzowl

@fzowl fzowl commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

Adds voyage-context-4 and the rest of the current Voyage AI lineup to the cost/context maps, and ensures the contextualized embeddings API is always called with list[str].

Models added (both model_prices_and_context_window.json and litellm/model_prices_and_context_window_backup.json)

Model input_cost/token ($/1M) ctx mode
voyage/voyage-context-4 1.2e-07 ($0.12) 120000 embedding
voyage/voyage-4 6e-08 ($0.06) 32000 embedding
voyage/voyage-4-large 1.2e-07 ($0.12) 32000 embedding
voyage/voyage-4-lite 2e-08 ($0.02) 32000 embedding
voyage/voyage-4-nano 0.0 32000 embedding
voyage/voyage-multimodal-3.5 1.2e-07 ($0.12) 32000 embedding

Prices verified against the Voyage AI pricing page; context lengths against the embeddings / contextualized-chunk docs. voyage-4-nano is an open-weight model (Hugging Face), no listed API price -> cost 0.0.

Contextual embedding input (list[str])

VoyageContextualEmbeddingConfig.transform_embedding_request normalizes a bare str to [str] and passes list[str] straight to the contextualized embeddings API; list[list[str]] is forwarded only when the caller already supplied that nested shape.

Tests

  • voyage-context-4 added to contextual model detection test
  • New test_contextual_embedding_request_input_normalization (str / list[str] / list[list[str]])
  • tests/llm_translation/test_voyage_ai.py: 16 passed, 1 skipped

Double-check

  • Whether voyage-multimodal-3.5 should carry a per-pixel cost (mirrors existing voyage-multimodal-3, token cost only).

fzowl and others added 6 commits July 26, 2026 23:34
- Add voyage-context-4 contextual embedding model (120k ctx)
- Add voyage-4, voyage-4-large, voyage-4-lite, voyage-4-nano
- Add voyage-multimodal-3.5
- Normalize contextual embedding input: pass list[str] to API,
  keep list[list[str]] only when caller provides it
- Add tests for context-4 detection and input normalization
…struct

Fill in remaining Voyage embedding models absent from the price map.
Synced across both root and backup model price maps.
- Feature voyage-context-4 as the recommended contextual model
- Add voyage-4 / voyage-4-large / voyage-4-lite to the supported models and
  model selection tables with pricing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants