From 5eb0703f78cbd35aa972c33c5fa4d615b190e36b Mon Sep 17 00:00:00 2001 From: richzw <1590890+richzw@users.noreply.github.com> Date: Sat, 14 Jun 2025 05:51:02 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=90=20fix:=20Support=20`global`=20loca?= =?UTF-8?q?tion=20for=20Google=20VertexAI=20(#7768)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: Check if loc is 'global' and set the endpoint prefix accordingly * fix: ESLint error --------- Co-authored-by: Danny Avila --- api/app/clients/GoogleClient.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/app/clients/GoogleClient.js b/api/app/clients/GoogleClient.js index 2ded0657c..817239d14 100644 --- a/api/app/clients/GoogleClient.js +++ b/api/app/clients/GoogleClient.js @@ -34,7 +34,8 @@ const BaseClient = require('./BaseClient'); const loc = process.env.GOOGLE_LOC || 'us-central1'; const publisher = 'google'; -const endpointPrefix = `${loc}-aiplatform.googleapis.com`; +const endpointPrefix = + loc === 'global' ? 'aiplatform.googleapis.com' : `${loc}-aiplatform.googleapis.com`; const settings = endpointSettings[EModelEndpoint.google]; const EXCLUDED_GENAI_MODELS = /gemini-(?:1\.0|1-0|pro)/;