Skip to content

Commit 93afa91

Browse files
authored
fix(core): default Vertex location to global (#53872)
1 parent d869df3 commit 93afa91

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎packages/ai/src/providers/google-vertex.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const configuredRoute = (input: Config, modelID: string | ModelID) => {
9191
provider: id,
9292
message: "Google Vertex tuned models do not support Express Mode API keys",
9393
})
94-
const location = GoogleVertexShared.location(inputLocation, "us-central1")
94+
const location = GoogleVertexShared.location(inputLocation, "global")
9595
const project = GoogleVertexShared.project(inputProject)
9696
const endpoint =
9797
baseURL ??

‎packages/core/src/plugin/provider/google-vertex.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function resolveLocation(options: Record<string, any>) {
2020
process.env.GOOGLE_VERTEX_LOCATION ??
2121
process.env.GOOGLE_CLOUD_LOCATION ??
2222
process.env.VERTEX_LOCATION ??
23-
"us-central1"
23+
"global"
2424
)
2525
}
2626

‎packages/core/test/plugin/provider-google-vertex.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ describe("GoogleVertexPlugin", () => {
277277
}),
278278
)
279279

280-
it.effect("defaults location to us-central1 when only project is configured", () =>
280+
it.effect("defaults location to global when only project is configured", () =>
281281
withEnv(
282282
{
283283
GOOGLE_CLOUD_PROJECT: undefined,
@@ -299,7 +299,7 @@ describe("GoogleVertexPlugin", () => {
299299
yield* addPlugin()
300300
const provider = required(yield* catalog.get(Provider.ID.make("google-vertex")))
301301
expect(provider.settings?.project).toBe("config-project")
302-
expect(provider.settings?.location).toBe("us-central1")
302+
expect(provider.settings?.location).toBe("global")
303303
}),
304304
),
305305
)

0 commit comments

Comments
 (0)