From be886f7d61296a30d5b8a095ca8329f58a0c5a0a Mon Sep 17 00:00:00 2001
From: ReindeerFlotilla
 <9247179+root-reindeer-flotilla@users.noreply.github.com>
Date: Wed, 8 Jan 2025 20:21:30 -0500
Subject: [PATCH] feat: add support for voyage-3-large and voyage-code-3
 embedding models (#2955)

* feat: add support for voyage-3-large and voyage-code-3 embedding models

- Add voyage-3-large and voyage-code-3 to VoyageAiOptions dropdown
- Update getMaxEmbeddingLength to support 32k context for new models
- Update .env.example with new model options

* unset env example

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
---
 .../src/components/EmbeddingSelection/VoyageAiOptions/index.jsx | 2 ++
 server/utils/EmbeddingEngines/voyageAi/index.js                 | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/frontend/src/components/EmbeddingSelection/VoyageAiOptions/index.jsx b/frontend/src/components/EmbeddingSelection/VoyageAiOptions/index.jsx
index f65fccf72..a2ae1c4e3 100644
--- a/frontend/src/components/EmbeddingSelection/VoyageAiOptions/index.jsx
+++ b/frontend/src/components/EmbeddingSelection/VoyageAiOptions/index.jsx
@@ -38,6 +38,8 @@ export default function VoyageAiOptions({ settings }) {
                 "voyage-2",
                 "voyage-3",
                 "voyage-3-lite",
+                "voyage-3-large",
+                "voyage-code-3",
               ].map((model) => {
                 return (
                   <option key={model} value={model}>
diff --git a/server/utils/EmbeddingEngines/voyageAi/index.js b/server/utils/EmbeddingEngines/voyageAi/index.js
index 6c420815a..9fda4f87c 100644
--- a/server/utils/EmbeddingEngines/voyageAi/index.js
+++ b/server/utils/EmbeddingEngines/voyageAi/index.js
@@ -24,6 +24,8 @@ class VoyageAiEmbedder {
       case "voyage-multilingual-2":
       case "voyage-3":
       case "voyage-3-lite":
+      case "voyage-3-large":
+      case "voyage-code-3":
         return 32_000;
       case "voyage-large-2-instruct":
       case "voyage-law-2":
-- 
GitLab