@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/CHANGELOG.md +12 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +24 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -20
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +5 -0
- package/dist/internal/index.d.ts +5 -0
- package/dist/internal/index.js +23 -19
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +23 -19
- package/dist/internal/index.mjs.map +1 -1
- package/docs/05-anthropic.mdx +3 -2
- package/package.json +1 -1
- package/src/anthropic-messages-api.ts +18 -18
- package/src/anthropic-messages-language-model.ts +2 -2
- package/src/tool/text-editor_20241022.ts +7 -1
- package/src/tool/text-editor_20250124.ts +7 -1
- package/src/tool/text-editor_20250429.ts +7 -1
- package/src/tool/text-editor_20250728.ts +7 -1
package/dist/internal/index.mjs
CHANGED
|
@@ -646,22 +646,6 @@ var anthropicMessagesChunkSchema = lazySchema2(
|
|
|
646
646
|
version: z2.string()
|
|
647
647
|
})
|
|
648
648
|
).nullish()
|
|
649
|
-
}).nullish(),
|
|
650
|
-
context_management: z2.object({
|
|
651
|
-
applied_edits: z2.array(
|
|
652
|
-
z2.union([
|
|
653
|
-
z2.object({
|
|
654
|
-
type: z2.literal("clear_tool_uses_20250919"),
|
|
655
|
-
cleared_tool_uses: z2.number(),
|
|
656
|
-
cleared_input_tokens: z2.number()
|
|
657
|
-
}),
|
|
658
|
-
z2.object({
|
|
659
|
-
type: z2.literal("clear_thinking_20251015"),
|
|
660
|
-
cleared_thinking_turns: z2.number(),
|
|
661
|
-
cleared_input_tokens: z2.number()
|
|
662
|
-
})
|
|
663
|
-
])
|
|
664
|
-
)
|
|
665
649
|
}).nullish()
|
|
666
650
|
}),
|
|
667
651
|
usage: z2.looseObject({
|
|
@@ -669,7 +653,23 @@ var anthropicMessagesChunkSchema = lazySchema2(
|
|
|
669
653
|
output_tokens: z2.number(),
|
|
670
654
|
cache_creation_input_tokens: z2.number().nullish(),
|
|
671
655
|
cache_read_input_tokens: z2.number().nullish()
|
|
672
|
-
})
|
|
656
|
+
}),
|
|
657
|
+
context_management: z2.object({
|
|
658
|
+
applied_edits: z2.array(
|
|
659
|
+
z2.union([
|
|
660
|
+
z2.object({
|
|
661
|
+
type: z2.literal("clear_tool_uses_20250919"),
|
|
662
|
+
cleared_tool_uses: z2.number(),
|
|
663
|
+
cleared_input_tokens: z2.number()
|
|
664
|
+
}),
|
|
665
|
+
z2.object({
|
|
666
|
+
type: z2.literal("clear_thinking_20251015"),
|
|
667
|
+
cleared_thinking_turns: z2.number(),
|
|
668
|
+
cleared_input_tokens: z2.number()
|
|
669
|
+
})
|
|
670
|
+
])
|
|
671
|
+
)
|
|
672
|
+
}).nullish()
|
|
673
673
|
}),
|
|
674
674
|
z2.object({
|
|
675
675
|
type: z2.literal("message_stop")
|
|
@@ -902,6 +902,7 @@ var textEditor_20250728InputSchema = lazySchema3(
|
|
|
902
902
|
file_text: z4.string().optional(),
|
|
903
903
|
insert_line: z4.number().int().optional(),
|
|
904
904
|
new_str: z4.string().optional(),
|
|
905
|
+
insert_text: z4.string().optional(),
|
|
905
906
|
old_str: z4.string().optional(),
|
|
906
907
|
view_range: z4.array(z4.number().int()).optional()
|
|
907
908
|
})
|
|
@@ -3836,9 +3837,9 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
3836
3837
|
version: skill.version
|
|
3837
3838
|
}))) != null ? _m : null
|
|
3838
3839
|
} : null;
|
|
3839
|
-
if (value.
|
|
3840
|
+
if (value.context_management) {
|
|
3840
3841
|
contextManagement = mapAnthropicResponseContextManagement(
|
|
3841
|
-
value.
|
|
3842
|
+
value.context_management
|
|
3842
3843
|
);
|
|
3843
3844
|
}
|
|
3844
3845
|
rawUsage = {
|
|
@@ -4207,6 +4208,7 @@ var textEditor_20241022InputSchema = lazySchema15(
|
|
|
4207
4208
|
file_text: z16.string().optional(),
|
|
4208
4209
|
insert_line: z16.number().int().optional(),
|
|
4209
4210
|
new_str: z16.string().optional(),
|
|
4211
|
+
insert_text: z16.string().optional(),
|
|
4210
4212
|
old_str: z16.string().optional(),
|
|
4211
4213
|
view_range: z16.array(z16.number().int()).optional()
|
|
4212
4214
|
})
|
|
@@ -4232,6 +4234,7 @@ var textEditor_20250124InputSchema = lazySchema16(
|
|
|
4232
4234
|
file_text: z17.string().optional(),
|
|
4233
4235
|
insert_line: z17.number().int().optional(),
|
|
4234
4236
|
new_str: z17.string().optional(),
|
|
4237
|
+
insert_text: z17.string().optional(),
|
|
4235
4238
|
old_str: z17.string().optional(),
|
|
4236
4239
|
view_range: z17.array(z17.number().int()).optional()
|
|
4237
4240
|
})
|
|
@@ -4257,6 +4260,7 @@ var textEditor_20250429InputSchema = lazySchema17(
|
|
|
4257
4260
|
file_text: z18.string().optional(),
|
|
4258
4261
|
insert_line: z18.number().int().optional(),
|
|
4259
4262
|
new_str: z18.string().optional(),
|
|
4263
|
+
insert_text: z18.string().optional(),
|
|
4260
4264
|
old_str: z18.string().optional(),
|
|
4261
4265
|
view_range: z18.array(z18.number().int()).optional()
|
|
4262
4266
|
})
|