@openclaw/amazon-bedrock-provider 2026.5.12-beta.7

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.
@@ -0,0 +1,20 @@
1
+ import { resolveBedrockConfigApiKey } from "./discovery-shared.js";
2
+ import { migrateAmazonBedrockLegacyConfig } from "./config-compat.js";
3
+ import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
4
+ //#region extensions/amazon-bedrock/setup-api.ts
5
+ var setup_api_default = definePluginEntry({
6
+ id: "amazon-bedrock",
7
+ name: "Amazon Bedrock Setup",
8
+ description: "Lightweight Amazon Bedrock setup hooks",
9
+ register(api) {
10
+ api.registerProvider({
11
+ id: "amazon-bedrock",
12
+ label: "Amazon Bedrock",
13
+ auth: [],
14
+ resolveConfigApiKey: ({ env }) => resolveBedrockConfigApiKey(env)
15
+ });
16
+ api.registerConfigMigration((config) => migrateAmazonBedrockLegacyConfig(config));
17
+ }
18
+ });
19
+ //#endregion
20
+ export { setup_api_default as default };
@@ -0,0 +1,30 @@
1
+ //#region extensions/amazon-bedrock/thinking-policy.ts
2
+ const BASE_CLAUDE_THINKING_LEVELS = [
3
+ { id: "off" },
4
+ { id: "minimal" },
5
+ { id: "low" },
6
+ { id: "medium" },
7
+ { id: "high" }
8
+ ];
9
+ function isOpus47BedrockModelRef(modelRef) {
10
+ return /(?:^|[/.:])(?:(?:us|eu|ap|apac|au|jp|global)\.)?anthropic\.claude-opus-4[.-]7(?:$|[-.:/])/i.test(modelRef);
11
+ }
12
+ function resolveBedrockClaudeThinkingProfile(modelId) {
13
+ const trimmed = modelId.trim();
14
+ if (isOpus47BedrockModelRef(trimmed)) return {
15
+ levels: [
16
+ ...BASE_CLAUDE_THINKING_LEVELS,
17
+ { id: "xhigh" },
18
+ { id: "adaptive" },
19
+ { id: "max" }
20
+ ],
21
+ defaultLevel: "off"
22
+ };
23
+ if (/claude-(?:opus|sonnet)-4(?:\.|-)6(?:$|[-.])/i.test(trimmed)) return {
24
+ levels: [...BASE_CLAUDE_THINKING_LEVELS, { id: "adaptive" }],
25
+ defaultLevel: "adaptive"
26
+ };
27
+ return { levels: BASE_CLAUDE_THINKING_LEVELS };
28
+ }
29
+ //#endregion
30
+ export { isOpus47BedrockModelRef, resolveBedrockClaudeThinkingProfile };
@@ -0,0 +1,80 @@
1
+ {
2
+ "id": "amazon-bedrock",
3
+ "activation": {
4
+ "onStartup": false
5
+ },
6
+ "enabledByDefault": true,
7
+ "providers": ["amazon-bedrock"],
8
+ "contracts": {
9
+ "memoryEmbeddingProviders": ["bedrock"]
10
+ },
11
+ "configSchema": {
12
+ "type": "object",
13
+ "additionalProperties": false,
14
+ "properties": {
15
+ "discovery": {
16
+ "type": "object",
17
+ "additionalProperties": false,
18
+ "properties": {
19
+ "enabled": { "type": "boolean" },
20
+ "region": { "type": "string" },
21
+ "providerFilter": {
22
+ "type": "array",
23
+ "items": { "type": "string" }
24
+ },
25
+ "refreshInterval": { "type": "integer", "minimum": 0 },
26
+ "defaultContextWindow": { "type": "integer", "minimum": 1 },
27
+ "defaultMaxTokens": { "type": "integer", "minimum": 1 }
28
+ }
29
+ },
30
+ "guardrail": {
31
+ "type": "object",
32
+ "additionalProperties": false,
33
+ "properties": {
34
+ "guardrailIdentifier": { "type": "string" },
35
+ "guardrailVersion": { "type": "string" },
36
+ "streamProcessingMode": { "type": "string", "enum": ["sync", "async"] },
37
+ "trace": { "type": "string", "enum": ["enabled", "disabled", "enabled_full"] }
38
+ },
39
+ "required": ["guardrailIdentifier", "guardrailVersion"]
40
+ }
41
+ }
42
+ },
43
+ "configContracts": {
44
+ "compatibilityMigrationPaths": ["models.bedrockDiscovery"]
45
+ },
46
+ "uiHints": {
47
+ "discovery": {
48
+ "label": "Model Discovery",
49
+ "help": "Plugin-owned controls for Amazon Bedrock model auto-discovery."
50
+ },
51
+ "discovery.enabled": {
52
+ "label": "Enable Discovery",
53
+ "help": "When false, OpenClaw keeps the Amazon Bedrock plugin available but skips implicit startup discovery. When true, discovery can run even without AWS auth env markers."
54
+ },
55
+ "discovery.region": {
56
+ "label": "Discovery Region",
57
+ "help": "AWS region to use for Bedrock model discovery. Defaults to AWS_REGION, AWS_DEFAULT_REGION, then us-east-1."
58
+ },
59
+ "discovery.providerFilter": {
60
+ "label": "Provider Filter",
61
+ "help": "Optional Bedrock provider-name allowlist for discovery, such as anthropic or amazon."
62
+ },
63
+ "discovery.refreshInterval": {
64
+ "label": "Discovery Refresh Interval (s)",
65
+ "help": "How long to cache Bedrock discovery results in seconds. Set to 0 to disable caching."
66
+ },
67
+ "discovery.defaultContextWindow": {
68
+ "label": "Default Context Window",
69
+ "help": "Fallback context window to assign to discovered Bedrock models."
70
+ },
71
+ "discovery.defaultMaxTokens": {
72
+ "label": "Default Max Tokens",
73
+ "help": "Fallback max output tokens to assign to discovered Bedrock models."
74
+ },
75
+ "guardrail": {
76
+ "label": "Guardrail",
77
+ "help": "Amazon Bedrock Guardrails settings applied to Bedrock model invocations."
78
+ }
79
+ }
80
+ }
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@openclaw/amazon-bedrock-provider",
3
+ "version": "2026.5.12-beta.7",
4
+ "description": "OpenClaw Amazon Bedrock provider plugin",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/openclaw/openclaw"
8
+ },
9
+ "type": "module",
10
+ "dependencies": {
11
+ "@aws-sdk/client-bedrock": "3.1045.0",
12
+ "@aws-sdk/client-bedrock-runtime": "3.1045.0",
13
+ "@aws-sdk/credential-provider-node": "3.972.39",
14
+ "@earendil-works/pi-ai": "0.74.0",
15
+ "@smithy/shared-ini-file-loader": "4.5.1"
16
+ },
17
+ "devDependencies": {
18
+ "@openclaw/plugin-sdk": "workspace:*"
19
+ },
20
+ "openclaw": {
21
+ "extensions": [
22
+ "./index.ts"
23
+ ],
24
+ "install": {
25
+ "npmSpec": "@openclaw/amazon-bedrock-provider",
26
+ "defaultChoice": "npm",
27
+ "minHostVersion": ">=2026.5.12-beta.6"
28
+ },
29
+ "compat": {
30
+ "pluginApi": ">=2026.5.12-beta.7"
31
+ },
32
+ "build": {
33
+ "openclawVersion": "2026.5.12-beta.7",
34
+ "bundledDist": false
35
+ },
36
+ "release": {
37
+ "publishToNpm": true
38
+ },
39
+ "runtimeExtensions": [
40
+ "./dist/index.js"
41
+ ]
42
+ },
43
+ "files": [
44
+ "dist/**",
45
+ "openclaw.plugin.json"
46
+ ],
47
+ "peerDependencies": {
48
+ "openclaw": ">=2026.5.12-beta.7"
49
+ },
50
+ "peerDependenciesMeta": {
51
+ "openclaw": {
52
+ "optional": true
53
+ }
54
+ }
55
+ }