@openclaw/anthropic-vertex-provider 2026.9.3 → 2026.9.4
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 +2 -1
- package/dist/provider-catalog.js +2 -1
- package/dist/provider-discovery.js +4 -2
- package/dist/region-endpoint.js +14 -0
- package/dist/region.js +1 -11
- package/dist/stream-runtime.js +2 -1
- package/openclaw.plugin.json +3 -0
- package/package.json +4 -4
package/dist/api.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { hasAnthropicVertexAvailableAuth, hasAnthropicVertexCredentials,
|
|
1
|
+
import { hasAnthropicVertexAvailableAuth, hasAnthropicVertexCredentials, resolveAnthropicVertexConfigApiKey, resolveAnthropicVertexProjectId, resolveAnthropicVertexRegion } from "./region.js";
|
|
2
|
+
import { resolveAnthropicVertexClientRegion, resolveAnthropicVertexRegionFromBaseUrl } from "./region-endpoint.js";
|
|
2
3
|
import { ANTHROPIC_VERTEX_DEFAULT_MODEL_ID, buildAnthropicVertexProvider } from "./provider-catalog.js";
|
|
3
4
|
import { mergeImplicitAnthropicVertexProvider, resolveImplicitAnthropicVertexProvider } from "./provider-catalog-runtime.js";
|
|
4
5
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
package/dist/provider-catalog.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolveAnthropicVertexRegion } from "./region.js";
|
|
2
|
+
import { resolveAnthropicVertexClientRegion } from "./region-endpoint.js";
|
|
2
3
|
import { modelCostsEqual, resolveClaudeFable5ModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet5ModelIdentity } from "openclaw/plugin-sdk/provider-model-shared";
|
|
3
4
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
5
|
//#region extensions/anthropic-vertex/provider-catalog.ts
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { hasAnthropicVertexAvailableAuth, resolveAnthropicVertexConfigApiKey } from "./region.js";
|
|
2
|
-
import { runAnthropicVertexCatalog } from "./provider-catalog-runtime.js";
|
|
3
2
|
//#region extensions/anthropic-vertex/provider-discovery.ts
|
|
4
3
|
const PROVIDER_ID = "anthropic-vertex";
|
|
5
4
|
const GCP_VERTEX_CREDENTIALS_MARKER = "gcp-vertex-credentials";
|
|
@@ -11,7 +10,10 @@ const anthropicVertexProviderDiscovery = {
|
|
|
11
10
|
auth: [],
|
|
12
11
|
catalog: {
|
|
13
12
|
order: "simple",
|
|
14
|
-
run:
|
|
13
|
+
run: async (ctx) => {
|
|
14
|
+
const { runAnthropicVertexCatalog } = await import("./provider-catalog-runtime.js");
|
|
15
|
+
return await runAnthropicVertexCatalog(ctx);
|
|
16
|
+
}
|
|
15
17
|
},
|
|
16
18
|
resolveConfigApiKey: ({ env }) => resolveAnthropicVertexConfigApiKey(env),
|
|
17
19
|
resolveSyntheticAuth: () => {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { resolveAnthropicVertexRegion } from "./region.js";
|
|
2
|
+
import { resolveProviderEndpoint } from "openclaw/plugin-sdk/provider-http";
|
|
3
|
+
//#region extensions/anthropic-vertex/region-endpoint.ts
|
|
4
|
+
/** Extract a Vertex region from a provider base URL when possible. */
|
|
5
|
+
function resolveAnthropicVertexRegionFromBaseUrl(baseUrl) {
|
|
6
|
+
const endpoint = resolveProviderEndpoint(baseUrl);
|
|
7
|
+
return endpoint.endpointClass === "google-vertex" ? endpoint.googleVertexRegion : void 0;
|
|
8
|
+
}
|
|
9
|
+
/** Resolve the client region from model base URL first, then env fallback. */
|
|
10
|
+
function resolveAnthropicVertexClientRegion(params) {
|
|
11
|
+
return resolveAnthropicVertexRegionFromBaseUrl(params?.baseUrl) || resolveAnthropicVertexRegion(params?.env);
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { resolveAnthropicVertexClientRegion, resolveAnthropicVertexRegionFromBaseUrl };
|
package/dist/region.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
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
|
-
import { resolveProviderEndpoint } from "openclaw/plugin-sdk/provider-http";
|
|
5
4
|
import { tryReadSecretFileSync } from "openclaw/plugin-sdk/secret-file-runtime";
|
|
6
5
|
//#region extensions/anthropic-vertex/region.ts
|
|
7
6
|
/**
|
|
@@ -21,15 +20,6 @@ function resolveAnthropicVertexRegion(env = process.env) {
|
|
|
21
20
|
function resolveAnthropicVertexProjectId(env = process.env) {
|
|
22
21
|
return normalizeOptionalString(env.ANTHROPIC_VERTEX_PROJECT_ID) || normalizeOptionalString(env.GOOGLE_CLOUD_PROJECT) || normalizeOptionalString(env.GOOGLE_CLOUD_PROJECT_ID) || resolveAnthropicVertexProjectIdFromAdc(env);
|
|
23
22
|
}
|
|
24
|
-
/** Extract a Vertex region from a provider base URL when possible. */
|
|
25
|
-
function resolveAnthropicVertexRegionFromBaseUrl(baseUrl) {
|
|
26
|
-
const endpoint = resolveProviderEndpoint(baseUrl);
|
|
27
|
-
return endpoint.endpointClass === "google-vertex" ? endpoint.googleVertexRegion : void 0;
|
|
28
|
-
}
|
|
29
|
-
/** Resolve the client region from model base URL first, then env fallback. */
|
|
30
|
-
function resolveAnthropicVertexClientRegion(params) {
|
|
31
|
-
return resolveAnthropicVertexRegionFromBaseUrl(params?.baseUrl) || resolveAnthropicVertexRegion(params?.env);
|
|
32
|
-
}
|
|
33
23
|
function hasAnthropicVertexMetadataServerAdc(env = process.env) {
|
|
34
24
|
const explicitMetadataOptIn = normalizeOptionalString(env.ANTHROPIC_VERTEX_USE_GCP_METADATA);
|
|
35
25
|
return explicitMetadataOptIn === "1" || normalizeLowercaseStringOrEmpty(explicitMetadataOptIn) === "true";
|
|
@@ -85,4 +75,4 @@ function resolveAnthropicVertexConfigApiKey(env = process.env) {
|
|
|
85
75
|
return hasAnthropicVertexAvailableAuth(env) ? GCP_VERTEX_CREDENTIALS_MARKER : void 0;
|
|
86
76
|
}
|
|
87
77
|
//#endregion
|
|
88
|
-
export { hasAnthropicVertexAvailableAuth, hasAnthropicVertexCredentials, resolveAnthropicVertexAdcCredentials,
|
|
78
|
+
export { hasAnthropicVertexAvailableAuth, hasAnthropicVertexCredentials, resolveAnthropicVertexAdcCredentials, resolveAnthropicVertexConfigApiKey, resolveAnthropicVertexProjectId, resolveAnthropicVertexRegion };
|
package/dist/stream-runtime.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { resolveAnthropicVertexAdcCredentials,
|
|
1
|
+
import { resolveAnthropicVertexAdcCredentials, resolveAnthropicVertexProjectId } from "./region.js";
|
|
2
|
+
import { resolveAnthropicVertexClientRegion } from "./region-endpoint.js";
|
|
2
3
|
import { requiresClaudeMandatoryAdaptiveThinking, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet5ModelIdentity, supportsClaudeAdaptiveThinking, supportsClaudeNativeMaxEffort, supportsClaudeNativeXhighEffort } from "openclaw/plugin-sdk/provider-model-shared";
|
|
3
4
|
import { AnthropicVertex } from "@anthropic-ai/vertex-sdk";
|
|
4
5
|
import { GoogleAuth } from "google-auth-library";
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/anthropic-vertex-provider",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.4",
|
|
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.9.
|
|
25
|
+
"pluginApi": ">=2026.9.4"
|
|
26
26
|
},
|
|
27
27
|
"build": {
|
|
28
|
-
"openclawVersion": "2026.9.
|
|
28
|
+
"openclawVersion": "2026.9.4",
|
|
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.9.
|
|
45
|
+
"openclaw": ">=2026.9.4"
|
|
46
46
|
},
|
|
47
47
|
"peerDependenciesMeta": {
|
|
48
48
|
"openclaw": {
|