@openclaw/amazon-bedrock-provider 2026.9.2 → 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/bedrock-options.js +16 -2
- package/dist/config-compat.js +1 -19
- package/dist/discovery.js +39 -57
- package/dist/memory-embedding-adapter.js +1 -1
- package/dist/register.sync.runtime.js +29 -44
- package/dist/stream.runtime.js +31 -32
- package/dist/thinking-policy.js +1 -1
- package/node_modules/@aws-sdk/client-bedrock/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/token-providers/package.json +1 -1
- package/node_modules/@aws-sdk/client-bedrock/package.json +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/token-providers/package.json +1 -1
- package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +2 -2
- package/openclaw.plugin.json +1 -0
- package/package.json +6 -6
package/dist/bedrock-options.js
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
|
+
import { resolveClaudeModelIdentity } from "openclaw/plugin-sdk/provider-model-shared";
|
|
1
2
|
//#region extensions/amazon-bedrock/bedrock-options.ts
|
|
3
|
+
function resolveBedrockPromptCachePolicy(model) {
|
|
4
|
+
const modelId = model.id.trim().toLowerCase().replace(/^arn:aws(?:-cn|-us-gov)?:bedrock:[^:]+:[^:]*:(?:foundation-model|inference-profile)\//, "").replace(/^(?:us|eu|apac|jp|global)\./, "");
|
|
5
|
+
if (/^amazon\.nova-(?:micro|lite|pro|premier|2-lite)-v1:0$/.test(modelId)) return "nova";
|
|
6
|
+
if (supportsBedrockClaudePromptCaching(model.id, model.name) || supportsBedrockClaudePromptCaching(resolveClaudeModelIdentity(model), model.name)) return "claude";
|
|
7
|
+
}
|
|
8
|
+
function resolveBedrockCachePoint(model, retention) {
|
|
9
|
+
const policy = resolveBedrockPromptCachePolicy(model);
|
|
10
|
+
if (!policy || retention === "none") return;
|
|
11
|
+
return {
|
|
12
|
+
type: "default",
|
|
13
|
+
...policy === "claude" && retention === "long" ? { ttl: "1h" } : {}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
2
16
|
function getModelMatchCandidates(modelId, modelName) {
|
|
3
17
|
return (modelName ? [modelId, modelName] : [modelId]).flatMap((value) => {
|
|
4
18
|
const lower = value.toLowerCase();
|
|
@@ -6,7 +20,7 @@ function getModelMatchCandidates(modelId, modelName) {
|
|
|
6
20
|
});
|
|
7
21
|
}
|
|
8
22
|
/** Return whether a Bedrock model is known to support Anthropic prompt caching. */
|
|
9
|
-
function
|
|
23
|
+
function supportsBedrockClaudePromptCaching(modelId, modelName) {
|
|
10
24
|
const candidates = getModelMatchCandidates(modelId, modelName);
|
|
11
25
|
if (!candidates.some((s) => s.includes("claude"))) {
|
|
12
26
|
if (typeof process !== "undefined" && process.env.AWS_BEDROCK_FORCE_CACHE === "1") return true;
|
|
@@ -19,4 +33,4 @@ function supportsBedrockPromptCaching(modelId, modelName) {
|
|
|
19
33
|
return false;
|
|
20
34
|
}
|
|
21
35
|
//#endregion
|
|
22
|
-
export {
|
|
36
|
+
export { resolveBedrockCachePoint, resolveBedrockPromptCachePolicy, supportsBedrockClaudePromptCaching };
|
package/dist/config-compat.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
+
import { mergeMissing } from "openclaw/plugin-sdk/runtime-doctor-migrations";
|
|
2
3
|
//#region extensions/amazon-bedrock/config-compat.ts
|
|
3
4
|
/**
|
|
4
5
|
* Legacy config migration for Amazon Bedrock discovery settings. It moves
|
|
@@ -6,14 +7,6 @@ import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
|
6
7
|
*/
|
|
7
8
|
const LEGACY_PATH = "models.bedrockDiscovery";
|
|
8
9
|
const TARGET_PATH = "plugins.entries.amazon-bedrock.config.discovery";
|
|
9
|
-
const BLOCKED_OBJECT_KEYS = /* @__PURE__ */ new Set([
|
|
10
|
-
"__proto__",
|
|
11
|
-
"prototype",
|
|
12
|
-
"constructor"
|
|
13
|
-
]);
|
|
14
|
-
function isBlockedObjectKey(key) {
|
|
15
|
-
return BLOCKED_OBJECT_KEYS.has(key);
|
|
16
|
-
}
|
|
17
10
|
function getRecord(value) {
|
|
18
11
|
return isRecord(value) ? value : null;
|
|
19
12
|
}
|
|
@@ -24,17 +17,6 @@ function ensureRecord(root, key) {
|
|
|
24
17
|
root[key] = next;
|
|
25
18
|
return next;
|
|
26
19
|
}
|
|
27
|
-
function mergeMissing(target, source) {
|
|
28
|
-
for (const [key, value] of Object.entries(source)) {
|
|
29
|
-
if (value === void 0 || isBlockedObjectKey(key)) continue;
|
|
30
|
-
const existing = target[key];
|
|
31
|
-
if (existing === void 0) {
|
|
32
|
-
target[key] = value;
|
|
33
|
-
continue;
|
|
34
|
-
}
|
|
35
|
-
if (isRecord(existing) && isRecord(value)) mergeMissing(existing, value);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
20
|
function cloneRecord(value) {
|
|
39
21
|
return { ...value };
|
|
40
22
|
}
|
package/dist/discovery.js
CHANGED
|
@@ -2,13 +2,11 @@ import { refreshAwsSharedConfigCacheForBedrock } from "./aws-credential-refresh.
|
|
|
2
2
|
import { loadBedrockControlPlaneSdk, runBedrockControlPlaneRequest } from "./control-plane.js";
|
|
3
3
|
import { resolveBedrockConfigApiKey } from "./discovery-shared.js";
|
|
4
4
|
import { resolveBedrockNativeThinkingLevelMap } from "./thinking-policy.js";
|
|
5
|
+
import { LiveModelCatalogHttpError } from "openclaw/plugin-sdk/provider-catalog-live-runtime";
|
|
5
6
|
import { resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet5ModelIdentity, supportsClaudeAdaptiveThinking } from "openclaw/plugin-sdk/provider-model-shared";
|
|
6
|
-
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
|
-
import { createSubsystemLogger } from "openclaw/plugin-sdk/core";
|
|
8
|
-
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
7
|
+
import { asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
8
|
import { isFutureDateTimestampMs, resolveExpiresAtMsFromDurationSeconds } from "openclaw/plugin-sdk/number-runtime";
|
|
10
9
|
//#region extensions/amazon-bedrock/discovery.ts
|
|
11
|
-
const log = createSubsystemLogger("bedrock-discovery");
|
|
12
10
|
const DEFAULT_REFRESH_INTERVAL_SECONDS = 3600;
|
|
13
11
|
const DEFAULT_CONTEXT_WINDOW = 32e3;
|
|
14
12
|
const DEFAULT_MAX_TOKENS = 4096;
|
|
@@ -120,15 +118,11 @@ const DEFAULT_COST = {
|
|
|
120
118
|
cacheWrite: 0
|
|
121
119
|
};
|
|
122
120
|
const discoveryCache = /* @__PURE__ */ new Map();
|
|
123
|
-
let hasLoggedBedrockError = false;
|
|
124
121
|
function normalizeProviderFilter(filter) {
|
|
125
122
|
if (!filter || filter.length === 0) return [];
|
|
126
123
|
const normalized = new Set(filter.map((entry) => normalizeOptionalLowercaseString(entry)).filter((entry) => Boolean(entry)));
|
|
127
124
|
return Array.from(normalized).toSorted();
|
|
128
125
|
}
|
|
129
|
-
function buildCacheKey(params) {
|
|
130
|
-
return JSON.stringify(params);
|
|
131
|
-
}
|
|
132
126
|
function includesTextModalities(modalities) {
|
|
133
127
|
return (modalities ?? []).some((entry) => normalizeOptionalLowercaseString(entry) === "text");
|
|
134
128
|
}
|
|
@@ -214,27 +208,21 @@ function resolveBaseModelId(profile) {
|
|
|
214
208
|
}
|
|
215
209
|
/**
|
|
216
210
|
* Fetch raw inference profile summaries from the Bedrock control plane.
|
|
217
|
-
*
|
|
218
|
-
* bedrock:ListInferenceProfiles permission.
|
|
211
|
+
* All pages must succeed before discovery can cache a complete catalog.
|
|
219
212
|
*/
|
|
220
213
|
async function fetchInferenceProfileSummaries(client, createListInferenceProfilesCommand) {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
return profiles;
|
|
234
|
-
} catch (error) {
|
|
235
|
-
log.debug?.("Skipping inference profile discovery", { error: formatErrorMessage(error) });
|
|
236
|
-
return [];
|
|
237
|
-
}
|
|
214
|
+
const profiles = [];
|
|
215
|
+
let nextToken;
|
|
216
|
+
do {
|
|
217
|
+
const command = createListInferenceProfilesCommand({ nextToken });
|
|
218
|
+
const response = await runBedrockControlPlaneRequest({
|
|
219
|
+
operation: "Bedrock ListInferenceProfiles",
|
|
220
|
+
send: (options) => client.send(command, options)
|
|
221
|
+
});
|
|
222
|
+
for (const summary of response.inferenceProfileSummaries ?? []) profiles.push(summary);
|
|
223
|
+
nextToken = response.nextToken;
|
|
224
|
+
} while (nextToken);
|
|
225
|
+
return profiles;
|
|
238
226
|
}
|
|
239
227
|
/**
|
|
240
228
|
* Convert raw inference profile summaries into model definitions.
|
|
@@ -279,14 +267,15 @@ function resolveInferenceProfiles(profiles, defaults, providerFilter, foundation
|
|
|
279
267
|
}
|
|
280
268
|
return discovered;
|
|
281
269
|
}
|
|
282
|
-
/**
|
|
270
|
+
/** Public discovery is advisory by default; catalog owners opt into strict acquisition. */
|
|
283
271
|
async function discoverBedrockModels(params) {
|
|
284
272
|
const refreshIntervalSeconds = Math.max(0, Math.floor(params.config?.refreshInterval ?? DEFAULT_REFRESH_INTERVAL_SECONDS));
|
|
285
273
|
const providerFilter = normalizeProviderFilter(params.config?.providerFilter);
|
|
286
274
|
const defaultContextWindow = resolveDefaultContextWindow(params.config);
|
|
287
275
|
const defaultMaxTokens = resolveDefaultMaxTokens(params.config);
|
|
288
|
-
const cacheKey =
|
|
276
|
+
const cacheKey = JSON.stringify({
|
|
289
277
|
region: params.region,
|
|
278
|
+
discoveryMode: params.discoveryMode,
|
|
290
279
|
providerFilter,
|
|
291
280
|
refreshIntervalSeconds,
|
|
292
281
|
defaultContextWindow,
|
|
@@ -295,11 +284,8 @@ async function discoverBedrockModels(params) {
|
|
|
295
284
|
const now = params.now?.() ?? Date.now();
|
|
296
285
|
if (refreshIntervalSeconds > 0) {
|
|
297
286
|
const cached = discoveryCache.get(cacheKey);
|
|
298
|
-
if (cached && isFutureDateTimestampMs(cached.expiresAt, { nowMs: now }))
|
|
299
|
-
|
|
300
|
-
if (cached.inFlight) return cached.inFlight;
|
|
301
|
-
}
|
|
302
|
-
if (cached) discoveryCache.delete(cacheKey);
|
|
287
|
+
if (cached && isFutureDateTimestampMs(cached.expiresAt, { nowMs: now })) return cached.result;
|
|
288
|
+
discoveryCache.delete(cacheKey);
|
|
303
289
|
}
|
|
304
290
|
const sdk = await loadBedrockControlPlaneSdk();
|
|
305
291
|
const clientFactory = params.clientFactory ?? ((region) => sdk.createClient(region));
|
|
@@ -311,7 +297,11 @@ async function discoverBedrockModels(params) {
|
|
|
311
297
|
const [foundationResponse, profileSummaries] = await Promise.all([runBedrockControlPlaneRequest({
|
|
312
298
|
operation: "Bedrock ListFoundationModels",
|
|
313
299
|
send: (options) => client.send(foundationCommand, options)
|
|
314
|
-
}), fetchInferenceProfileSummaries(client, (input) => sdk.createListInferenceProfilesCommand(input))
|
|
300
|
+
}), fetchInferenceProfileSummaries(client, (input) => sdk.createListInferenceProfilesCommand(input)).catch((error) => {
|
|
301
|
+
if (params.discoveryMode === "strict") throw error;
|
|
302
|
+
discoveryCache.delete(cacheKey);
|
|
303
|
+
return [];
|
|
304
|
+
})]);
|
|
315
305
|
const discovered = [];
|
|
316
306
|
const seenIds = /* @__PURE__ */ new Set();
|
|
317
307
|
const foundationModels = /* @__PURE__ */ new Map();
|
|
@@ -343,37 +333,28 @@ async function discoverBedrockModels(params) {
|
|
|
343
333
|
if (aGlobal !== bGlobal) return aGlobal - bGlobal;
|
|
344
334
|
return a.name.localeCompare(b.name);
|
|
345
335
|
});
|
|
336
|
+
} catch (error) {
|
|
337
|
+
const status = asOptionalRecord(asOptionalRecord(error)?.$metadata)?.httpStatusCode;
|
|
338
|
+
if (typeof status === "number") throw new LiveModelCatalogHttpError("amazon-bedrock", status);
|
|
339
|
+
throw error;
|
|
346
340
|
} finally {
|
|
347
341
|
client.destroy();
|
|
348
342
|
}
|
|
349
|
-
})()
|
|
343
|
+
})().catch((error) => {
|
|
344
|
+
discoveryCache.delete(cacheKey);
|
|
345
|
+
if (params.discoveryMode === "strict") throw error;
|
|
346
|
+
return [];
|
|
347
|
+
});
|
|
350
348
|
if (refreshIntervalSeconds > 0) {
|
|
351
349
|
const expiresAt = resolveExpiresAtMsFromDurationSeconds(refreshIntervalSeconds, { nowMs: now });
|
|
352
350
|
if (expiresAt !== void 0) discoveryCache.set(cacheKey, {
|
|
353
351
|
expiresAt,
|
|
354
|
-
|
|
352
|
+
result: discoveryPromise
|
|
355
353
|
});
|
|
356
354
|
}
|
|
357
|
-
|
|
358
|
-
const value = await discoveryPromise;
|
|
359
|
-
if (refreshIntervalSeconds > 0) {
|
|
360
|
-
const expiresAt = resolveExpiresAtMsFromDurationSeconds(refreshIntervalSeconds, { nowMs: now });
|
|
361
|
-
if (expiresAt !== void 0) discoveryCache.set(cacheKey, {
|
|
362
|
-
expiresAt,
|
|
363
|
-
value
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
return value;
|
|
367
|
-
} catch (error) {
|
|
368
|
-
if (refreshIntervalSeconds > 0) discoveryCache.delete(cacheKey);
|
|
369
|
-
if (!hasLoggedBedrockError) {
|
|
370
|
-
hasLoggedBedrockError = true;
|
|
371
|
-
log.warn("Failed to discover Bedrock models", { error: formatErrorMessage(error) });
|
|
372
|
-
}
|
|
373
|
-
return [];
|
|
374
|
-
}
|
|
355
|
+
return discoveryPromise;
|
|
375
356
|
}
|
|
376
|
-
/**
|
|
357
|
+
/** Public resolution keeps advisory null results; strict catalog callers retain acquired empties. */
|
|
377
358
|
async function resolveImplicitBedrockProvider(params) {
|
|
378
359
|
const env = params.env ?? process.env;
|
|
379
360
|
const discoveryConfig = params.pluginConfig?.discovery;
|
|
@@ -384,10 +365,11 @@ async function resolveImplicitBedrockProvider(params) {
|
|
|
384
365
|
const region = discoveryConfig?.region ?? normalizeOptionalString(env.AWS_REGION) ?? normalizeOptionalString(env.AWS_DEFAULT_REGION) ?? "us-east-1";
|
|
385
366
|
const models = await discoverBedrockModels({
|
|
386
367
|
region,
|
|
368
|
+
discoveryMode: params.discoveryMode,
|
|
387
369
|
config: discoveryConfig,
|
|
388
370
|
clientFactory: params.clientFactory
|
|
389
371
|
});
|
|
390
|
-
if (models.length === 0) return null;
|
|
372
|
+
if (models.length === 0 && params.discoveryMode !== "strict") return null;
|
|
391
373
|
return {
|
|
392
374
|
baseUrl: `https://bedrock-runtime.${region}.amazonaws.com`,
|
|
393
375
|
api: "bedrock-converse-stream",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DEFAULT_BEDROCK_EMBEDDING_MODEL, createBedrockEmbeddingProvider, hasAwsCredentials } from "./embedding-provider.js";
|
|
2
|
-
import { isMissingEmbeddingApiKeyError } from "openclaw/plugin-sdk/
|
|
2
|
+
import { isMissingEmbeddingApiKeyError } from "openclaw/plugin-sdk/embedding-provider-adapter";
|
|
3
3
|
//#region extensions/amazon-bedrock/memory-embedding-adapter.ts
|
|
4
4
|
/**
|
|
5
5
|
* Memory embedding adapter for Amazon Bedrock. It exposes Bedrock embeddings to
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { refreshAwsSharedConfigCacheForBedrock } from "./aws-credential-refresh.js";
|
|
2
|
-
import {
|
|
2
|
+
import { resolveBedrockPromptCachePolicy, supportsBedrockClaudePromptCaching } from "./bedrock-options.js";
|
|
3
3
|
import { loadBedrockControlPlaneSdk, runBedrockControlPlaneRequest } from "./control-plane.js";
|
|
4
4
|
import { resolveBedrockConfigApiKey } from "./discovery-shared.js";
|
|
5
5
|
import { bedrockMemoryEmbeddingProviderAdapter } from "./memory-embedding-adapter.js";
|
|
6
6
|
import { isLatestAdaptiveBedrockModelRef, isOpus47OrNewerBedrockModelRef, resolveBedrockClaudeThinkingProfile, resolveBedrockNativeThinkingLevelMap, supportsBedrockNativeMaxEffort } from "./thinking-policy.js";
|
|
7
7
|
import { streamSimpleBedrock } from "./stream.runtime.js";
|
|
8
8
|
import { resolvePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
9
|
+
import { runLiveProviderCatalog } from "openclaw/plugin-sdk/provider-catalog-live-runtime";
|
|
9
10
|
import { buildProviderReplayFamilyHooks, normalizeProviderId, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet5ModelIdentity } from "openclaw/plugin-sdk/provider-model-shared";
|
|
10
11
|
import { createPayloadPatchStreamWrapper } from "openclaw/plugin-sdk/provider-stream-shared";
|
|
12
|
+
import { splitSystemPromptCacheBoundary } from "openclaw/plugin-sdk/provider-transport-runtime";
|
|
11
13
|
//#region extensions/amazon-bedrock/register.sync.runtime.ts
|
|
12
14
|
function normalizeBedrockResolvedModel({ modelId, model }) {
|
|
13
15
|
const thinkingLevelMap = resolveBedrockNativeThinkingLevelMap(modelId, model.params);
|
|
@@ -87,9 +89,6 @@ function createGuardrailWrapStreamFn(innerWrapStreamFn, guardrailConfig) {
|
|
|
87
89
|
});
|
|
88
90
|
};
|
|
89
91
|
}
|
|
90
|
-
function sharedRuntimeWouldInjectCachePoints(modelId) {
|
|
91
|
-
return supportsBedrockPromptCaching(modelId);
|
|
92
|
-
}
|
|
93
92
|
/**
|
|
94
93
|
* Detect Bedrock application inference profile ARNs — these are the only IDs
|
|
95
94
|
* where model-name-based checks fail because the ARN is opaque.
|
|
@@ -101,21 +100,6 @@ function isBedrockAppInferenceProfile(modelId) {
|
|
|
101
100
|
return BEDROCK_APP_INFERENCE_PROFILE_RE.test(modelId);
|
|
102
101
|
}
|
|
103
102
|
/**
|
|
104
|
-
* The shared runtime's `supportsPromptCaching` checks `model.id` for specific Claude
|
|
105
|
-
* model name patterns, which fails for application inference profile ARNs (opaque
|
|
106
|
-
* IDs that may not contain the model name). When OpenClaw's `isAnthropicBedrockModel`
|
|
107
|
-
* identifies the model but the shared runtime won't inject cache points, we do it via onPayload.
|
|
108
|
-
*
|
|
109
|
-
* Gated to application inference profile ARNs only — regular Claude model IDs and
|
|
110
|
-
* system-defined inference profiles (us.anthropic.claude-*) are left to the shared runtime.
|
|
111
|
-
*/
|
|
112
|
-
function needsCachePointInjection(modelId) {
|
|
113
|
-
if (!isBedrockAppInferenceProfile(modelId)) return false;
|
|
114
|
-
if (sharedRuntimeWouldInjectCachePoints(modelId)) return false;
|
|
115
|
-
if (isAnthropicBedrockModel(modelId)) return true;
|
|
116
|
-
return false;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
103
|
* Extract the region from a Bedrock ARN.
|
|
120
104
|
* e.g. "arn:aws:bedrock:us-east-1:123:application-inference-profile/abc" → "us-east-1"
|
|
121
105
|
*/
|
|
@@ -123,13 +107,6 @@ function extractRegionFromArn(arn) {
|
|
|
123
107
|
const parts = arn.split(":");
|
|
124
108
|
return parts.length >= 4 && parts[3] ? parts[3] : void 0;
|
|
125
109
|
}
|
|
126
|
-
/**
|
|
127
|
-
* Check if a resolved foundation model ARN supports prompt caching using the
|
|
128
|
-
* same matcher OpenClaw uses for direct model IDs.
|
|
129
|
-
*/
|
|
130
|
-
function resolvedModelSupportsCaching(modelArn) {
|
|
131
|
-
return supportsBedrockPromptCaching(modelArn);
|
|
132
|
-
}
|
|
133
110
|
const appProfileTraitsCache = /* @__PURE__ */ new Map();
|
|
134
111
|
async function resolveAppProfileTraits(modelId, fallbackRegion, signal) {
|
|
135
112
|
const cached = appProfileTraitsCache.get(modelId);
|
|
@@ -150,7 +127,7 @@ async function resolveAppProfileTraits(modelId, fallbackRegion, signal) {
|
|
|
150
127
|
})).models ?? [];
|
|
151
128
|
const modelArns = models.map((model) => model.modelArn ?? "");
|
|
152
129
|
const traits = {
|
|
153
|
-
cacheEligible: models.length > 0 && modelArns.every((modelArn) =>
|
|
130
|
+
cacheEligible: models.length > 0 && modelArns.every((modelArn) => supportsBedrockClaudePromptCaching(modelArn)),
|
|
154
131
|
omitTemperature: modelArns.some(isOpus47OrNewerBedrockModelRef)
|
|
155
132
|
};
|
|
156
133
|
appProfileTraitsCache.set(modelId, traits);
|
|
@@ -178,11 +155,15 @@ function makeCachePoint(cacheRetention) {
|
|
|
178
155
|
* Inject Bedrock Converse cache points into the payload when the shared runtime skipped them
|
|
179
156
|
* because it didn't recognize the model ID (application inference profiles).
|
|
180
157
|
*/
|
|
181
|
-
function injectBedrockCachePoints(payload, cacheRetention) {
|
|
182
|
-
if (!cacheRetention || cacheRetention === "none") return;
|
|
158
|
+
function injectBedrockCachePoints(payload, cacheRetention, context, model) {
|
|
159
|
+
if (!cacheRetention || cacheRetention === "none" || resolveBedrockPromptCachePolicy(model)) return;
|
|
183
160
|
const point = makeCachePoint(cacheRetention);
|
|
184
161
|
const system = payload.system;
|
|
185
|
-
if (Array.isArray(system) && system.length > 0 && !hasCachePoint(system))
|
|
162
|
+
if (Array.isArray(system) && system.length > 0 && !hasCachePoint(system)) {
|
|
163
|
+
const split = context.systemPrompt && splitSystemPromptCacheBoundary(context.systemPrompt);
|
|
164
|
+
if (!split || split.stablePrefix) system.splice(split ? 1 : system.length, 0, point);
|
|
165
|
+
}
|
|
166
|
+
if (context.messages.some((message) => message.role === "user" && message.runtimeContextCarrier)) return;
|
|
186
167
|
const messages = payload.messages;
|
|
187
168
|
if (Array.isArray(messages) && messages.length > 0) {
|
|
188
169
|
for (const msg of messages.toReversed()) if (msg.role === "user" && Array.isArray(msg.content)) {
|
|
@@ -221,7 +202,7 @@ function registerAmazonBedrockPlugin(api) {
|
|
|
221
202
|
id: modelId,
|
|
222
203
|
params: model?.params
|
|
223
204
|
};
|
|
224
|
-
if (isAnthropicBedrockModel(modelId) || resolveClaudeModelIdentity(modelRef).startsWith("claude-")) return streamFn;
|
|
205
|
+
if (resolveBedrockPromptCachePolicy(modelRef) === "nova" || isAnthropicBedrockModel(modelId) || resolveClaudeModelIdentity(modelRef).startsWith("claude-")) return streamFn;
|
|
225
206
|
if (isBedrockAppInferenceProfile(modelId)) return streamFn;
|
|
226
207
|
return createBedrockNoCacheWrapper(streamFn);
|
|
227
208
|
};
|
|
@@ -282,18 +263,22 @@ function registerAmazonBedrockPlugin(api) {
|
|
|
282
263
|
auth: [],
|
|
283
264
|
catalog: {
|
|
284
265
|
order: "simple",
|
|
285
|
-
run:
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
266
|
+
run: (ctx) => runLiveProviderCatalog({
|
|
267
|
+
providerId,
|
|
268
|
+
run: async () => {
|
|
269
|
+
const { resolveImplicitBedrockProvider } = await import("./discovery.js");
|
|
270
|
+
const implicit = await resolveImplicitBedrockProvider({
|
|
271
|
+
discoveryMode: "strict",
|
|
272
|
+
pluginConfig: resolveCurrentPluginConfig(ctx.config),
|
|
273
|
+
env: ctx.env
|
|
274
|
+
});
|
|
275
|
+
return implicit ? { provider: implicit } : null;
|
|
276
|
+
}
|
|
277
|
+
})
|
|
294
278
|
},
|
|
295
279
|
resolveConfigApiKey: ({ env }) => resolveBedrockConfigApiKey(env),
|
|
296
280
|
normalizeResolvedModel: normalizeBedrockResolvedModel,
|
|
281
|
+
supportsSystemPromptCacheBoundary: true,
|
|
297
282
|
createStreamFn: ({ model }) => model.api === "bedrock-converse-stream" ? bedrockStreamFn : void 0,
|
|
298
283
|
...anthropicByModelReplayHooks,
|
|
299
284
|
wrapStreamFn: ({ modelId, config, model, streamFn, thinkingLevel, extraParams }) => {
|
|
@@ -326,11 +311,11 @@ function registerAmazonBedrockPlugin(api) {
|
|
|
326
311
|
} else wrapped = createBedrockServiceTierWrapper(wrapped, serviceTier);
|
|
327
312
|
}
|
|
328
313
|
const region = resolveBedrockRegion(config) ?? extractRegionFromBaseUrl(model?.baseUrl) ?? currentPluginConfig?.discovery?.region;
|
|
329
|
-
const mayNeedCacheInjection = isBedrockAppInferenceProfile(modelId) && !
|
|
314
|
+
const mayNeedCacheInjection = isBedrockAppInferenceProfile(modelId) && !supportsBedrockClaudePromptCaching(modelId);
|
|
330
315
|
const shouldOmitTemperature = opus47OrNewer || fable5 || isLatestAdaptiveBedrockModelRef(modelId, model?.params);
|
|
331
316
|
const shouldPatchMaxThinking = supportsNativeMax && thinkingLevel === "max";
|
|
332
317
|
const shouldPatchPayload = shouldOmitTemperature || shouldPatchMaxThinking;
|
|
333
|
-
const heuristicMatch =
|
|
318
|
+
const heuristicMatch = isAnthropicBedrockModel(modelId);
|
|
334
319
|
if (!region && !mayNeedCacheInjection && !shouldOmitTemperature && !shouldPatchMaxThinking) return createAwsCredentialRefreshStreamWrapper(wrapped);
|
|
335
320
|
const underlying = wrapped ?? streamFn;
|
|
336
321
|
if (!underlying) return wrapped;
|
|
@@ -356,7 +341,7 @@ function registerAmazonBedrockPlugin(api) {
|
|
|
356
341
|
onPayload: async (payload, payloadModel) => {
|
|
357
342
|
if (payload && typeof payload === "object") {
|
|
358
343
|
const payloadRecord = payload;
|
|
359
|
-
injectBedrockCachePoints(payloadRecord, cacheRetention);
|
|
344
|
+
injectBedrockCachePoints(payloadRecord, cacheRetention, context, streamModel);
|
|
360
345
|
if (shouldPatchMaxThinking) patchMaxThinkingEffort(payloadRecord);
|
|
361
346
|
if (shouldOmitTemperature) omitUnsupportedClaudePayloadTemperature(payloadRecord);
|
|
362
347
|
else if (mayNeedTemperatureTrait) {
|
|
@@ -373,7 +358,7 @@ function registerAmazonBedrockPlugin(api) {
|
|
|
373
358
|
const traits = await resolveAppProfileTraits(modelId, region, merged.signal);
|
|
374
359
|
if (payload && typeof payload === "object") {
|
|
375
360
|
const payloadRecord = payload;
|
|
376
|
-
if (traits.cacheEligible) injectBedrockCachePoints(payloadRecord, cacheRetention);
|
|
361
|
+
if (traits.cacheEligible) injectBedrockCachePoints(payloadRecord, cacheRetention, context, streamModel);
|
|
377
362
|
if (shouldPatchMaxThinking) patchMaxThinkingEffort(payloadRecord);
|
|
378
363
|
if (traits.omitTemperature) omitUnsupportedClaudePayloadTemperature(payloadRecord);
|
|
379
364
|
}
|
package/dist/stream.runtime.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolveBedrockCachePoint, resolveBedrockPromptCachePolicy } from "./bedrock-options.js";
|
|
2
2
|
import { supportsBedrockNativeMaxEffort } from "./thinking-policy.js";
|
|
3
|
-
import { requiresClaudeMandatoryAdaptiveThinking, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet5ModelIdentity, supportsClaudeAdaptiveThinking, supportsClaudeNativeXhighEffort } from "openclaw/plugin-sdk/provider-model-shared";
|
|
3
|
+
import { bindsClaudeThinkingPrefix, requiresClaudeMandatoryAdaptiveThinking, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet5ModelIdentity, supportsClaudeAdaptiveThinking, supportsClaudeNativeXhighEffort } from "openclaw/plugin-sdk/provider-model-shared";
|
|
4
4
|
import { applyAnthropicRefusal, createDeferredEventBuffer, notifyLlmRequestActivity } from "openclaw/plugin-sdk/provider-stream-shared";
|
|
5
|
+
import { describeToolResultMediaPlaceholder, failTransportStream, finalizeTerminalToolCallArguments, notifyProviderHttpMetadata, splitSystemPromptCacheBoundary, stripSystemPromptCacheBoundary } from "openclaw/plugin-sdk/provider-transport-runtime";
|
|
5
6
|
import { isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
|
-
import { BedrockRuntimeClient, BedrockRuntimeServiceException,
|
|
7
|
+
import { BedrockRuntimeClient, BedrockRuntimeServiceException, CacheTTL, ConversationRole, ConverseStreamCommand, ImageFormat, StopReason, ToolResultStatus } from "@aws-sdk/client-bedrock-runtime";
|
|
7
8
|
import { NodeHttpHandler } from "@smithy/node-http-handler";
|
|
8
9
|
import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
9
|
-
import { AssistantMessageEventStream, adjustMaxTokensForThinking, buildBaseOptions, calculateCost, clampReasoning, createHttpProxyAgentsForTarget, parseStreamingJson, sanitizeSurrogates, transformMessages } from "openclaw/plugin-sdk/llm";
|
|
10
|
+
import { AssistantMessageEventStream, adjustMaxTokensForThinking, buildBaseOptions, calculateCost, clampReasoning, createHttpProxyAgentsForTarget, createToolArgumentPreviewSchedule, parseStreamingJson, sanitizeSurrogates, transformMessages } from "openclaw/plugin-sdk/llm";
|
|
10
11
|
import { canonicalizeBase64 } from "openclaw/plugin-sdk/media-runtime";
|
|
11
|
-
import { describeToolResultMediaPlaceholder, failTransportStream, finalizeTerminalToolCallArguments, notifyProviderHttpMetadata } from "openclaw/plugin-sdk/provider-transport-runtime";
|
|
12
12
|
//#region extensions/amazon-bedrock/stream.runtime.ts
|
|
13
13
|
/**
|
|
14
14
|
* Amazon Bedrock Converse streaming runtime. It maps OpenClaw messages/tools,
|
|
@@ -73,6 +73,7 @@ const streamBedrock = (model, context, options = {}) => {
|
|
|
73
73
|
};
|
|
74
74
|
const blocks = output.content;
|
|
75
75
|
const pendingToolCallEnds = [];
|
|
76
|
+
const toolArgumentPreviewSchedules = /* @__PURE__ */ new WeakMap();
|
|
76
77
|
const redactedReasoningChunks = /* @__PURE__ */ new Map();
|
|
77
78
|
const fable5 = usesClaudeFable5BedrockContract(model);
|
|
78
79
|
const refusalBuffer = usesClaudeStreamingRefusalBedrockContract(model) ? createDeferredEventBuffer(stream) : void 0;
|
|
@@ -105,14 +106,15 @@ const streamBedrock = (model, context, options = {}) => {
|
|
|
105
106
|
let client;
|
|
106
107
|
try {
|
|
107
108
|
client = new BedrockRuntimeClient(config);
|
|
108
|
-
const cacheRetention = resolveCacheRetention(options.cacheRetention);
|
|
109
|
+
const cacheRetention = resolveCacheRetention(model, options.cacheRetention);
|
|
110
|
+
const cachePoint = resolveBedrockCachePoint(model, cacheRetention);
|
|
109
111
|
const additionalModelRequestFields = buildAdditionalModelRequestFields(model, options);
|
|
110
112
|
const thinking = additionalModelRequestFields?.thinking;
|
|
111
113
|
const sendsAdaptiveThinking = thinking !== null && typeof thinking === "object" && thinking.type === "adaptive";
|
|
112
114
|
let commandInput = {
|
|
113
115
|
modelId: model.id,
|
|
114
|
-
messages: convertMessages(context, model,
|
|
115
|
-
system: buildSystemPrompt(context.systemPrompt,
|
|
116
|
+
messages: convertMessages(context, model, cachePoint),
|
|
117
|
+
system: buildSystemPrompt(context.systemPrompt, cacheRetention, cachePoint),
|
|
116
118
|
inferenceConfig: {
|
|
117
119
|
...options.maxTokens !== void 0 && { maxTokens: options.maxTokens },
|
|
118
120
|
...options.temperature !== void 0 && !sendsAdaptiveThinking && { temperature: options.temperature }
|
|
@@ -151,8 +153,8 @@ const streamBedrock = (model, context, options = {}) => {
|
|
|
151
153
|
type: "start",
|
|
152
154
|
partial: output
|
|
153
155
|
});
|
|
154
|
-
} else if (item.contentBlockStart) handleContentBlockStart(item.contentBlockStart, blocks, output, eventSink);
|
|
155
|
-
else if (item.contentBlockDelta) handleContentBlockDelta(item.contentBlockDelta, blocks, output, eventSink, redactedReasoningChunks);
|
|
156
|
+
} else if (item.contentBlockStart) handleContentBlockStart(item.contentBlockStart, blocks, output, eventSink, toolArgumentPreviewSchedules);
|
|
157
|
+
else if (item.contentBlockDelta) handleContentBlockDelta(item.contentBlockDelta, blocks, output, eventSink, redactedReasoningChunks, toolArgumentPreviewSchedules);
|
|
156
158
|
else if (item.contentBlockStop) handleContentBlockStop(item.contentBlockStop, blocks, output, eventSink, redactedReasoningChunks, pendingToolCallEnds);
|
|
157
159
|
else if (item.messageStop) {
|
|
158
160
|
sawMessageStop = true;
|
|
@@ -287,7 +289,7 @@ function resolveSimpleBedrockOptions(model, options) {
|
|
|
287
289
|
thinkingBudgets: options.thinkingBudgets
|
|
288
290
|
};
|
|
289
291
|
}
|
|
290
|
-
function handleContentBlockStart(event, blocks, output, stream) {
|
|
292
|
+
function handleContentBlockStart(event, blocks, output, stream, toolArgumentPreviewSchedules) {
|
|
291
293
|
const index = event.contentBlockIndex;
|
|
292
294
|
const start = event.start;
|
|
293
295
|
if (start?.toolUse) {
|
|
@@ -300,6 +302,7 @@ function handleContentBlockStart(event, blocks, output, stream) {
|
|
|
300
302
|
partialJson: "",
|
|
301
303
|
index
|
|
302
304
|
};
|
|
305
|
+
toolArgumentPreviewSchedules.set(block, createToolArgumentPreviewSchedule());
|
|
303
306
|
output.content.push(block);
|
|
304
307
|
stream.push({
|
|
305
308
|
type: "toolcall_start",
|
|
@@ -308,7 +311,7 @@ function handleContentBlockStart(event, blocks, output, stream) {
|
|
|
308
311
|
});
|
|
309
312
|
}
|
|
310
313
|
}
|
|
311
|
-
function handleContentBlockDelta(event, blocks, output, stream, redactedReasoningChunks) {
|
|
314
|
+
function handleContentBlockDelta(event, blocks, output, stream, redactedReasoningChunks, toolArgumentPreviewSchedules) {
|
|
312
315
|
const contentBlockIndex = event.contentBlockIndex;
|
|
313
316
|
const delta = event.delta;
|
|
314
317
|
let index = blocks.findIndex((b) => b.index === contentBlockIndex);
|
|
@@ -340,7 +343,7 @@ function handleContentBlockDelta(event, blocks, output, stream, redactedReasonin
|
|
|
340
343
|
}
|
|
341
344
|
} else if (delta?.toolUse && block?.type === "toolCall") {
|
|
342
345
|
block.partialJson = (block.partialJson || "") + (delta.toolUse.input || "");
|
|
343
|
-
block.arguments = parseStreamingJson(block.partialJson);
|
|
346
|
+
if (toolArgumentPreviewSchedules.get(block)?.(block.partialJson.length)) block.arguments = parseStreamingJson(block.partialJson);
|
|
344
347
|
stream.push({
|
|
345
348
|
type: "toolcall_delta",
|
|
346
349
|
contentIndex: index,
|
|
@@ -500,10 +503,11 @@ function mapThinkingLevelToEffort(model, level) {
|
|
|
500
503
|
}
|
|
501
504
|
/**
|
|
502
505
|
* Resolve cache retention preference.
|
|
503
|
-
*
|
|
506
|
+
* Nova requires explicit opt-in; other models retain the existing env/default policy.
|
|
504
507
|
*/
|
|
505
|
-
function resolveCacheRetention(cacheRetention) {
|
|
508
|
+
function resolveCacheRetention(model, cacheRetention) {
|
|
506
509
|
if (cacheRetention) return cacheRetention;
|
|
510
|
+
if (resolveBedrockPromptCachePolicy(model) === "nova") return "none";
|
|
507
511
|
if (typeof process !== "undefined" && process.env.OPENCLAW_CACHE_RETENTION === "long") return "long";
|
|
508
512
|
return "short";
|
|
509
513
|
}
|
|
@@ -519,9 +523,6 @@ function isAnthropicClaudeModel(model) {
|
|
|
519
523
|
const name = model.name?.toLowerCase() ?? "";
|
|
520
524
|
return id.includes("anthropic.claude") || id.includes("anthropic/claude") || name.includes("anthropic.claude") || name.includes("anthropic/claude") || name.includes("claude");
|
|
521
525
|
}
|
|
522
|
-
function supportsPromptCaching(model) {
|
|
523
|
-
return usesClaudeFable5BedrockContract(model) || supportsBedrockPromptCaching(model.id, model.name) || supportsBedrockPromptCaching(resolveClaudeModelIdentity(model), model.name);
|
|
524
|
-
}
|
|
525
526
|
/**
|
|
526
527
|
* Check if the model supports thinking signatures in reasoningContent.
|
|
527
528
|
* Only Anthropic Claude models support the signature field.
|
|
@@ -533,14 +534,15 @@ function supportsPromptCaching(model) {
|
|
|
533
534
|
function supportsThinkingSignature(model) {
|
|
534
535
|
return isAnthropicClaudeModel(model);
|
|
535
536
|
}
|
|
536
|
-
function buildSystemPrompt(systemPrompt,
|
|
537
|
+
function buildSystemPrompt(systemPrompt, cacheRetention, cachePoint) {
|
|
537
538
|
if (!systemPrompt) return;
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
539
|
+
if (cacheRetention === "none") return [{ text: sanitizeSurrogates(stripSystemPromptCacheBoundary(systemPrompt)) }];
|
|
540
|
+
const split = splitSystemPromptCacheBoundary(systemPrompt);
|
|
541
|
+
const stablePrefix = split?.stablePrefix ?? systemPrompt;
|
|
542
|
+
const blocks = stablePrefix ? [{ text: sanitizeSurrogates(stripSystemPromptCacheBoundary(stablePrefix)) }] : [];
|
|
543
|
+
if (stablePrefix && cachePoint) blocks.push({ cachePoint });
|
|
544
|
+
if (split?.dynamicSuffix) blocks.push({ text: sanitizeSurrogates(stripSystemPromptCacheBoundary(split.dynamicSuffix)) });
|
|
545
|
+
return blocks.length > 0 ? blocks : void 0;
|
|
544
546
|
}
|
|
545
547
|
function normalizeToolCallId(id) {
|
|
546
548
|
const sanitized = id.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
@@ -561,7 +563,7 @@ function createBedrockToolResult(message) {
|
|
|
561
563
|
status: message.isError ? ToolResultStatus.ERROR : ToolResultStatus.SUCCESS
|
|
562
564
|
} };
|
|
563
565
|
}
|
|
564
|
-
function convertMessages(context, model,
|
|
566
|
+
function convertMessages(context, model, cachePoint) {
|
|
565
567
|
const result = [];
|
|
566
568
|
let firstVolatileMessageIndex;
|
|
567
569
|
const transformedMessages = transformMessages(context.messages, model, normalizeToolCallId);
|
|
@@ -581,7 +583,7 @@ function convertMessages(context, model, cacheRetention) {
|
|
|
581
583
|
default: continue;
|
|
582
584
|
}
|
|
583
585
|
if (content.length === 0) continue;
|
|
584
|
-
if (m.runtimeContextCarrier === true && firstVolatileMessageIndex === void 0) firstVolatileMessageIndex = result.length;
|
|
586
|
+
if (m.runtimeContextCarrier === true && !bindsClaudeThinkingPrefix(model) && firstVolatileMessageIndex === void 0) firstVolatileMessageIndex = result.length;
|
|
585
587
|
result.push({
|
|
586
588
|
role: ConversationRole.USER,
|
|
587
589
|
content
|
|
@@ -654,12 +656,9 @@ function convertMessages(context, model, cacheRetention) {
|
|
|
654
656
|
default: continue;
|
|
655
657
|
}
|
|
656
658
|
}
|
|
657
|
-
if (
|
|
659
|
+
if (cachePoint && result.at(-1)?.role === ConversationRole.USER) {
|
|
658
660
|
const cacheAnchor = result.findLast((message, index) => message.role === ConversationRole.USER && (firstVolatileMessageIndex === void 0 || index < firstVolatileMessageIndex));
|
|
659
|
-
if (cacheAnchor?.content) cacheAnchor.content.push({ cachePoint
|
|
660
|
-
type: CachePointType.DEFAULT,
|
|
661
|
-
...cacheRetention === "long" ? { ttl: CacheTTL.ONE_HOUR } : {}
|
|
662
|
-
} });
|
|
661
|
+
if (cacheAnchor?.content) cacheAnchor.content.push({ cachePoint });
|
|
663
662
|
}
|
|
664
663
|
return result;
|
|
665
664
|
}
|
package/dist/thinking-policy.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet5ModelIdentity } from "openclaw/plugin-sdk/
|
|
1
|
+
import { resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet5ModelIdentity } from "openclaw/plugin-sdk/claude-model-runtime";
|
|
2
2
|
//#region extensions/amazon-bedrock/thinking-policy.ts
|
|
3
3
|
const BASE_CLAUDE_THINKING_LEVELS = [
|
|
4
4
|
{ id: "off" },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-bedrock",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1121.0",
|
|
4
4
|
"description": "AWS SDK for JavaScript Bedrock Client for Node.js, Browser and React Native",
|
|
5
5
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-bedrock",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@aws-sdk/core": "^3.977.9",
|
|
50
50
|
"@aws-sdk/credential-provider-node": "^3.972.81",
|
|
51
|
-
"@aws-sdk/token-providers": "3.
|
|
51
|
+
"@aws-sdk/token-providers": "3.1121.0",
|
|
52
52
|
"@aws-sdk/types": "^3.974.5",
|
|
53
53
|
"@smithy/core": "^3.33.3",
|
|
54
54
|
"@smithy/fetch-http-handler": "^5.7.2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-bedrock-runtime",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1121.0",
|
|
4
4
|
"description": "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
|
|
5
5
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-bedrock-runtime",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@aws-sdk/eventstream-handler-node": "^3.972.34",
|
|
60
60
|
"@aws-sdk/middleware-eventstream": "^3.972.29",
|
|
61
61
|
"@aws-sdk/middleware-websocket": "^3.972.52",
|
|
62
|
-
"@aws-sdk/token-providers": "3.
|
|
62
|
+
"@aws-sdk/token-providers": "3.1121.0",
|
|
63
63
|
"@aws-sdk/types": "^3.974.5",
|
|
64
64
|
"@smithy/core": "^3.33.3",
|
|
65
65
|
"@smithy/fetch-http-handler": "^5.7.2",
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/amazon-bedrock-provider",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.4",
|
|
4
4
|
"description": "OpenClaw Amazon Bedrock provider plugin with model discovery, embeddings, and guardrail support.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@aws-sdk/client-bedrock": "3.
|
|
12
|
-
"@aws-sdk/client-bedrock-runtime": "3.
|
|
11
|
+
"@aws-sdk/client-bedrock": "3.1121.0",
|
|
12
|
+
"@aws-sdk/client-bedrock-runtime": "3.1121.0",
|
|
13
13
|
"@aws-sdk/credential-provider-node": "3.972.81",
|
|
14
14
|
"@smithy/node-http-handler": "4.11.3",
|
|
15
15
|
"@smithy/shared-ini-file-loader": "4.7.2",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"minHostVersion": ">=2026.5.12-beta.1"
|
|
26
26
|
},
|
|
27
27
|
"compat": {
|
|
28
|
-
"pluginApi": ">=2026.9.
|
|
28
|
+
"pluginApi": ">=2026.9.4"
|
|
29
29
|
},
|
|
30
30
|
"build": {
|
|
31
|
-
"openclawVersion": "2026.9.
|
|
31
|
+
"openclawVersion": "2026.9.4",
|
|
32
32
|
"bundledDist": false
|
|
33
33
|
},
|
|
34
34
|
"release": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"README.md"
|
|
46
46
|
],
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"openclaw": ">=2026.9.
|
|
48
|
+
"openclaw": ">=2026.9.4"
|
|
49
49
|
},
|
|
50
50
|
"peerDependenciesMeta": {
|
|
51
51
|
"openclaw": {
|