@ai-sdk/amazon-bedrock 4.0.103 → 4.0.104

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/amazon-bedrock",
3
- "version": "4.0.103",
3
+ "version": "4.0.104",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -47,8 +47,8 @@
47
47
  "tsup": "^8.3.0",
48
48
  "typescript": "5.8.3",
49
49
  "zod": "3.25.76",
50
- "@ai-sdk/test-server": "1.0.5",
51
- "@vercel/ai-tsconfig": "0.0.0"
50
+ "@vercel/ai-tsconfig": "0.0.0",
51
+ "@ai-sdk/test-server": "1.0.5"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "zod": "^3.25.76 || ^4.1.8"
@@ -319,35 +319,11 @@ export async function convertToBedrockChatMessages(
319
319
  },
320
320
  },
321
321
  });
322
- } else if (
323
- part.providerOptions == null ||
324
- Object.keys(part.providerOptions).every(
325
- k => k === 'bedrock' || k === 'amazonBedrock',
326
- )
327
- ) {
328
- // No foreign-provider metadata — preserve text. This covers
329
- // the prefill case where the caller hand-crafts a reasoning
330
- // block without a signature. Forwarding reasoning that was
331
- // signed by a different provider (e.g. anthropic) would
332
- // cause Bedrock to reject with
333
- // `thinking.signature: Field required`, so we drop those.
334
- // trim the last text part if it's the last message in the
335
- // block because Bedrock does not allow trailing whitespace
336
- // in pre-filled assistant responses
337
- bedrockContent.push({
338
- reasoningContent: {
339
- reasoningText: {
340
- text: trimIfLast(
341
- isLastBlock,
342
- isLastMessage,
343
- isLastContentPart,
344
- part.text,
345
- ),
346
- },
347
- },
348
- });
349
322
  }
350
-
323
+ // Unsigned reasoning is intentionally not replayed. Some
324
+ // Bedrock models (for example OpenAI gpt-oss) return reasoning
325
+ // without a signature; sending it back in multi-turn tool use
326
+ // can leak raw reasoning into the visible response.
351
327
  break;
352
328
  }
353
329