@ai-sdk/anthropic 3.0.27 → 3.0.29

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.
@@ -680,7 +680,8 @@ var anthropicMessagesChunkSchema = (0, import_provider_utils2.lazySchema)(
680
680
  usage: import_v42.z.looseObject({
681
681
  input_tokens: import_v42.z.number().nullish(),
682
682
  output_tokens: import_v42.z.number(),
683
- cache_creation_input_tokens: import_v42.z.number().nullish()
683
+ cache_creation_input_tokens: import_v42.z.number().nullish(),
684
+ cache_read_input_tokens: import_v42.z.number().nullish()
684
685
  })
685
686
  }),
686
687
  import_v42.z.object({
@@ -3795,6 +3796,13 @@ var AnthropicMessagesLanguageModel = class {
3795
3796
  usage.input_tokens = value.usage.input_tokens;
3796
3797
  }
3797
3798
  usage.output_tokens = value.usage.output_tokens;
3799
+ if (value.usage.cache_read_input_tokens != null) {
3800
+ usage.cache_read_input_tokens = value.usage.cache_read_input_tokens;
3801
+ }
3802
+ if (value.usage.cache_creation_input_tokens != null) {
3803
+ usage.cache_creation_input_tokens = value.usage.cache_creation_input_tokens;
3804
+ cacheCreationInputTokens = value.usage.cache_creation_input_tokens;
3805
+ }
3798
3806
  finishReason = {
3799
3807
  unified: mapAnthropicStopReason({
3800
3808
  finishReason: value.delta.stop_reason,