Skip to content

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

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

feat(voyage): add voyage-context-4 + voyage-4 series models#3
fzowl wants to merge 1 commit into
mainfrom
feat/voyage-context-4

Conversation

@fzowl

@fzowl fzowl commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

Adds VoyageAI's latest models to the cost map and hardens contextual embedding input handling.

Models added (model_prices_and_context_window_backup.json)

  • voyage/voyage-context-4 — contextual, 120K ctx, $0.12/M
  • voyage/voyage-4, voyage/voyage-4-large, voyage/voyage-4-lite — 32K ctx, $0.06 / $0.12 / $0.02 /M
  • voyage/voyage-multimodal-3.5 — 32K ctx, $0.12/M

Contextual embeddings input fix

VoyageContextualEmbeddingConfig now normalizes input to list[list[str]] before calling the contextualized embeddings API. A plain str becomes [[str]] and a flat list[str] becomes a single document [list[str]]; already-nested input is passed through unchanged. Ensures the API is always called with list[str] chunk groups.

Docs

Updated docs/providers/voyage.md — supported models table, contextual section (now voyage-context-4), and model selection guide.

Tests

tests/llm_translation/test_voyage_ai.py — context-4 detection + flat/str input normalization. All 16 pass locally.

Reviewer double-checks

  • Prices/context lengths sourced from VoyageAI pricing + embeddings docs (context-4 total 120K, per-chunk 32K).
  • Flat list[str] normalized as a single document; confirm that matches intended semantics.

- Add voyage-context-4, voyage-4, voyage-4-large, voyage-4-lite, and
  voyage-multimodal-3.5 to the model cost map
- Normalize contextual embedding input to list[list[str]] so the
  contextualized embeddings API is always called with list[str] groups
  (accepts str and flat list[str] inputs)
- Update Voyage provider docs and add tests
@fzowl fzowl closed this Jul 26, 2026
@fzowl
fzowl deleted the feat/voyage-context-4 branch July 26, 2026 21:15
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