@openclaw/anthropic-vertex-provider 2026.8.2 → 2026.9.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/provider-catalog.js +15 -33
- package/package.json +4 -4
package/dist/provider-catalog.js
CHANGED
|
@@ -6,7 +6,6 @@ import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coer
|
|
|
6
6
|
const ANTHROPIC_VERTEX_DEFAULT_MODEL_ID = "claude-sonnet-4-6";
|
|
7
7
|
const ANTHROPIC_VERTEX_DEFAULT_CONTEXT_WINDOW = 1e6;
|
|
8
8
|
const ANTHROPIC_VERTEX_CLAUDE_5_MAX_TOKENS = 128e3;
|
|
9
|
-
const SONNET_5_STANDARD_PRICING_START_MS = Date.UTC(2026, 8, 1);
|
|
10
9
|
const CLAUDE_5_SUPPORTED_REGIONS = /* @__PURE__ */ new Set([
|
|
11
10
|
"global",
|
|
12
11
|
"us",
|
|
@@ -28,33 +27,17 @@ const OPUS_5_COST = {
|
|
|
28
27
|
}
|
|
29
28
|
};
|
|
30
29
|
const SONNET_5_COST = {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
cacheWrite: 2.5
|
|
37
|
-
},
|
|
38
|
-
multiRegion: {
|
|
39
|
-
input: 2.2,
|
|
40
|
-
output: 11,
|
|
41
|
-
cacheRead: .22,
|
|
42
|
-
cacheWrite: 2.75
|
|
43
|
-
}
|
|
30
|
+
global: {
|
|
31
|
+
input: 2,
|
|
32
|
+
output: 10,
|
|
33
|
+
cacheRead: .2,
|
|
34
|
+
cacheWrite: 2.5
|
|
44
35
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
cacheWrite: 3.75
|
|
51
|
-
},
|
|
52
|
-
multiRegion: {
|
|
53
|
-
input: 3.3,
|
|
54
|
-
output: 16.5,
|
|
55
|
-
cacheRead: .33,
|
|
56
|
-
cacheWrite: 4.125
|
|
57
|
-
}
|
|
36
|
+
multiRegion: {
|
|
37
|
+
input: 2.2,
|
|
38
|
+
output: 11,
|
|
39
|
+
cacheRead: .22,
|
|
40
|
+
cacheWrite: 2.75
|
|
58
41
|
}
|
|
59
42
|
};
|
|
60
43
|
function buildAnthropicVertexModel(params) {
|
|
@@ -75,13 +58,12 @@ function resolveOpus5Cost(region) {
|
|
|
75
58
|
if (!CLAUDE_5_SUPPORTED_REGIONS.has(normalizedRegion)) return;
|
|
76
59
|
return normalizedRegion === "global" ? OPUS_5_COST.global : OPUS_5_COST.multiRegion;
|
|
77
60
|
}
|
|
78
|
-
function resolveSonnet5Cost(region
|
|
61
|
+
function resolveSonnet5Cost(region) {
|
|
79
62
|
const normalizedRegion = normalizeLowercaseStringOrEmpty(region);
|
|
80
63
|
if (!CLAUDE_5_SUPPORTED_REGIONS.has(normalizedRegion)) return;
|
|
81
|
-
|
|
82
|
-
return normalizedRegion === "global" ? SONNET_5_COST[pricingPeriod].global : SONNET_5_COST[pricingPeriod].multiRegion;
|
|
64
|
+
return normalizedRegion === "global" ? SONNET_5_COST.global : SONNET_5_COST.multiRegion;
|
|
83
65
|
}
|
|
84
|
-
function buildAnthropicVertexCatalog(region
|
|
66
|
+
function buildAnthropicVertexCatalog(region) {
|
|
85
67
|
const opus5Cost = resolveOpus5Cost(region);
|
|
86
68
|
const opus5 = opus5Cost ? [buildAnthropicVertexModel({
|
|
87
69
|
id: "claude-opus-5",
|
|
@@ -100,7 +82,7 @@ function buildAnthropicVertexCatalog(region, nowMs) {
|
|
|
100
82
|
max: "max"
|
|
101
83
|
}
|
|
102
84
|
})] : [];
|
|
103
|
-
const sonnet5Cost = resolveSonnet5Cost(region
|
|
85
|
+
const sonnet5Cost = resolveSonnet5Cost(region);
|
|
104
86
|
const sonnet5 = sonnet5Cost ? [buildAnthropicVertexModel({
|
|
105
87
|
id: "claude-sonnet-5",
|
|
106
88
|
name: "Claude Sonnet 5",
|
|
@@ -256,7 +238,7 @@ function buildAnthropicVertexProvider(params) {
|
|
|
256
238
|
baseUrl: normalizeLowercaseStringOrEmpty(region) === "global" ? "https://aiplatform.googleapis.com" : region === "us" || region === "eu" ? `https://aiplatform.${region}.rep.googleapis.com` : `https://${region}-aiplatform.googleapis.com`,
|
|
257
239
|
api: "anthropic-messages",
|
|
258
240
|
apiKey: GCP_VERTEX_CREDENTIALS_MARKER,
|
|
259
|
-
models: buildAnthropicVertexCatalog(region
|
|
241
|
+
models: buildAnthropicVertexCatalog(region)
|
|
260
242
|
};
|
|
261
243
|
}
|
|
262
244
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/anthropic-vertex-provider",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.9.1",
|
|
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.
|
|
25
|
+
"pluginApi": ">=2026.9.1"
|
|
26
26
|
},
|
|
27
27
|
"build": {
|
|
28
|
-
"openclawVersion": "2026.
|
|
28
|
+
"openclawVersion": "2026.9.1",
|
|
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.
|
|
45
|
+
"openclaw": ">=2026.9.1"
|
|
46
46
|
},
|
|
47
47
|
"peerDependenciesMeta": {
|
|
48
48
|
"openclaw": {
|