feat(embeddings): add Voyage AI embeddings, contextualized embeddings and rerank
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_typefrom the task type,output_dimensionfor Matryoshka sizes), anembeddings_voyagetool, a BYOKvoyagekey,VOYAGE_API_KEYfor 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. Avoyage-errorsextractor 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)