@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
|
@@ -348,6 +348,7 @@ declare const anthropicTools: {
|
|
|
348
348
|
file_text?: string;
|
|
349
349
|
insert_line?: number;
|
|
350
350
|
new_str?: string;
|
|
351
|
+
insert_text?: string;
|
|
351
352
|
old_str?: string;
|
|
352
353
|
view_range?: number[];
|
|
353
354
|
}, {}>;
|
|
@@ -364,6 +365,7 @@ declare const anthropicTools: {
|
|
|
364
365
|
file_text?: string;
|
|
365
366
|
insert_line?: number;
|
|
366
367
|
new_str?: string;
|
|
368
|
+
insert_text?: string;
|
|
367
369
|
old_str?: string;
|
|
368
370
|
view_range?: number[];
|
|
369
371
|
}, {}>;
|
|
@@ -382,6 +384,7 @@ declare const anthropicTools: {
|
|
|
382
384
|
file_text?: string;
|
|
383
385
|
insert_line?: number;
|
|
384
386
|
new_str?: string;
|
|
387
|
+
insert_text?: string;
|
|
385
388
|
old_str?: string;
|
|
386
389
|
view_range?: number[];
|
|
387
390
|
}, {}>;
|
|
@@ -402,6 +405,7 @@ declare const anthropicTools: {
|
|
|
402
405
|
file_text?: string;
|
|
403
406
|
insert_line?: number;
|
|
404
407
|
new_str?: string;
|
|
408
|
+
insert_text?: string;
|
|
405
409
|
old_str?: string;
|
|
406
410
|
view_range?: number[];
|
|
407
411
|
}, {
|
|
@@ -412,6 +416,7 @@ declare const anthropicTools: {
|
|
|
412
416
|
file_text?: string;
|
|
413
417
|
insert_line?: number;
|
|
414
418
|
new_str?: string;
|
|
419
|
+
insert_text?: string;
|
|
415
420
|
old_str?: string;
|
|
416
421
|
view_range?: number[];
|
|
417
422
|
}, unknown>;
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -348,6 +348,7 @@ declare const anthropicTools: {
|
|
|
348
348
|
file_text?: string;
|
|
349
349
|
insert_line?: number;
|
|
350
350
|
new_str?: string;
|
|
351
|
+
insert_text?: string;
|
|
351
352
|
old_str?: string;
|
|
352
353
|
view_range?: number[];
|
|
353
354
|
}, {}>;
|
|
@@ -364,6 +365,7 @@ declare const anthropicTools: {
|
|
|
364
365
|
file_text?: string;
|
|
365
366
|
insert_line?: number;
|
|
366
367
|
new_str?: string;
|
|
368
|
+
insert_text?: string;
|
|
367
369
|
old_str?: string;
|
|
368
370
|
view_range?: number[];
|
|
369
371
|
}, {}>;
|
|
@@ -382,6 +384,7 @@ declare const anthropicTools: {
|
|
|
382
384
|
file_text?: string;
|
|
383
385
|
insert_line?: number;
|
|
384
386
|
new_str?: string;
|
|
387
|
+
insert_text?: string;
|
|
385
388
|
old_str?: string;
|
|
386
389
|
view_range?: number[];
|
|
387
390
|
}, {}>;
|
|
@@ -402,6 +405,7 @@ declare const anthropicTools: {
|
|
|
402
405
|
file_text?: string;
|
|
403
406
|
insert_line?: number;
|
|
404
407
|
new_str?: string;
|
|
408
|
+
insert_text?: string;
|
|
405
409
|
old_str?: string;
|
|
406
410
|
view_range?: number[];
|
|
407
411
|
}, {
|
|
@@ -412,6 +416,7 @@ declare const anthropicTools: {
|
|
|
412
416
|
file_text?: string;
|
|
413
417
|
insert_line?: number;
|
|
414
418
|
new_str?: string;
|
|
419
|
+
insert_text?: string;
|
|
415
420
|
old_str?: string;
|
|
416
421
|
view_range?: number[];
|
|
417
422
|
}, unknown>;
|
package/dist/internal/index.js
CHANGED
|
@@ -659,22 +659,6 @@ var anthropicMessagesChunkSchema = (0, import_provider_utils2.lazySchema)(
|
|
|
659
659
|
version: import_v42.z.string()
|
|
660
660
|
})
|
|
661
661
|
).nullish()
|
|
662
|
-
}).nullish(),
|
|
663
|
-
context_management: import_v42.z.object({
|
|
664
|
-
applied_edits: import_v42.z.array(
|
|
665
|
-
import_v42.z.union([
|
|
666
|
-
import_v42.z.object({
|
|
667
|
-
type: import_v42.z.literal("clear_tool_uses_20250919"),
|
|
668
|
-
cleared_tool_uses: import_v42.z.number(),
|
|
669
|
-
cleared_input_tokens: import_v42.z.number()
|
|
670
|
-
}),
|
|
671
|
-
import_v42.z.object({
|
|
672
|
-
type: import_v42.z.literal("clear_thinking_20251015"),
|
|
673
|
-
cleared_thinking_turns: import_v42.z.number(),
|
|
674
|
-
cleared_input_tokens: import_v42.z.number()
|
|
675
|
-
})
|
|
676
|
-
])
|
|
677
|
-
)
|
|
678
662
|
}).nullish()
|
|
679
663
|
}),
|
|
680
664
|
usage: import_v42.z.looseObject({
|
|
@@ -682,7 +666,23 @@ var anthropicMessagesChunkSchema = (0, import_provider_utils2.lazySchema)(
|
|
|
682
666
|
output_tokens: import_v42.z.number(),
|
|
683
667
|
cache_creation_input_tokens: import_v42.z.number().nullish(),
|
|
684
668
|
cache_read_input_tokens: import_v42.z.number().nullish()
|
|
685
|
-
})
|
|
669
|
+
}),
|
|
670
|
+
context_management: import_v42.z.object({
|
|
671
|
+
applied_edits: import_v42.z.array(
|
|
672
|
+
import_v42.z.union([
|
|
673
|
+
import_v42.z.object({
|
|
674
|
+
type: import_v42.z.literal("clear_tool_uses_20250919"),
|
|
675
|
+
cleared_tool_uses: import_v42.z.number(),
|
|
676
|
+
cleared_input_tokens: import_v42.z.number()
|
|
677
|
+
}),
|
|
678
|
+
import_v42.z.object({
|
|
679
|
+
type: import_v42.z.literal("clear_thinking_20251015"),
|
|
680
|
+
cleared_thinking_turns: import_v42.z.number(),
|
|
681
|
+
cleared_input_tokens: import_v42.z.number()
|
|
682
|
+
})
|
|
683
|
+
])
|
|
684
|
+
)
|
|
685
|
+
}).nullish()
|
|
686
686
|
}),
|
|
687
687
|
import_v42.z.object({
|
|
688
688
|
type: import_v42.z.literal("message_stop")
|
|
@@ -913,6 +913,7 @@ var textEditor_20250728InputSchema = (0, import_provider_utils4.lazySchema)(
|
|
|
913
913
|
file_text: import_v44.z.string().optional(),
|
|
914
914
|
insert_line: import_v44.z.number().int().optional(),
|
|
915
915
|
new_str: import_v44.z.string().optional(),
|
|
916
|
+
insert_text: import_v44.z.string().optional(),
|
|
916
917
|
old_str: import_v44.z.string().optional(),
|
|
917
918
|
view_range: import_v44.z.array(import_v44.z.number().int()).optional()
|
|
918
919
|
})
|
|
@@ -3820,9 +3821,9 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
3820
3821
|
version: skill.version
|
|
3821
3822
|
}))) != null ? _m : null
|
|
3822
3823
|
} : null;
|
|
3823
|
-
if (value.
|
|
3824
|
+
if (value.context_management) {
|
|
3824
3825
|
contextManagement = mapAnthropicResponseContextManagement(
|
|
3825
|
-
value.
|
|
3826
|
+
value.context_management
|
|
3826
3827
|
);
|
|
3827
3828
|
}
|
|
3828
3829
|
rawUsage = {
|
|
@@ -4163,6 +4164,7 @@ var textEditor_20241022InputSchema = (0, import_provider_utils19.lazySchema)(
|
|
|
4163
4164
|
file_text: import_v416.z.string().optional(),
|
|
4164
4165
|
insert_line: import_v416.z.number().int().optional(),
|
|
4165
4166
|
new_str: import_v416.z.string().optional(),
|
|
4167
|
+
insert_text: import_v416.z.string().optional(),
|
|
4166
4168
|
old_str: import_v416.z.string().optional(),
|
|
4167
4169
|
view_range: import_v416.z.array(import_v416.z.number().int()).optional()
|
|
4168
4170
|
})
|
|
@@ -4184,6 +4186,7 @@ var textEditor_20250124InputSchema = (0, import_provider_utils20.lazySchema)(
|
|
|
4184
4186
|
file_text: import_v417.z.string().optional(),
|
|
4185
4187
|
insert_line: import_v417.z.number().int().optional(),
|
|
4186
4188
|
new_str: import_v417.z.string().optional(),
|
|
4189
|
+
insert_text: import_v417.z.string().optional(),
|
|
4187
4190
|
old_str: import_v417.z.string().optional(),
|
|
4188
4191
|
view_range: import_v417.z.array(import_v417.z.number().int()).optional()
|
|
4189
4192
|
})
|
|
@@ -4205,6 +4208,7 @@ var textEditor_20250429InputSchema = (0, import_provider_utils21.lazySchema)(
|
|
|
4205
4208
|
file_text: import_v418.z.string().optional(),
|
|
4206
4209
|
insert_line: import_v418.z.number().int().optional(),
|
|
4207
4210
|
new_str: import_v418.z.string().optional(),
|
|
4211
|
+
insert_text: import_v418.z.string().optional(),
|
|
4208
4212
|
old_str: import_v418.z.string().optional(),
|
|
4209
4213
|
view_range: import_v418.z.array(import_v418.z.number().int()).optional()
|
|
4210
4214
|
})
|