Skip to content

feat(embeddings): add Voyage AI embeddings, contextualized embeddings and rerank - #9942

Open
fzowl wants to merge 1 commit into
simstudioai:stagingfrom
fzowl:feat/voyageai-embeddings
Open

fzowl wants to merge 1 commit into
simstudioai:stagingfrom
fzowl:feat/voyageai-embeddings

Conversation

@fzowl

@fzowl fzowl commented Nov 12, 2026 •

Copy link
Copy Markdown

Summary

The Embeddings block offers OpenAI, OpenRouter, Gemini, Cohere, Mistral and Ollama, but not Voyage AI, and Sim has no way to use Voyage's contextualized embeddings or rerankers.

  • Embeddings block: adds Voyage as a catalog provider (voyage-4-large, voyage-4, voyage-4-lite, voyage-code-4, voyage-finance-2, voyage-law-2, plus voyage-3-large, voyage-3.5, voyage-3.5-lite, voyage-code-3). It follows the Cohere/Mistral shape: an adapter for POST /v1/embeddings (input_type from the task type, output_dimension for Matryoshka sizes), an embeddings_voyage tool, a BYOK voyage key, VOYAGE_API_KEY for hosted use, and per-model pricing. These models are not selectable for knowledge bases yet, as with Cohere and Mistral.
  • New Voyage AI block: two tools. Contextualized embeddings take documents as a list of lists of chunks (voyage-context-4, voyage-context-3), so each chunk vector reflects its document. Rerank orders texts against a query (rerank-2.5, rerank-2.5-lite). Both use the same hosted key and BYOK key, with usage-based pricing. A voyage-errors extractor surfaces Voyage's {"detail": "..."} messages.

Knowledge-base search reranking stays on Cohere.

Product update (if relevant)

Anyone building agents can embed with Voyage models, index chunked documents with contextualized embeddings, and rerank retrieved results, using their own key (Settings > BYOK) or a deployment-wide VOYAGE_API_KEY.

Type of Change

  • New feature

Testing

Called the real Voyage API with the adapter's and the tools' own requests and compared the embeddings with the official voyageai npm SDK (0.6.0): vectors and token counts are identical. The new tools were run end to end for contextualized embeddings (both models, 256 and 1024 dimensions, document and query) and rerank, including a rejected dimension. Lint, type-check, check:audits, the block registry check and the embedding, tool and block tests pass. Reviewers: the model limits and prices in lib/embeddings/catalog.ts, providers/models.ts and tools/voyageai/ are taken from Voyage's docs and pricing page.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 12, 2026

Copy link
Copy Markdown

@fzowl is attempting to deploy a commit to the Sim Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Adds ten Voyage AI models to the Embeddings block.

  • The Embeddings block offers Voyage models and their supported options.
  • Voyage embedding calls return vectors in the same order as their inputs.
  • Voyage runs with a workspace key or a hosted deployment key.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Embeddings block] --> B[embeddings_voyage]
  B --> C[Shared key lookup]
  C --> D[Embedding operation]
  D --> E[Catalog checks and batching]
  E --> F[Voyage adapter]
  F --> G[Voyage API]
  G --> H[Ordered vectors and token usage]
  H --> I[Hosted-key billing when applicable]
Loading

Reviews (1) · Last reviewed commit: "feat(embeddings): add Voyage AI embeddin..." · Reviewed by Greptile

@fzowl
fzowl force-pushed the feat/voyageai-embeddings branch 3 times, most recently from c0de2d2 to 919f204 Compare November 13, 2026 08:17
@fzowl fzowl changed the title feat(embeddings): add Voyage AI embedding models to the Embeddings block feat(embeddings): add Voyage AI embeddings, contextualized embeddings and rerank Nov 13, 2026
@fzowl
fzowl force-pushed the feat/voyageai-embeddings branch 3 times, most recently from 596e426 to 8531f1a Compare November 13, 2026 09:11
…ddings and rerank

Adds a voyage provider to the embedding catalog (voyage-4-large, voyage-4,
voyage-4-lite, voyage-code-4, voyage-finance-2, voyage-law-2 and the
voyage-3.x generation) with an adapter for /v1/embeddings, the
embeddings_voyage tool, BYOK key support, VOYAGE_API_KEY for hosted use and
per-model pricing.

Adds a Voyage AI block with contextualized embeddings (list of chunk lists
per document) and rerank tools, with hosted-key billing and a string
detail error extractor.
@fzowl
fzowl force-pushed the feat/voyageai-embeddings branch from 8531f1a to 022f601 Compare November 13, 2026 09:41

This branch has not been deployed

No deployments
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