@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.
@@ -620,7 +620,7 @@ var anthropicMessagesChunkSchema = (0, import_provider_utils2.lazySchema)(
620
620
  }),
621
621
  import_v42.z.object({
622
622
  type: import_v42.z.literal("compaction_delta"),
623
- content: import_v42.z.string()
623
+ content: import_v42.z.string().nullish()
624
624
  }),
625
625
  import_v42.z.object({
626
626
  type: import_v42.z.literal("citations_delta"),
@@ -3826,11 +3826,13 @@ var AnthropicMessagesLanguageModel = class {
3826
3826
  return;
3827
3827
  }
3828
3828
  case "compaction_delta": {
3829
- controller.enqueue({
3830
- type: "text-delta",
3831
- id: String(value.index),
3832
- delta: value.delta.content
3833
- });
3829
+ if (value.delta.content != null) {
3830
+ controller.enqueue({
3831
+ type: "text-delta",
3832
+ id: String(value.index),
3833
+ delta: value.delta.content
3834
+ });
3835
+ }
3834
3836
  return;
3835
3837
  }
3836
3838
  case "input_json_delta": {