@ai-sdk/anthropic 3.0.32 → 3.0.34

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.32" : "0.0.0-test";
15
+ var VERSION = true ? "3.0.34" : "0.0.0-test";
16
16
 
17
17
  // src/anthropic-messages-language-model.ts
18
18
  import {
@@ -662,22 +662,6 @@ var anthropicMessagesChunkSchema = lazySchema2(
662
662
  version: z2.string()
663
663
  })
664
664
  ).nullish()
665
- }).nullish(),
666
- context_management: z2.object({
667
- applied_edits: z2.array(
668
- z2.union([
669
- z2.object({
670
- type: z2.literal("clear_tool_uses_20250919"),
671
- cleared_tool_uses: z2.number(),
672
- cleared_input_tokens: z2.number()
673
- }),
674
- z2.object({
675
- type: z2.literal("clear_thinking_20251015"),
676
- cleared_thinking_turns: z2.number(),
677
- cleared_input_tokens: z2.number()
678
- })
679
- ])
680
- )
681
665
  }).nullish()
682
666
  }),
683
667
  usage: z2.looseObject({
@@ -685,7 +669,23 @@ var anthropicMessagesChunkSchema = lazySchema2(
685
669
  output_tokens: z2.number(),
686
670
  cache_creation_input_tokens: z2.number().nullish(),
687
671
  cache_read_input_tokens: z2.number().nullish()
688
- })
672
+ }),
673
+ context_management: z2.object({
674
+ applied_edits: z2.array(
675
+ z2.union([
676
+ z2.object({
677
+ type: z2.literal("clear_tool_uses_20250919"),
678
+ cleared_tool_uses: z2.number(),
679
+ cleared_input_tokens: z2.number()
680
+ }),
681
+ z2.object({
682
+ type: z2.literal("clear_thinking_20251015"),
683
+ cleared_thinking_turns: z2.number(),
684
+ cleared_input_tokens: z2.number()
685
+ })
686
+ ])
687
+ )
688
+ }).nullish()
689
689
  }),
690
690
  z2.object({
691
691
  type: z2.literal("message_stop")
@@ -3853,9 +3853,9 @@ var AnthropicMessagesLanguageModel = class {
3853
3853
  version: skill.version
3854
3854
  }))) != null ? _m : null
3855
3855
  } : null;
3856
- if (value.delta.context_management) {
3856
+ if (value.context_management) {
3857
3857
  contextManagement = mapAnthropicResponseContextManagement(
3858
- value.delta.context_management
3858
+ value.context_management
3859
3859
  );
3860
3860
  }
3861
3861
  rawUsage = {