@ai-sdk/anthropic 3.0.31 → 3.0.33

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.31" : "0.0.0-test";
15
+ var VERSION = true ? "3.0.33" : "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")
@@ -918,6 +918,7 @@ var textEditor_20250728InputSchema = lazySchema3(
918
918
  file_text: z4.string().optional(),
919
919
  insert_line: z4.number().int().optional(),
920
920
  new_str: z4.string().optional(),
921
+ insert_text: z4.string().optional(),
921
922
  old_str: z4.string().optional(),
922
923
  view_range: z4.array(z4.number().int()).optional()
923
924
  })
@@ -3852,9 +3853,9 @@ var AnthropicMessagesLanguageModel = class {
3852
3853
  version: skill.version
3853
3854
  }))) != null ? _m : null
3854
3855
  } : null;
3855
- if (value.delta.context_management) {
3856
+ if (value.context_management) {
3856
3857
  contextManagement = mapAnthropicResponseContextManagement(
3857
- value.delta.context_management
3858
+ value.context_management
3858
3859
  );
3859
3860
  }
3860
3861
  rawUsage = {
@@ -4223,6 +4224,7 @@ var textEditor_20241022InputSchema = lazySchema15(
4223
4224
  file_text: z16.string().optional(),
4224
4225
  insert_line: z16.number().int().optional(),
4225
4226
  new_str: z16.string().optional(),
4227
+ insert_text: z16.string().optional(),
4226
4228
  old_str: z16.string().optional(),
4227
4229
  view_range: z16.array(z16.number().int()).optional()
4228
4230
  })
@@ -4248,6 +4250,7 @@ var textEditor_20250124InputSchema = lazySchema16(
4248
4250
  file_text: z17.string().optional(),
4249
4251
  insert_line: z17.number().int().optional(),
4250
4252
  new_str: z17.string().optional(),
4253
+ insert_text: z17.string().optional(),
4251
4254
  old_str: z17.string().optional(),
4252
4255
  view_range: z17.array(z17.number().int()).optional()
4253
4256
  })
@@ -4273,6 +4276,7 @@ var textEditor_20250429InputSchema = lazySchema17(
4273
4276
  file_text: z18.string().optional(),
4274
4277
  insert_line: z18.number().int().optional(),
4275
4278
  new_str: z18.string().optional(),
4279
+ insert_text: z18.string().optional(),
4276
4280
  old_str: z18.string().optional(),
4277
4281
  view_range: z18.array(z18.number().int()).optional()
4278
4282
  })