@openclaw/anthropic-vertex-provider 2026.7.2-beta.7 → 2026.8.1-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -253,7 +253,7 @@ function normalizeAnthropicVertexResolvedModel(modelId, model) {
253
253
  function buildAnthropicVertexProvider(params) {
254
254
  const region = resolveAnthropicVertexRegion(params?.env);
255
255
  return {
256
- baseUrl: normalizeLowercaseStringOrEmpty(region) === "global" ? "https://aiplatform.googleapis.com" : `https://${region}-aiplatform.googleapis.com`,
256
+ baseUrl: normalizeLowercaseStringOrEmpty(region) === "global" ? "https://aiplatform.googleapis.com" : region === "us" || region === "eu" ? `https://aiplatform.${region}.rep.googleapis.com` : `https://${region}-aiplatform.googleapis.com`,
257
257
  api: "anthropic-messages",
258
258
  apiKey: GCP_VERTEX_CREDENTIALS_MARKER,
259
259
  models: buildAnthropicVertexCatalog(region, params?.nowMs ?? Date.now())
package/dist/region.js CHANGED
@@ -1,4 +1,4 @@
1
- import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
1
+ import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
2
2
  import { homedir, platform } from "node:os";
3
3
  import { join } from "node:path";
4
4
  import { resolveProviderEndpoint } from "openclaw/plugin-sdk/provider-http";
@@ -12,18 +12,14 @@ const ANTHROPIC_VERTEX_DEFAULT_REGION = "global";
12
12
  const ANTHROPIC_VERTEX_REGION_RE = /^[a-z0-9-]+$/;
13
13
  const GCP_VERTEX_CREDENTIALS_MARKER = "gcp-vertex-credentials";
14
14
  const ANTHROPIC_VERTEX_ADC_FILE_MAX_BYTES = 1024 * 1024;
15
- function normalizeOptionalSecretInput(value) {
16
- if (typeof value !== "string") return;
17
- return value.trim() || void 0;
18
- }
19
15
  /** Resolve the configured Vertex region, defaulting to global. */
20
16
  function resolveAnthropicVertexRegion(env = process.env) {
21
- const region = normalizeOptionalSecretInput(env.GOOGLE_CLOUD_LOCATION) || normalizeOptionalSecretInput(env.CLOUD_ML_REGION);
17
+ const region = normalizeOptionalString(env.GOOGLE_CLOUD_LOCATION) || normalizeOptionalString(env.CLOUD_ML_REGION);
22
18
  return region && ANTHROPIC_VERTEX_REGION_RE.test(region) ? region : ANTHROPIC_VERTEX_DEFAULT_REGION;
23
19
  }
24
20
  /** Resolve the Vertex project id from explicit env or ADC files. */
25
21
  function resolveAnthropicVertexProjectId(env = process.env) {
26
- return normalizeOptionalSecretInput(env.ANTHROPIC_VERTEX_PROJECT_ID) || normalizeOptionalSecretInput(env.GOOGLE_CLOUD_PROJECT) || normalizeOptionalSecretInput(env.GOOGLE_CLOUD_PROJECT_ID) || resolveAnthropicVertexProjectIdFromAdc(env);
22
+ return normalizeOptionalString(env.ANTHROPIC_VERTEX_PROJECT_ID) || normalizeOptionalString(env.GOOGLE_CLOUD_PROJECT) || normalizeOptionalString(env.GOOGLE_CLOUD_PROJECT_ID) || resolveAnthropicVertexProjectIdFromAdc(env);
27
23
  }
28
24
  /** Extract a Vertex region from a provider base URL when possible. */
29
25
  function resolveAnthropicVertexRegionFromBaseUrl(baseUrl) {
@@ -35,17 +31,17 @@ function resolveAnthropicVertexClientRegion(params) {
35
31
  return resolveAnthropicVertexRegionFromBaseUrl(params?.baseUrl) || resolveAnthropicVertexRegion(params?.env);
36
32
  }
37
33
  function hasAnthropicVertexMetadataServerAdc(env = process.env) {
38
- const explicitMetadataOptIn = normalizeOptionalSecretInput(env.ANTHROPIC_VERTEX_USE_GCP_METADATA);
34
+ const explicitMetadataOptIn = normalizeOptionalString(env.ANTHROPIC_VERTEX_USE_GCP_METADATA);
39
35
  return explicitMetadataOptIn === "1" || normalizeLowercaseStringOrEmpty(explicitMetadataOptIn) === "true";
40
36
  }
41
37
  function resolveAnthropicVertexHomeDir(env = process.env) {
42
- return normalizeOptionalSecretInput(env.HOME) || normalizeOptionalSecretInput(env.USERPROFILE) || homedir();
38
+ return normalizeOptionalString(env.HOME) || normalizeOptionalString(env.USERPROFILE) || homedir();
43
39
  }
44
40
  function resolveAnthropicVertexDefaultAdcPath(env = process.env) {
45
- return platform() === "win32" ? join(normalizeOptionalSecretInput(env.APPDATA) ?? join(resolveAnthropicVertexHomeDir(env), "AppData", "Roaming"), "gcloud", "application_default_credentials.json") : join(resolveAnthropicVertexHomeDir(env), ".config", "gcloud", "application_default_credentials.json");
41
+ return platform() === "win32" ? join(normalizeOptionalString(env.APPDATA) ?? join(resolveAnthropicVertexHomeDir(env), "AppData", "Roaming"), "gcloud", "application_default_credentials.json") : join(resolveAnthropicVertexHomeDir(env), ".config", "gcloud", "application_default_credentials.json");
46
42
  }
47
43
  function resolveAnthropicVertexAdcCredentialsPathCandidate(env = process.env) {
48
- const explicit = normalizeOptionalSecretInput(env.GOOGLE_APPLICATION_CREDENTIALS);
44
+ const explicit = normalizeOptionalString(env.GOOGLE_APPLICATION_CREDENTIALS);
49
45
  if (explicit) return explicit;
50
46
  return resolveAnthropicVertexDefaultAdcPath(env);
51
47
  }
@@ -71,7 +67,7 @@ function resolveAnthropicVertexProjectIdFromAdc(env = process.env) {
71
67
  try {
72
68
  const parsed = resolveAnthropicVertexAdcCredentials(env);
73
69
  if (!parsed) return;
74
- return normalizeOptionalSecretInput(parsed.project_id) || normalizeOptionalSecretInput(parsed.quota_project_id);
70
+ return normalizeOptionalString(parsed.project_id) || normalizeOptionalString(parsed.quota_project_id);
75
71
  } catch {
76
72
  return;
77
73
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/anthropic-vertex-provider",
3
- "version": "2026.7.2-beta.7",
3
+ "version": "2026.8.1-beta.2",
4
4
  "description": "OpenClaw Anthropic Vertex provider plugin for Claude models on Google Vertex AI.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,10 +22,10 @@
22
22
  "minHostVersion": ">=2026.5.12-beta.1"
23
23
  },
24
24
  "compat": {
25
- "pluginApi": ">=2026.7.2-beta.7"
25
+ "pluginApi": ">=2026.8.1-beta.2"
26
26
  },
27
27
  "build": {
28
- "openclawVersion": "2026.7.2-beta.7",
28
+ "openclawVersion": "2026.8.1-beta.2",
29
29
  "bundledDist": false
30
30
  },
31
31
  "release": {
@@ -42,7 +42,7 @@
42
42
  "README.md"
43
43
  ],
44
44
  "peerDependencies": {
45
- "openclaw": ">=2026.7.2-beta.7"
45
+ "openclaw": ">=2026.8.1-beta.2"
46
46
  },
47
47
  "peerDependenciesMeta": {
48
48
  "openclaw": {