@ai-sdk/anthropic 3.0.9 → 3.0.10

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.
@@ -665,6 +665,7 @@ var anthropicMessagesChunkSchema = lazySchema2(
665
665
  }).nullish()
666
666
  }),
667
667
  usage: z2.looseObject({
668
+ input_tokens: z2.number().nullish(),
668
669
  output_tokens: z2.number(),
669
670
  cache_creation_input_tokens: z2.number().nullish()
670
671
  })
@@ -3682,6 +3683,9 @@ var AnthropicMessagesLanguageModel = class {
3682
3683
  return;
3683
3684
  }
3684
3685
  case "message_delta": {
3686
+ if (value.usage.input_tokens != null && usage.input_tokens !== value.usage.input_tokens) {
3687
+ usage.input_tokens = value.usage.input_tokens;
3688
+ }
3685
3689
  usage.output_tokens = value.usage.output_tokens;
3686
3690
  finishReason = {
3687
3691
  unified: mapAnthropicStopReason({