@openclaw/anthropic-vertex-provider 2026.6.2-beta.1 → 2026.6.5-beta.1

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.
package/dist/api.js CHANGED
@@ -6,6 +6,7 @@ const loadStreamRuntimeModule = async () => {
6
6
  streamRuntimeModulePromise ??= import("./stream-runtime.js");
7
7
  return await streamRuntimeModulePromise;
8
8
  };
9
+ /** Merge an implicit Anthropic Vertex provider with explicit user config. */
9
10
  function mergeImplicitAnthropicVertexProvider(params) {
10
11
  const { existing, implicit } = params;
11
12
  if (!existing) return implicit;
@@ -15,17 +16,20 @@ function mergeImplicitAnthropicVertexProvider(params) {
15
16
  models: Array.isArray(existing.models) && existing.models.length > 0 ? existing.models : implicit.models
16
17
  };
17
18
  }
19
+ /** Resolve an implicit Anthropic Vertex provider when ADC credentials are available. */
18
20
  function resolveImplicitAnthropicVertexProvider(params) {
19
21
  const env = params?.env ?? process.env;
20
22
  if (!hasAnthropicVertexAvailableAuth(env)) return null;
21
23
  return buildAnthropicVertexProvider({ env });
22
24
  }
25
+ /** Create a lazy Anthropic Vertex stream function for a known project/region/base URL. */
23
26
  function createAnthropicVertexStreamFn(projectId, region, baseURL, deps) {
24
27
  const streamFnPromise = loadStreamRuntimeModule().then((runtime) => runtime.createAnthropicVertexStreamFn(projectId, region, baseURL, deps));
25
28
  return async (model, context, options) => {
26
29
  return (await streamFnPromise)(model, context, options);
27
30
  };
28
31
  }
32
+ /** Create a lazy Anthropic Vertex stream function using model base URL and env hints. */
29
33
  function createAnthropicVertexStreamFnForModel(model, env = process.env, deps) {
30
34
  const streamFnPromise = loadStreamRuntimeModule().then((runtime) => runtime.createAnthropicVertexStreamFnForModel(model, env, deps));
31
35
  return async (...args) => {
package/dist/index.js CHANGED
@@ -4,8 +4,13 @@ import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
4
4
  import { readConfiguredProviderCatalogEntries } from "openclaw/plugin-sdk/provider-catalog-shared";
5
5
  import { NATIVE_ANTHROPIC_REPLAY_HOOKS, resolveClaudeThinkingProfile } from "openclaw/plugin-sdk/provider-model-shared";
6
6
  //#region extensions/anthropic-vertex/index.ts
7
+ /**
8
+ * Anthropic Vertex provider plugin entry. It registers implicit ADC-backed
9
+ * catalog discovery, Anthropic replay policy, thinking profiles, and auth markers.
10
+ */
7
11
  const PROVIDER_ID = "anthropic-vertex";
8
12
  const GCP_VERTEX_CREDENTIALS_MARKER = "gcp-vertex-credentials";
13
+ /** Provider entry for Anthropic Claude models served through Google Vertex AI. */
9
14
  var anthropic_vertex_default = definePluginEntry({
10
15
  id: PROVIDER_ID,
11
16
  name: "Anthropic Vertex Provider",
@@ -1,6 +1,7 @@
1
1
  import { resolveAnthropicVertexRegion } from "./region.js";
2
2
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
3
3
  //#region extensions/anthropic-vertex/provider-catalog.ts
4
+ /** Default Anthropic Vertex model used for implicit provider catalogs. */
4
5
  const ANTHROPIC_VERTEX_DEFAULT_MODEL_ID = "claude-sonnet-4-6";
5
6
  const ANTHROPIC_VERTEX_DEFAULT_CONTEXT_WINDOW = 1e6;
6
7
  const GCP_VERTEX_CREDENTIALS_MARKER = "gcp-vertex-credentials";
@@ -63,6 +64,7 @@ function buildAnthropicVertexCatalog() {
63
64
  })
64
65
  ];
65
66
  }
67
+ /** Build the implicit Anthropic Vertex provider config for the current env. */
66
68
  function buildAnthropicVertexProvider(params) {
67
69
  const region = resolveAnthropicVertexRegion(params?.env);
68
70
  return {
@@ -25,6 +25,7 @@ async function runAnthropicVertexCatalog(ctx) {
25
25
  implicit
26
26
  }) };
27
27
  }
28
+ /** Anthropic Vertex provider discovery descriptor. */
28
29
  const anthropicVertexProviderDiscovery = {
29
30
  id: PROVIDER_ID,
30
31
  label: "Anthropic Vertex",
@@ -1,5 +1,10 @@
1
1
  import { resolveClaudeThinkingProfile } from "openclaw/plugin-sdk/provider-model-shared";
2
2
  //#region extensions/anthropic-vertex/provider-policy-api.ts
3
+ /**
4
+ * Provider-policy API for Anthropic Vertex. Core asks for thinking profiles
5
+ * without importing the provider entry or stream runtime.
6
+ */
7
+ /** Resolve Anthropic Vertex thinking profile for a provider/model pair. */
3
8
  function resolveThinkingProfile(params) {
4
9
  if (params.provider.trim().toLowerCase() !== "anthropic-vertex") return null;
5
10
  return resolveClaudeThinkingProfile(params.modelId);
package/dist/region.js CHANGED
@@ -4,6 +4,10 @@ import { homedir, platform } from "node:os";
4
4
  import { join } from "node:path";
5
5
  import { resolveProviderEndpoint } from "openclaw/plugin-sdk/provider-http";
6
6
  //#region extensions/anthropic-vertex/region.ts
7
+ /**
8
+ * Anthropic Vertex region, project, and ADC auth detection helpers. They keep
9
+ * credential probing local to the provider plugin.
10
+ */
7
11
  const ANTHROPIC_VERTEX_DEFAULT_REGION = "global";
8
12
  const ANTHROPIC_VERTEX_REGION_RE = /^[a-z0-9-]+$/;
9
13
  const GCP_VERTEX_CREDENTIALS_MARKER = "gcp-vertex-credentials";
@@ -11,17 +15,21 @@ function normalizeOptionalSecretInput(value) {
11
15
  if (typeof value !== "string") return;
12
16
  return value.trim() || void 0;
13
17
  }
18
+ /** Resolve the configured Vertex region, defaulting to global. */
14
19
  function resolveAnthropicVertexRegion(env = process.env) {
15
20
  const region = normalizeOptionalSecretInput(env.GOOGLE_CLOUD_LOCATION) || normalizeOptionalSecretInput(env.CLOUD_ML_REGION);
16
21
  return region && ANTHROPIC_VERTEX_REGION_RE.test(region) ? region : ANTHROPIC_VERTEX_DEFAULT_REGION;
17
22
  }
23
+ /** Resolve the Vertex project id from explicit env or ADC files. */
18
24
  function resolveAnthropicVertexProjectId(env = process.env) {
19
25
  return normalizeOptionalSecretInput(env.ANTHROPIC_VERTEX_PROJECT_ID) || normalizeOptionalSecretInput(env.GOOGLE_CLOUD_PROJECT) || normalizeOptionalSecretInput(env.GOOGLE_CLOUD_PROJECT_ID) || resolveAnthropicVertexProjectIdFromAdc(env);
20
26
  }
27
+ /** Extract a Vertex region from a provider base URL when possible. */
21
28
  function resolveAnthropicVertexRegionFromBaseUrl(baseUrl) {
22
29
  const endpoint = resolveProviderEndpoint(baseUrl);
23
30
  return endpoint.endpointClass === "google-vertex" ? endpoint.googleVertexRegion : void 0;
24
31
  }
32
+ /** Resolve the client region from model base URL first, then env fallback. */
25
33
  function resolveAnthropicVertexClientRegion(params) {
26
34
  return resolveAnthropicVertexRegionFromBaseUrl(params?.baseUrl) || resolveAnthropicVertexRegion(params?.env);
27
35
  }
@@ -60,12 +68,15 @@ function resolveAnthropicVertexProjectIdFromAdc(env = process.env) {
60
68
  return;
61
69
  }
62
70
  }
71
+ /** Return whether ADC credentials or metadata-server auth are available. */
63
72
  function hasAnthropicVertexCredentials(env = process.env) {
64
73
  return hasAnthropicVertexMetadataServerAdc(env) || canReadAnthropicVertexAdc(env);
65
74
  }
75
+ /** Return whether Anthropic Vertex has usable auth for implicit registration. */
66
76
  function hasAnthropicVertexAvailableAuth(env = process.env) {
67
77
  return hasAnthropicVertexCredentials(env);
68
78
  }
79
+ /** Resolve the synthetic config API key marker for Anthropic Vertex auth. */
69
80
  function resolveAnthropicVertexConfigApiKey(env = process.env) {
70
81
  return hasAnthropicVertexAvailableAuth(env) ? GCP_VERTEX_CREDENTIALS_MARKER : void 0;
71
82
  }
package/dist/setup-api.js CHANGED
@@ -1,6 +1,11 @@
1
1
  import { resolveAnthropicVertexConfigApiKey } from "./region.js";
2
2
  import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
3
3
  //#region extensions/anthropic-vertex/setup-api.ts
4
+ /**
5
+ * Lightweight Anthropic Vertex setup entry. It exposes provider auth detection
6
+ * without importing the stream runtime or Vertex SDK.
7
+ */
8
+ /** Setup entry for Anthropic Vertex provider auth probing. */
4
9
  var setup_api_default = definePluginEntry({
5
10
  id: "anthropic-vertex",
6
11
  name: "Anthropic Vertex Setup",
@@ -3,6 +3,10 @@ import { AnthropicVertex } from "@anthropic-ai/vertex-sdk";
3
3
  import { stream } from "openclaw/plugin-sdk/llm";
4
4
  import { applyAnthropicPayloadPolicyToParams, resolveAnthropicPayloadPolicy } from "openclaw/plugin-sdk/provider-stream-shared";
5
5
  //#region extensions/anthropic-vertex/stream-runtime.ts
6
+ /**
7
+ * Anthropic Vertex stream runtime. It constructs Vertex SDK clients and adapts
8
+ * OpenClaw stream options into Anthropic Messages payload policy.
9
+ */
6
10
  const defaultAnthropicVertexStreamDeps = {
7
11
  AnthropicVertex,
8
12
  streamAnthropic: stream
@@ -117,6 +121,7 @@ function resolveAnthropicVertexSdkBaseUrl(baseUrl) {
117
121
  return trimmed;
118
122
  }
119
123
  }
124
+ /** Create an Anthropic Vertex stream function from model metadata and env. */
120
125
  function createAnthropicVertexStreamFnForModel(model, env = process.env, deps) {
121
126
  return createAnthropicVertexStreamFn(resolveAnthropicVertexProjectId(env), resolveAnthropicVertexClientRegion({
122
127
  baseUrl: model.baseUrl,
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/anthropic-vertex-provider",
3
- "version": "2026.6.2-beta.1",
3
+ "version": "2026.6.5-beta.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/anthropic-vertex-provider",
9
- "version": "2026.6.2-beta.1",
9
+ "version": "2026.6.5-beta.1",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/vertex-sdk": "0.16.1"
12
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/anthropic-vertex-provider",
3
- "version": "2026.6.2-beta.1",
3
+ "version": "2026.6.5-beta.1",
4
4
  "description": "OpenClaw Anthropic Vertex provider plugin for Claude models on Google Vertex AI.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,10 +20,10 @@
20
20
  "minHostVersion": ">=2026.5.12-beta.1"
21
21
  },
22
22
  "compat": {
23
- "pluginApi": ">=2026.6.2-beta.1"
23
+ "pluginApi": ">=2026.6.5-beta.1"
24
24
  },
25
25
  "build": {
26
- "openclawVersion": "2026.6.2-beta.1",
26
+ "openclawVersion": "2026.6.5-beta.1",
27
27
  "bundledDist": false
28
28
  },
29
29
  "release": {
@@ -41,7 +41,7 @@
41
41
  "README.md"
42
42
  ],
43
43
  "peerDependencies": {
44
- "openclaw": ">=2026.6.2-beta.1"
44
+ "openclaw": ">=2026.6.5-beta.1"
45
45
  },
46
46
  "peerDependenciesMeta": {
47
47
  "openclaw": {