Skip to content

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

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

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

Conversation

@fzowl

@fzowl fzowl commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

Adds voyage-context-4 and the rest of the current Voyage AI model lineup to the cost/context maps, and fixes contextual embedding input handling.

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

voyage-4-nano is an open-source model that runs locally (loaded by the voyageai Python package). Cost 0.0, consistent with other locally-run models in the map (e.g. ollama/*). Metadata (context length, dimensions) still useful.

Contextual embedding input

VoyageContextualEmbeddingConfig.transform_embedding_request now passes list[str] straight to the contextualized embeddings API, and only forwards list[list[str]] when the caller actually provides that nested shape (bare str normalized to [str]).

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 multimodal-3, token cost only)

fzowl added 4 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
@fzowl fzowl closed this Jul 27, 2026
@fzowl
fzowl deleted the feat/voyage-context-4 branch July 27, 2026 10:21
@fzowl
fzowl restored the feat/voyage-context-4 branch July 27, 2026 11:27
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.

1 participant