Skip to content

Commit d6081f9

Browse files
committed
fix(bedrock): keep optional thinking opt-in
1 parent 819fc00 commit d6081f9

3 files changed

Lines changed: 5 additions & 10 deletions

File tree

docs/providers/bedrock-mantle.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ Choose your preferred auth method and follow the setup steps.
4242
Claude Fable 5 and Claude Mythos-class Bedrock models require the Mantle Data Retention API mode `provider_data_share` before invocation. This opt-in allows Bedrock to share prompts and completions with Anthropic and retain them for up to 30 days for trust and safety review.
4343

4444
```bash
45-
curl -X PUT https://bedrock-mantle.us-east-1.api.aws/v1/data_retention \
45+
AWS_REGION="${AWS_REGION:-us-east-1}"
46+
curl -X PUT "https://bedrock-mantle.${AWS_REGION}.api.aws/v1/data_retention" \
4647
-H "Authorization: Bearer $AWS_BEARER_TOKEN_BEDROCK" \
4748
-H "Content-Type: application/json" \
4849
-d '{ "mode": "provider_data_share" }'

extensions/amazon-bedrock/stream.runtime.test.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,19 +167,16 @@ describe("Bedrock profile endpoint resolution", () => {
167167
});
168168

169169
describe("Bedrock thinking effort mapping", () => {
170-
it("forces adaptive thinking for mandatory Claude models when callers omit reasoning", () => {
170+
it("does not force adaptive thinking for optional Claude models when callers omit reasoning", () => {
171171
const model = bedrockModel({
172172
id: "anthropic.claude-sonnet-4-6-v1:0",
173173
name: "Claude Sonnet 4.6",
174174
reasoning: true,
175175
});
176176
const options = testing.resolveSimpleBedrockOptions(model, {});
177177

178-
expect(options.reasoning).toBe("high");
179-
expect(testing.buildAdditionalModelRequestFields(model, options)).toEqual({
180-
thinking: { type: "adaptive", display: "summarized" },
181-
output_config: { effort: "high" },
182-
});
178+
expect(options.reasoning).toBeUndefined();
179+
expect(testing.buildAdditionalModelRequestFields(model, options)).toBeUndefined();
183180
});
184181

185182
it("forces adaptive thinking for Bedrock Mythos Preview when callers omit reasoning", () => {

extensions/amazon-bedrock/stream.runtime.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ import {
5353
type ToolResultMessage,
5454
} from "openclaw/plugin-sdk/llm";
5555
import {
56-
isClaudeAdaptiveThinkingDefaultModelId,
5756
resolveClaudeFable5ModelIdentity,
5857
resolveClaudeModelIdentity,
5958
supportsClaudeAdaptiveThinking,
@@ -592,8 +591,6 @@ function supportsAdaptiveThinking(model: Model<"bedrock-converse-stream">): bool
592591
function requiresMandatoryAdaptiveThinking(model: Model<"bedrock-converse-stream">): boolean {
593592
const profileModelId = resolveClaudeProfileNameModelId(model.name);
594593
return (
595-
isClaudeAdaptiveThinkingDefaultModelId(resolveClaudeModelIdentity(model)) ||
596-
(profileModelId ? isClaudeAdaptiveThinkingDefaultModelId(profileModelId) : false) ||
597594
isClaudeMythosPreviewModelId(resolveClaudeModelIdentity(model)) ||
598595
isClaudeMythosPreviewModelId(profileModelId)
599596
);

0 commit comments

Comments
 (0)