mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-14 12:10:45 +03:00
fix(core): default Vertex location to global (#53872)
This commit is contained in:
committed by
GitHub
Unverified
parent
d869df3801
commit
93afa91904
@@ -91,7 +91,7 @@ const configuredRoute = (input: Config, modelID: string | ModelID) => {
|
||||
provider: id,
|
||||
message: "Google Vertex tuned models do not support Express Mode API keys",
|
||||
})
|
||||
const location = GoogleVertexShared.location(inputLocation, "us-central1")
|
||||
const location = GoogleVertexShared.location(inputLocation, "global")
|
||||
const project = GoogleVertexShared.project(inputProject)
|
||||
const endpoint =
|
||||
baseURL ??
|
||||
|
||||
@@ -20,7 +20,7 @@ function resolveLocation(options: Record<string, any>) {
|
||||
process.env.GOOGLE_VERTEX_LOCATION ??
|
||||
process.env.GOOGLE_CLOUD_LOCATION ??
|
||||
process.env.VERTEX_LOCATION ??
|
||||
"us-central1"
|
||||
"global"
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -277,7 +277,7 @@ describe("GoogleVertexPlugin", () => {
|
||||
}),
|
||||
)
|
||||
|
||||
it.effect("defaults location to us-central1 when only project is configured", () =>
|
||||
it.effect("defaults location to global when only project is configured", () =>
|
||||
withEnv(
|
||||
{
|
||||
GOOGLE_CLOUD_PROJECT: undefined,
|
||||
@@ -299,7 +299,7 @@ describe("GoogleVertexPlugin", () => {
|
||||
yield* addPlugin()
|
||||
const provider = required(yield* catalog.get(Provider.ID.make("google-vertex")))
|
||||
expect(provider.settings?.project).toBe("config-project")
|
||||
expect(provider.settings?.location).toBe("us-central1")
|
||||
expect(provider.settings?.location).toBe("global")
|
||||
}),
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user