@ai-sdk/anthropic 3.0.45 → 3.0.46

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/dist/index.mjs CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  } from "@ai-sdk/provider-utils";
13
13
 
14
14
  // src/version.ts
15
- var VERSION = true ? "3.0.45" : "0.0.0-test";
15
+ var VERSION = true ? "3.0.46" : "0.0.0-test";
16
16
 
17
17
  // src/anthropic-messages-language-model.ts
18
18
  import {
@@ -623,7 +623,7 @@ var anthropicMessagesChunkSchema = lazySchema2(
623
623
  }),
624
624
  z2.object({
625
625
  type: z2.literal("compaction_delta"),
626
- content: z2.string()
626
+ content: z2.string().nullish()
627
627
  }),
628
628
  z2.object({
629
629
  type: z2.literal("citations_delta"),
@@ -3858,11 +3858,13 @@ var AnthropicMessagesLanguageModel = class {
3858
3858
  return;
3859
3859
  }
3860
3860
  case "compaction_delta": {
3861
- controller.enqueue({
3862
- type: "text-delta",
3863
- id: String(value.index),
3864
- delta: value.delta.content
3865
- });
3861
+ if (value.delta.content != null) {
3862
+ controller.enqueue({
3863
+ type: "text-delta",
3864
+ id: String(value.index),
3865
+ delta: value.delta.content
3866
+ });
3867
+ }
3866
3868
  return;
3867
3869
  }
3868
3870
  case "input_json_delta": {