@openclaw/amazon-bedrock-provider 2026.6.11 → 2026.7.1-beta.2

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.
@@ -22,6 +22,15 @@ function normalizeFableToolChoice(toolChoice) {
22
22
  if (toolChoice === "any" || typeof toolChoice === "object" && toolChoice?.type === "tool") return "auto";
23
23
  return toolChoice;
24
24
  }
25
+ const OPENCLAW_FALLBACK_MODEL_MAX_TOKENS = new Set([
26
+ 4096,
27
+ 8192,
28
+ 16384
29
+ ]);
30
+ function resolveAdaptiveBedrockMaxTokens(model, baseMaxTokens) {
31
+ if (baseMaxTokens !== void 0) return baseMaxTokens;
32
+ return OPENCLAW_FALLBACK_MODEL_MAX_TOKENS.has(model.maxTokens) ? void 0 : model.maxTokens;
33
+ }
25
34
  /** Stream a Bedrock Converse request using Bedrock-specific options. */
26
35
  const streamBedrock = (model, context, options = {}) => {
27
36
  const stream = new AssistantMessageEventStream();
@@ -190,6 +199,7 @@ function resolveSimpleBedrockOptions(model, options) {
190
199
  const base = buildBaseOptions(model, options, void 0);
191
200
  if (usesClaudeFable5BedrockContract(model)) return {
192
201
  ...base,
202
+ maxTokens: resolveAdaptiveBedrockMaxTokens(model, base.maxTokens),
193
203
  reasoning: options?.reasoning ?? "high",
194
204
  thinkingBudgets: options?.thinkingBudgets
195
205
  };
@@ -197,12 +207,14 @@ function resolveSimpleBedrockOptions(model, options) {
197
207
  const reasoning = isAnthropicClaudeModel(model) && requiresMandatoryAdaptiveThinking(model) ? "high" : void 0;
198
208
  return {
199
209
  ...base,
210
+ ...reasoning !== void 0 ? { maxTokens: resolveAdaptiveBedrockMaxTokens(model, base.maxTokens) } : {},
200
211
  reasoning
201
212
  };
202
213
  }
203
214
  if (isAnthropicClaudeModel(model)) {
204
215
  if (supportsAdaptiveThinking(model)) return {
205
216
  ...base,
217
+ maxTokens: resolveAdaptiveBedrockMaxTokens(model, base.maxTokens),
206
218
  reasoning: options.reasoning,
207
219
  thinkingBudgets: options.thinkingBudgets
208
220
  };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/amazon-bedrock-provider",
3
- "version": "2026.6.11",
3
+ "version": "2026.7.1-beta.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/amazon-bedrock-provider",
9
- "version": "2026.6.11",
9
+ "version": "2026.7.1-beta.2",
10
10
  "dependencies": {
11
11
  "@aws-sdk/client-bedrock": "3.1056.0",
12
12
  "@aws-sdk/client-bedrock-runtime": "3.1056.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/amazon-bedrock-provider",
3
- "version": "2026.6.11",
3
+ "version": "2026.7.1-beta.2",
4
4
  "description": "OpenClaw Amazon Bedrock provider plugin with model discovery, embeddings, and guardrail support.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,10 +25,10 @@
25
25
  "minHostVersion": ">=2026.5.12-beta.1"
26
26
  },
27
27
  "compat": {
28
- "pluginApi": ">=2026.6.11"
28
+ "pluginApi": ">=2026.7.1-beta.2"
29
29
  },
30
30
  "build": {
31
- "openclawVersion": "2026.6.11",
31
+ "openclawVersion": "2026.7.1-beta.2",
32
32
  "bundledDist": false
33
33
  },
34
34
  "release": {
@@ -46,7 +46,7 @@
46
46
  "README.md"
47
47
  ],
48
48
  "peerDependencies": {
49
- "openclaw": ">=2026.6.11"
49
+ "openclaw": ">=2026.7.1-beta.2"
50
50
  },
51
51
  "peerDependenciesMeta": {
52
52
  "openclaw": {