Skip to content

Commit c7d8e59

Browse files
committed
chore: add voyage provider to the package.json
1 parent 9b86221 commit c7d8e59

File tree

3 files changed

+25
-130
lines changed

3 files changed

+25
-130
lines changed

package-lock.json

Lines changed: 21 additions & 130 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
"oauth4webapi": "^3.8.0",
116116
"openapi-fetch": "^0.14.0",
117117
"ts-levenshtein": "^1.0.7",
118+
"voyage-ai-provider": "^2.0.0",
118119
"yargs-parser": "21.1.1",
119120
"zod": "^3.25.76"
120121
},

src/common/search/embeddingsProvider.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ class VoyageEmbeddingsProvider implements EmbeddingsProvider<VoyageModels> {
5252
constructor({ voyageApiKey }: UserConfig, providedFetch?: typeof fetch) {
5353
assert(voyageApiKey, "voyageApiKey does not exist. This is likely a bug.");
5454

55+
// We should always use, by default, any enterprise proxy that the user has configured.
56+
// Direct requests to VoyageAI might get blocked by the network if they don't go through
57+
// the provided proxy.
5558
const customFetch: typeof fetch = (providedFetch ??
5659
createFetch({ useEnvironmentVariableProxies: true })) as unknown as typeof fetch;
5760

0 commit comments

Comments
 (0)