🌐 fix: Support global location for Google VertexAI (#7768)

* fix: Check if loc is 'global' and set the endpoint prefix accordingly

* fix: ESLint error

---------

Co-authored-by: Danny Avila <danny@librechat.ai>
This commit is contained in:
richzw 2025-06-14 05:51:02 +08:00 committed by GitHub
parent 4419e2c294
commit 5eb0703f78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)/;