@ai-sdk/amazon-bedrock 5.0.121 → 5.0.122

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/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @ai-sdk/amazon-bedrock
2
2
 
3
+ ## 5.0.122
4
+
5
+ ### Patch Changes
6
+
7
+ - 43ad966: Report `interrupted` when a stream ends cleanly without its provider completion signal, preserving partial output without emitting an error solely for the interruption.
8
+
9
+ This applies to OpenAI (Chat, Responses, and Completions), Anthropic, Google (Generate Content and Interactions), Alibaba, Amazon Bedrock Converse, Cohere, DeepSeek, Groq, Hugging Face Responses, Mistral Chat, Moonshot AI, Open Responses, Perplexity, and xAI Responses. It also covers cutoffs in later Anthropic messages and Google automatic continuations.
10
+
11
+ **Compatibility notice:** These streams previously fell back to `other` or omitted the finish part. Applications must now handle `interrupted` in finish-reason switches, mappings, and custom validation. Check `finishReason === 'interrupted'` to detect incomplete responses; interruption alone does not trigger error handling.
12
+
13
+ Explicit unknown completion reasons still map to `other`. Actual provider, parsing, and transport errors retain their error paths; affected error paths that previously left the finish reason as `other` now report `error`. OpenAI-compatible remains unchanged.
14
+
15
+ - Updated dependencies [43ad966]
16
+ - Updated dependencies [10026d1]
17
+ - Updated dependencies [aac6026]
18
+ - @ai-sdk/openai@4.0.100
19
+ - @ai-sdk/anthropic@4.0.86
20
+ - @ai-sdk/provider@4.0.32
21
+ - @ai-sdk/provider-utils@5.0.66
22
+
3
23
  ## 5.0.121
4
24
 
5
25
  ### Patch Changes
@@ -6,7 +6,7 @@ import { z } from "zod/v4";
6
6
  import { EventStreamCodec } from "@smithy/eventstream-codec";
7
7
  import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
8
8
  //#region src/version.ts
9
- const VERSION = "5.0.121";
9
+ const VERSION = "5.0.122";
10
10
  //#endregion
11
11
  //#region src/amazon-bedrock-sigv4-fetch.ts
12
12
  /**
package/dist/index.js CHANGED
@@ -1435,7 +1435,7 @@ var AmazonBedrockChatLanguageModel = class AmazonBedrockChatLanguageModel {
1435
1435
  fetch: this.config.fetch
1436
1436
  });
1437
1437
  let finishReason = {
1438
- unified: "other",
1438
+ unified: "interrupted",
1439
1439
  raw: void 0
1440
1440
  };
1441
1441
  let usage = void 0;
@@ -2334,7 +2334,7 @@ const amazonBedrockImageResponseSchema = lazySchema(() => zodSchema(z.object({
2334
2334
  })));
2335
2335
  //#endregion
2336
2336
  //#region src/version.ts
2337
- const VERSION = "5.0.121";
2337
+ const VERSION = "5.0.122";
2338
2338
  //#endregion
2339
2339
  //#region src/amazon-bedrock-sigv4-fetch.ts
2340
2340
  /**