@ai-sdk/anthropic 2.0.65 → 2.0.67

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.
@@ -484,7 +484,7 @@ var anthropicMessagesChunkSchema = (0, import_provider_utils2.lazySchema)(
484
484
  }),
485
485
  import_v42.z.object({
486
486
  type: import_v42.z.literal("compaction_delta"),
487
- content: import_v42.z.string()
487
+ content: import_v42.z.string().nullish()
488
488
  }),
489
489
  import_v42.z.object({
490
490
  type: import_v42.z.literal("citations_delta"),
@@ -2036,6 +2036,9 @@ var AnthropicMessagesLanguageModel = class {
2036
2036
  ...(anthropicOptions == null ? void 0 : anthropicOptions.speed) && {
2037
2037
  speed: anthropicOptions.speed
2038
2038
  },
2039
+ ...(anthropicOptions == null ? void 0 : anthropicOptions.cacheControl) && {
2040
+ cache_control: anthropicOptions.cacheControl
2041
+ },
2039
2042
  // structured output:
2040
2043
  ...useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && {
2041
2044
  output_format: {
@@ -2953,11 +2956,13 @@ var AnthropicMessagesLanguageModel = class {
2953
2956
  return;
2954
2957
  }
2955
2958
  case "compaction_delta": {
2956
- controller.enqueue({
2957
- type: "text-delta",
2958
- id: String(value.index),
2959
- delta: value.delta.content
2960
- });
2959
+ if (value.delta.content != null) {
2960
+ controller.enqueue({
2961
+ type: "text-delta",
2962
+ id: String(value.index),
2963
+ delta: value.delta.content
2964
+ });
2965
+ }
2961
2966
  return;
2962
2967
  }
2963
2968
  case "input_json_delta": {