Skip to content

Commit 5eb0703

Browse files
richzwdanny-avila
andauthored
🌐 fix: Support global location for Google VertexAI (danny-avila#7768)
* fix: Check if loc is 'global' and set the endpoint prefix accordingly * fix: ESLint error --------- Co-authored-by: Danny Avila <[email protected]>
1 parent 4419e2c commit 5eb0703

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api/app/clients/GoogleClient.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ const BaseClient = require('./BaseClient');
3434

3535
const loc = process.env.GOOGLE_LOC || 'us-central1';
3636
const publisher = 'google';
37-
const endpointPrefix = `${loc}-aiplatform.googleapis.com`;
37+
const endpointPrefix =
38+
loc === 'global' ? 'aiplatform.googleapis.com' : `${loc}-aiplatform.googleapis.com`;
3839

3940
const settings = endpointSettings[EModelEndpoint.google];
4041
const EXCLUDED_GENAI_MODELS = /gemini-(?:1\.0|1-0|pro)/;

0 commit comments

Comments
 (0)