@openclaw/amazon-bedrock-mantle-provider 2026.7.33 → 2026.7.34

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.
@@ -1,4 +1,4 @@
1
- import { requiresClaudeDefaultSampling, resolveClaudeMythos5ModelIdentity, resolveClaudeSonnet5ModelIdentity } from "openclaw/plugin-sdk/provider-model-shared";
1
+ import { requiresClaudeDefaultSampling, resolveClaudeMythos5ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet5ModelIdentity } from "openclaw/plugin-sdk/provider-model-shared";
2
2
  import Anthropic from "@anthropic-ai/sdk";
3
3
  import { stream } from "openclaw/plugin-sdk/llm";
4
4
  import { buildGuardedModelFetch } from "openclaw/plugin-sdk/provider-transport-runtime";
@@ -18,6 +18,9 @@ function resolveMantleAnthropicBaseUrl(baseUrl) {
18
18
  function isClaudeSonnet5Model(model) {
19
19
  return resolveClaudeSonnet5ModelIdentity(model) !== void 0;
20
20
  }
21
+ function isClaudeOpus5Model(model) {
22
+ return resolveClaudeOpus5ModelIdentity(model) !== void 0;
23
+ }
21
24
  function requiresDefaultSampling(model) {
22
25
  return requiresClaudeDefaultSampling(model);
23
26
  }
@@ -36,16 +39,16 @@ function requiresClaudeMythosAdaptiveThinking(model) {
36
39
  }
37
40
  function resolveMantleReasoning(model, options) {
38
41
  if (model.id.includes("claude-opus-4-7")) return;
39
- const sonnet5 = isClaudeSonnet5Model(model);
42
+ const adaptiveDefaultClaude5 = isClaudeSonnet5Model(model) || isClaudeOpus5Model(model);
40
43
  const mythosPreview = isClaudeMythosPreviewModel(model);
41
44
  const mandatoryMythos = isClaudeMythos5Model(model) || mythosPreview;
42
- const reasoning = options?.reasoning ?? (mandatoryMythos || sonnet5 ? "high" : void 0);
43
- if (sonnet5) return reasoning === "off" || reasoning === "minimal" ? "low" : reasoning;
45
+ const reasoning = options?.reasoning ?? (mandatoryMythos || adaptiveDefaultClaude5 ? "high" : void 0);
46
+ if (adaptiveDefaultClaude5) return reasoning === "off" || reasoning === "minimal" ? "low" : reasoning;
44
47
  if (!mandatoryMythos) return reasoning;
45
48
  if (reasoning === "off" || reasoning === "minimal") return "low";
46
49
  return mythosPreview && (reasoning === "xhigh" || reasoning === "max") ? "high" : reasoning;
47
50
  }
48
- function mapSonnet5Effort(reasoning) {
51
+ function mapClaude5Effort(reasoning) {
49
52
  if (reasoning === "minimal" || reasoning === "low") return "low";
50
53
  if (reasoning === "medium" || reasoning === "xhigh" || reasoning === "max") return reasoning;
51
54
  return "high";
@@ -58,7 +61,7 @@ function mergeHeaders(...headerSources) {
58
61
  function buildMantleAnthropicBaseOptions(model, options, apiKey) {
59
62
  return {
60
63
  ...requiresDefaultSampling(model) ? {} : { temperature: options?.temperature },
61
- maxTokens: options?.maxTokens || (isClaudeSonnet5Model(model) || isClaudeMythos5Model(model) ? model.maxTokens : Math.min(model.maxTokens, 32e3)),
64
+ maxTokens: options?.maxTokens || (isClaudeSonnet5Model(model) || isClaudeOpus5Model(model) || isClaudeMythos5Model(model) ? model.maxTokens : Math.min(model.maxTokens, 32e3)),
62
65
  signal: options?.signal,
63
66
  apiKey,
64
67
  cacheRetention: options?.cacheRetention,
@@ -108,18 +111,18 @@ function createMantleAnthropicStreamFn(deps) {
108
111
  const base = buildMantleAnthropicBaseOptions(model, options, apiKey);
109
112
  const streamClient = client;
110
113
  const reasoning = resolveMantleReasoning(model, options);
111
- const sonnet5 = isClaudeSonnet5Model(model);
114
+ const claude5Effort = isClaudeSonnet5Model(model) || isClaudeOpus5Model(model);
112
115
  const mythos5 = isClaudeMythos5Model(model);
113
116
  if (!reasoning || reasoning === "off") return streamFn(model, context, {
114
117
  ...base,
115
118
  client: streamClient,
116
119
  thinkingEnabled: false
117
120
  });
118
- if (sonnet5 || mythos5) return streamFn(model, context, {
121
+ if (claude5Effort || mythos5) return streamFn(model, context, {
119
122
  ...base,
120
123
  client: streamClient,
121
124
  thinkingEnabled: true,
122
- effort: sonnet5 ? mapSonnet5Effort(reasoning) : reasoning
125
+ effort: claude5Effort ? mapClaude5Effort(reasoning) : reasoning
123
126
  });
124
127
  const adjusted = adjustMaxTokensForThinking(base.maxTokens || 0, model.maxTokens, reasoning, options?.thinkingBudgets);
125
128
  const adaptiveThinking = requiresClaudeMythosAdaptiveThinking(model);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/amazon-bedrock-mantle-provider",
3
- "version": "2026.7.33",
3
+ "version": "2026.7.34",
4
4
  "description": "OpenClaw Amazon Bedrock Mantle provider plugin for OpenAI-compatible model routing.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,10 +21,10 @@
21
21
  "minHostVersion": ">=2026.5.12-beta.1"
22
22
  },
23
23
  "compat": {
24
- "pluginApi": ">=2026.7.33"
24
+ "pluginApi": ">=2026.7.34"
25
25
  },
26
26
  "build": {
27
- "openclawVersion": "2026.7.33",
27
+ "openclawVersion": "2026.7.34",
28
28
  "bundledDist": false
29
29
  },
30
30
  "release": {
@@ -41,7 +41,7 @@
41
41
  "README.md"
42
42
  ],
43
43
  "peerDependencies": {
44
- "openclaw": ">=2026.7.33"
44
+ "openclaw": ">=2026.7.34"
45
45
  },
46
46
  "peerDependenciesMeta": {
47
47
  "openclaw": {