@ai-sdk/anthropic 4.0.0-beta.37 → 4.0.0-beta.39
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 +23 -0
- package/dist/index.d.ts +24 -24
- package/dist/index.js +59 -61
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +29 -29
- package/dist/internal/index.js +59 -60
- package/dist/internal/index.js.map +1 -1
- package/package.json +8 -6
- package/src/{anthropic-messages-api.ts → anthropic-api.ts} +4 -4
- package/src/{anthropic-messages-language-model.ts → anthropic-language-model.ts} +32 -37
- package/src/{anthropic-messages-options.ts → anthropic-options.ts} +1 -1
- package/src/anthropic-prepare-tools.ts +1 -1
- package/src/anthropic-provider.ts +9 -9
- package/src/{convert-anthropic-messages-usage.ts → convert-anthropic-usage.ts} +3 -3
- package/src/{convert-to-anthropic-messages-prompt.ts → convert-to-anthropic-prompt.ts} +9 -8
- package/src/get-cache-control.ts +1 -1
- package/src/index.ts +1 -1
- package/src/internal/index.ts +9 -3
- package/src/tool/bash_20241022.ts +2 -2
- package/src/tool/bash_20250124.ts +2 -2
- package/src/tool/code-execution_20250522.ts +2 -2
- package/src/tool/code-execution_20250825.ts +2 -2
- package/src/tool/code-execution_20260120.ts +2 -2
- package/src/tool/computer_20241022.ts +2 -2
- package/src/tool/computer_20250124.ts +2 -2
- package/src/tool/computer_20251124.ts +2 -2
- package/src/tool/memory_20250818.ts +2 -2
- package/src/tool/text-editor_20241022.ts +2 -2
- package/src/tool/text-editor_20250124.ts +2 -2
- package/src/tool/text-editor_20250429.ts +2 -2
- package/src/tool/text-editor_20250728.ts +2 -2
- package/src/tool/tool-search-bm25_20251119.ts +2 -2
- package/src/tool/tool-search-regex_20251119.ts +2 -2
- package/src/tool/web-fetch-20250910.ts +2 -2
- package/src/tool/web-fetch-20260209.ts +2 -2
- package/src/tool/web-search_20250305.ts +2 -2
- package/src/tool/web-search_20260209.ts +2 -2
package/dist/internal/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// src/anthropic-
|
|
1
|
+
// src/anthropic-language-model.ts
|
|
2
2
|
import {
|
|
3
3
|
APICallError
|
|
4
4
|
} from "@ai-sdk/provider";
|
|
@@ -43,10 +43,10 @@ var anthropicFailedResponseHandler = createJsonErrorResponseHandler({
|
|
|
43
43
|
errorToMessage: (data) => data.error.message
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
-
// src/anthropic-
|
|
46
|
+
// src/anthropic-api.ts
|
|
47
47
|
import { lazySchema as lazySchema2, zodSchema as zodSchema2 } from "@ai-sdk/provider-utils";
|
|
48
48
|
import { z as z2 } from "zod/v4";
|
|
49
|
-
var
|
|
49
|
+
var anthropicResponseSchema = lazySchema2(
|
|
50
50
|
() => zodSchema2(
|
|
51
51
|
z2.object({
|
|
52
52
|
type: z2.literal("message"),
|
|
@@ -363,7 +363,7 @@ var anthropicMessagesResponseSchema = lazySchema2(
|
|
|
363
363
|
})
|
|
364
364
|
)
|
|
365
365
|
);
|
|
366
|
-
var
|
|
366
|
+
var anthropicChunkSchema = lazySchema2(
|
|
367
367
|
() => zodSchema2(
|
|
368
368
|
z2.discriminatedUnion("type", [
|
|
369
369
|
z2.object({
|
|
@@ -782,7 +782,7 @@ var anthropicReasoningMetadataSchema = lazySchema2(
|
|
|
782
782
|
)
|
|
783
783
|
);
|
|
784
784
|
|
|
785
|
-
// src/anthropic-
|
|
785
|
+
// src/anthropic-options.ts
|
|
786
786
|
import { z as z3 } from "zod/v4";
|
|
787
787
|
var anthropicFilePartProviderOptions = z3.object({
|
|
788
788
|
/**
|
|
@@ -1055,7 +1055,7 @@ var CacheControlValidator = class {
|
|
|
1055
1055
|
};
|
|
1056
1056
|
|
|
1057
1057
|
// src/tool/text-editor_20250728.ts
|
|
1058
|
-
import {
|
|
1058
|
+
import { createProviderDefinedToolFactory } from "@ai-sdk/provider-utils";
|
|
1059
1059
|
import { z as z4 } from "zod/v4";
|
|
1060
1060
|
import { lazySchema as lazySchema3, zodSchema as zodSchema3 } from "@ai-sdk/provider-utils";
|
|
1061
1061
|
var textEditor_20250728ArgsSchema = lazySchema3(
|
|
@@ -1079,7 +1079,7 @@ var textEditor_20250728InputSchema = lazySchema3(
|
|
|
1079
1079
|
})
|
|
1080
1080
|
)
|
|
1081
1081
|
);
|
|
1082
|
-
var factory =
|
|
1082
|
+
var factory = createProviderDefinedToolFactory({
|
|
1083
1083
|
id: "anthropic.text_editor_20250728",
|
|
1084
1084
|
inputSchema: textEditor_20250728InputSchema
|
|
1085
1085
|
});
|
|
@@ -1089,7 +1089,7 @@ var textEditor_20250728 = (args = {}) => {
|
|
|
1089
1089
|
|
|
1090
1090
|
// src/tool/web-search_20260209.ts
|
|
1091
1091
|
import {
|
|
1092
|
-
|
|
1092
|
+
createProviderExecutedToolFactory,
|
|
1093
1093
|
lazySchema as lazySchema4,
|
|
1094
1094
|
zodSchema as zodSchema4
|
|
1095
1095
|
} from "@ai-sdk/provider-utils";
|
|
@@ -1130,7 +1130,7 @@ var webSearch_20260209InputSchema = lazySchema4(
|
|
|
1130
1130
|
})
|
|
1131
1131
|
)
|
|
1132
1132
|
);
|
|
1133
|
-
var factory2 =
|
|
1133
|
+
var factory2 = createProviderExecutedToolFactory({
|
|
1134
1134
|
id: "anthropic.web_search_20260209",
|
|
1135
1135
|
inputSchema: webSearch_20260209InputSchema,
|
|
1136
1136
|
outputSchema: webSearch_20260209OutputSchema,
|
|
@@ -1142,7 +1142,7 @@ var webSearch_20260209 = (args = {}) => {
|
|
|
1142
1142
|
|
|
1143
1143
|
// src/tool/web-search_20250305.ts
|
|
1144
1144
|
import {
|
|
1145
|
-
|
|
1145
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory2,
|
|
1146
1146
|
lazySchema as lazySchema5,
|
|
1147
1147
|
zodSchema as zodSchema5
|
|
1148
1148
|
} from "@ai-sdk/provider-utils";
|
|
@@ -1183,7 +1183,7 @@ var webSearch_20250305InputSchema = lazySchema5(
|
|
|
1183
1183
|
})
|
|
1184
1184
|
)
|
|
1185
1185
|
);
|
|
1186
|
-
var factory3 =
|
|
1186
|
+
var factory3 = createProviderExecutedToolFactory2({
|
|
1187
1187
|
id: "anthropic.web_search_20250305",
|
|
1188
1188
|
inputSchema: webSearch_20250305InputSchema,
|
|
1189
1189
|
outputSchema: webSearch_20250305OutputSchema,
|
|
@@ -1195,7 +1195,7 @@ var webSearch_20250305 = (args = {}) => {
|
|
|
1195
1195
|
|
|
1196
1196
|
// src/tool/web-fetch-20260209.ts
|
|
1197
1197
|
import {
|
|
1198
|
-
|
|
1198
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory3,
|
|
1199
1199
|
lazySchema as lazySchema6,
|
|
1200
1200
|
zodSchema as zodSchema6
|
|
1201
1201
|
} from "@ai-sdk/provider-utils";
|
|
@@ -1244,7 +1244,7 @@ var webFetch_20260209InputSchema = lazySchema6(
|
|
|
1244
1244
|
})
|
|
1245
1245
|
)
|
|
1246
1246
|
);
|
|
1247
|
-
var factory4 =
|
|
1247
|
+
var factory4 = createProviderExecutedToolFactory3({
|
|
1248
1248
|
id: "anthropic.web_fetch_20260209",
|
|
1249
1249
|
inputSchema: webFetch_20260209InputSchema,
|
|
1250
1250
|
outputSchema: webFetch_20260209OutputSchema,
|
|
@@ -1256,7 +1256,7 @@ var webFetch_20260209 = (args = {}) => {
|
|
|
1256
1256
|
|
|
1257
1257
|
// src/tool/web-fetch-20250910.ts
|
|
1258
1258
|
import {
|
|
1259
|
-
|
|
1259
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory4,
|
|
1260
1260
|
lazySchema as lazySchema7,
|
|
1261
1261
|
zodSchema as zodSchema7
|
|
1262
1262
|
} from "@ai-sdk/provider-utils";
|
|
@@ -1305,7 +1305,7 @@ var webFetch_20250910InputSchema = lazySchema7(
|
|
|
1305
1305
|
})
|
|
1306
1306
|
)
|
|
1307
1307
|
);
|
|
1308
|
-
var factory5 =
|
|
1308
|
+
var factory5 = createProviderExecutedToolFactory4({
|
|
1309
1309
|
id: "anthropic.web_fetch_20250910",
|
|
1310
1310
|
inputSchema: webFetch_20250910InputSchema,
|
|
1311
1311
|
outputSchema: webFetch_20250910OutputSchema,
|
|
@@ -1659,8 +1659,8 @@ async function prepareTools({
|
|
|
1659
1659
|
}
|
|
1660
1660
|
}
|
|
1661
1661
|
|
|
1662
|
-
// src/convert-anthropic-
|
|
1663
|
-
function
|
|
1662
|
+
// src/convert-anthropic-usage.ts
|
|
1663
|
+
function convertAnthropicUsage({
|
|
1664
1664
|
usage,
|
|
1665
1665
|
rawUsage
|
|
1666
1666
|
}) {
|
|
@@ -1699,7 +1699,7 @@ function convertAnthropicMessagesUsage({
|
|
|
1699
1699
|
};
|
|
1700
1700
|
}
|
|
1701
1701
|
|
|
1702
|
-
// src/convert-to-anthropic-
|
|
1702
|
+
// src/convert-to-anthropic-prompt.ts
|
|
1703
1703
|
import {
|
|
1704
1704
|
UnsupportedFunctionalityError as UnsupportedFunctionalityError2
|
|
1705
1705
|
} from "@ai-sdk/provider";
|
|
@@ -1715,7 +1715,7 @@ import {
|
|
|
1715
1715
|
|
|
1716
1716
|
// src/tool/code-execution_20250522.ts
|
|
1717
1717
|
import {
|
|
1718
|
-
|
|
1718
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory5,
|
|
1719
1719
|
lazySchema as lazySchema8,
|
|
1720
1720
|
zodSchema as zodSchema8
|
|
1721
1721
|
} from "@ai-sdk/provider-utils";
|
|
@@ -1743,7 +1743,7 @@ var codeExecution_20250522InputSchema = lazySchema8(
|
|
|
1743
1743
|
})
|
|
1744
1744
|
)
|
|
1745
1745
|
);
|
|
1746
|
-
var factory6 =
|
|
1746
|
+
var factory6 = createProviderExecutedToolFactory5({
|
|
1747
1747
|
id: "anthropic.code_execution_20250522",
|
|
1748
1748
|
inputSchema: codeExecution_20250522InputSchema,
|
|
1749
1749
|
outputSchema: codeExecution_20250522OutputSchema
|
|
@@ -1754,7 +1754,7 @@ var codeExecution_20250522 = (args = {}) => {
|
|
|
1754
1754
|
|
|
1755
1755
|
// src/tool/code-execution_20250825.ts
|
|
1756
1756
|
import {
|
|
1757
|
-
|
|
1757
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory6,
|
|
1758
1758
|
lazySchema as lazySchema9,
|
|
1759
1759
|
zodSchema as zodSchema9
|
|
1760
1760
|
} from "@ai-sdk/provider-utils";
|
|
@@ -1852,7 +1852,7 @@ var codeExecution_20250825InputSchema = lazySchema9(
|
|
|
1852
1852
|
])
|
|
1853
1853
|
)
|
|
1854
1854
|
);
|
|
1855
|
-
var factory7 =
|
|
1855
|
+
var factory7 = createProviderExecutedToolFactory6({
|
|
1856
1856
|
id: "anthropic.code_execution_20250825",
|
|
1857
1857
|
inputSchema: codeExecution_20250825InputSchema,
|
|
1858
1858
|
outputSchema: codeExecution_20250825OutputSchema,
|
|
@@ -1867,7 +1867,7 @@ var codeExecution_20250825 = (args = {}) => {
|
|
|
1867
1867
|
|
|
1868
1868
|
// src/tool/code-execution_20260120.ts
|
|
1869
1869
|
import {
|
|
1870
|
-
|
|
1870
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory7,
|
|
1871
1871
|
lazySchema as lazySchema10,
|
|
1872
1872
|
zodSchema as zodSchema10
|
|
1873
1873
|
} from "@ai-sdk/provider-utils";
|
|
@@ -1976,7 +1976,7 @@ var codeExecution_20260120InputSchema = lazySchema10(
|
|
|
1976
1976
|
])
|
|
1977
1977
|
)
|
|
1978
1978
|
);
|
|
1979
|
-
var factory8 =
|
|
1979
|
+
var factory8 = createProviderExecutedToolFactory7({
|
|
1980
1980
|
id: "anthropic.code_execution_20260120",
|
|
1981
1981
|
inputSchema: codeExecution_20260120InputSchema,
|
|
1982
1982
|
outputSchema: codeExecution_20260120OutputSchema,
|
|
@@ -1988,7 +1988,7 @@ var codeExecution_20260120 = (args = {}) => {
|
|
|
1988
1988
|
|
|
1989
1989
|
// src/tool/tool-search-regex_20251119.ts
|
|
1990
1990
|
import {
|
|
1991
|
-
|
|
1991
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory8,
|
|
1992
1992
|
lazySchema as lazySchema11,
|
|
1993
1993
|
zodSchema as zodSchema11
|
|
1994
1994
|
} from "@ai-sdk/provider-utils";
|
|
@@ -2024,7 +2024,7 @@ var toolSearchRegex_20251119InputSchema = lazySchema11(
|
|
|
2024
2024
|
})
|
|
2025
2025
|
)
|
|
2026
2026
|
);
|
|
2027
|
-
var factory9 =
|
|
2027
|
+
var factory9 = createProviderExecutedToolFactory8({
|
|
2028
2028
|
id: "anthropic.tool_search_regex_20251119",
|
|
2029
2029
|
inputSchema: toolSearchRegex_20251119InputSchema,
|
|
2030
2030
|
outputSchema: toolSearchRegex_20251119OutputSchema,
|
|
@@ -2034,7 +2034,7 @@ var toolSearchRegex_20251119 = (args = {}) => {
|
|
|
2034
2034
|
return factory9(args);
|
|
2035
2035
|
};
|
|
2036
2036
|
|
|
2037
|
-
// src/convert-to-anthropic-
|
|
2037
|
+
// src/convert-to-anthropic-prompt.ts
|
|
2038
2038
|
function convertToString(data) {
|
|
2039
2039
|
if (typeof data === "string") {
|
|
2040
2040
|
return new TextDecoder().decode(convertBase64ToUint8Array(data));
|
|
@@ -2060,7 +2060,7 @@ function isUrlString(data) {
|
|
|
2060
2060
|
function getUrlString(data) {
|
|
2061
2061
|
return data instanceof URL ? data.toString() : data;
|
|
2062
2062
|
}
|
|
2063
|
-
async function
|
|
2063
|
+
async function convertToAnthropicPrompt({
|
|
2064
2064
|
prompt,
|
|
2065
2065
|
sendReasoning,
|
|
2066
2066
|
warnings,
|
|
@@ -2333,7 +2333,7 @@ async function convertToAnthropicMessagesPrompt({
|
|
|
2333
2333
|
contentValue = output.value;
|
|
2334
2334
|
break;
|
|
2335
2335
|
case "execution-denied":
|
|
2336
|
-
contentValue = (_e = output.reason) != null ? _e : "Tool execution denied.";
|
|
2336
|
+
contentValue = (_e = output.reason) != null ? _e : "Tool call execution denied.";
|
|
2337
2337
|
break;
|
|
2338
2338
|
case "json":
|
|
2339
2339
|
case "error-json":
|
|
@@ -2888,7 +2888,7 @@ function mapAnthropicStopReason({
|
|
|
2888
2888
|
}
|
|
2889
2889
|
}
|
|
2890
2890
|
|
|
2891
|
-
// src/anthropic-
|
|
2891
|
+
// src/anthropic-language-model.ts
|
|
2892
2892
|
function createCitationSource(citation, citationDocuments, generateId2) {
|
|
2893
2893
|
var _a;
|
|
2894
2894
|
if (citation.type === "web_search_result_location") {
|
|
@@ -2933,7 +2933,7 @@ function createCitationSource(citation, citationDocuments, generateId2) {
|
|
|
2933
2933
|
}
|
|
2934
2934
|
};
|
|
2935
2935
|
}
|
|
2936
|
-
var
|
|
2936
|
+
var AnthropicLanguageModel = class _AnthropicLanguageModel {
|
|
2937
2937
|
constructor(modelId, config) {
|
|
2938
2938
|
this.specificationVersion = "v4";
|
|
2939
2939
|
var _a;
|
|
@@ -2948,7 +2948,7 @@ var AnthropicMessagesLanguageModel = class _AnthropicMessagesLanguageModel {
|
|
|
2948
2948
|
});
|
|
2949
2949
|
}
|
|
2950
2950
|
static [WORKFLOW_DESERIALIZE](options) {
|
|
2951
|
-
return new
|
|
2951
|
+
return new _AnthropicLanguageModel(options.modelId, options.config);
|
|
2952
2952
|
}
|
|
2953
2953
|
supportsUrl(url) {
|
|
2954
2954
|
return url.protocol === "https:";
|
|
@@ -3109,7 +3109,7 @@ var AnthropicMessagesLanguageModel = class _AnthropicMessagesLanguageModel {
|
|
|
3109
3109
|
"anthropic.tool_search_bm25_20251119": "tool_search_tool_bm25"
|
|
3110
3110
|
}
|
|
3111
3111
|
});
|
|
3112
|
-
const { prompt: messagesPrompt, betas } = await
|
|
3112
|
+
const { prompt: messagesPrompt, betas } = await convertToAnthropicPrompt({
|
|
3113
3113
|
prompt,
|
|
3114
3114
|
sendReasoning: (_d = anthropicOptions == null ? void 0 : anthropicOptions.sendReasoning) != null ? _d : true,
|
|
3115
3115
|
warnings,
|
|
@@ -3496,7 +3496,7 @@ var AnthropicMessagesLanguageModel = class _AnthropicMessagesLanguageModel {
|
|
|
3496
3496
|
body: this.transformRequestBody(args, betas),
|
|
3497
3497
|
failedResponseHandler: anthropicFailedResponseHandler,
|
|
3498
3498
|
successfulResponseHandler: createJsonResponseHandler(
|
|
3499
|
-
|
|
3499
|
+
anthropicResponseSchema
|
|
3500
3500
|
),
|
|
3501
3501
|
abortSignal: options.abortSignal,
|
|
3502
3502
|
fetch: this.config.fetch
|
|
@@ -3845,7 +3845,7 @@ var AnthropicMessagesLanguageModel = class _AnthropicMessagesLanguageModel {
|
|
|
3845
3845
|
}),
|
|
3846
3846
|
raw: (_e = response.stop_reason) != null ? _e : void 0
|
|
3847
3847
|
},
|
|
3848
|
-
usage:
|
|
3848
|
+
usage: convertAnthropicUsage({ usage: response.usage }),
|
|
3849
3849
|
request: { body: args },
|
|
3850
3850
|
response: {
|
|
3851
3851
|
id: (_f = response.id) != null ? _f : void 0,
|
|
@@ -3915,9 +3915,7 @@ var AnthropicMessagesLanguageModel = class _AnthropicMessagesLanguageModel {
|
|
|
3915
3915
|
headers: await this.getHeaders({ betas, headers: options.headers }),
|
|
3916
3916
|
body: this.transformRequestBody(body, betas),
|
|
3917
3917
|
failedResponseHandler: anthropicFailedResponseHandler,
|
|
3918
|
-
successfulResponseHandler: createEventSourceResponseHandler(
|
|
3919
|
-
anthropicMessagesChunkSchema
|
|
3920
|
-
),
|
|
3918
|
+
successfulResponseHandler: createEventSourceResponseHandler(anthropicChunkSchema),
|
|
3921
3919
|
abortSignal: options.abortSignal,
|
|
3922
3920
|
fetch: this.config.fetch
|
|
3923
3921
|
});
|
|
@@ -4609,7 +4607,7 @@ var AnthropicMessagesLanguageModel = class _AnthropicMessagesLanguageModel {
|
|
|
4609
4607
|
controller.enqueue({
|
|
4610
4608
|
type: "finish",
|
|
4611
4609
|
finishReason,
|
|
4612
|
-
usage:
|
|
4610
|
+
usage: convertAnthropicUsage({ usage, rawUsage }),
|
|
4613
4611
|
providerMetadata
|
|
4614
4612
|
});
|
|
4615
4613
|
return;
|
|
@@ -4817,7 +4815,7 @@ function mapAnthropicResponseContextManagement(contextManagement) {
|
|
|
4817
4815
|
|
|
4818
4816
|
// src/tool/bash_20241022.ts
|
|
4819
4817
|
import {
|
|
4820
|
-
|
|
4818
|
+
createProviderDefinedToolFactory as createProviderDefinedToolFactory2,
|
|
4821
4819
|
lazySchema as lazySchema12,
|
|
4822
4820
|
zodSchema as zodSchema12
|
|
4823
4821
|
} from "@ai-sdk/provider-utils";
|
|
@@ -4830,14 +4828,14 @@ var bash_20241022InputSchema = lazySchema12(
|
|
|
4830
4828
|
})
|
|
4831
4829
|
)
|
|
4832
4830
|
);
|
|
4833
|
-
var bash_20241022 =
|
|
4831
|
+
var bash_20241022 = createProviderDefinedToolFactory2({
|
|
4834
4832
|
id: "anthropic.bash_20241022",
|
|
4835
4833
|
inputSchema: bash_20241022InputSchema
|
|
4836
4834
|
});
|
|
4837
4835
|
|
|
4838
4836
|
// src/tool/bash_20250124.ts
|
|
4839
4837
|
import {
|
|
4840
|
-
|
|
4838
|
+
createProviderDefinedToolFactory as createProviderDefinedToolFactory3,
|
|
4841
4839
|
lazySchema as lazySchema13,
|
|
4842
4840
|
zodSchema as zodSchema13
|
|
4843
4841
|
} from "@ai-sdk/provider-utils";
|
|
@@ -4850,14 +4848,14 @@ var bash_20250124InputSchema = lazySchema13(
|
|
|
4850
4848
|
})
|
|
4851
4849
|
)
|
|
4852
4850
|
);
|
|
4853
|
-
var bash_20250124 =
|
|
4851
|
+
var bash_20250124 = createProviderDefinedToolFactory3({
|
|
4854
4852
|
id: "anthropic.bash_20250124",
|
|
4855
4853
|
inputSchema: bash_20250124InputSchema
|
|
4856
4854
|
});
|
|
4857
4855
|
|
|
4858
4856
|
// src/tool/computer_20241022.ts
|
|
4859
4857
|
import {
|
|
4860
|
-
|
|
4858
|
+
createProviderDefinedToolFactory as createProviderDefinedToolFactory4,
|
|
4861
4859
|
lazySchema as lazySchema14,
|
|
4862
4860
|
zodSchema as zodSchema14
|
|
4863
4861
|
} from "@ai-sdk/provider-utils";
|
|
@@ -4882,14 +4880,14 @@ var computer_20241022InputSchema = lazySchema14(
|
|
|
4882
4880
|
})
|
|
4883
4881
|
)
|
|
4884
4882
|
);
|
|
4885
|
-
var computer_20241022 =
|
|
4883
|
+
var computer_20241022 = createProviderDefinedToolFactory4({
|
|
4886
4884
|
id: "anthropic.computer_20241022",
|
|
4887
4885
|
inputSchema: computer_20241022InputSchema
|
|
4888
4886
|
});
|
|
4889
4887
|
|
|
4890
4888
|
// src/tool/computer_20250124.ts
|
|
4891
4889
|
import {
|
|
4892
|
-
|
|
4890
|
+
createProviderDefinedToolFactory as createProviderDefinedToolFactory5,
|
|
4893
4891
|
lazySchema as lazySchema15,
|
|
4894
4892
|
zodSchema as zodSchema15
|
|
4895
4893
|
} from "@ai-sdk/provider-utils";
|
|
@@ -4924,14 +4922,14 @@ var computer_20250124InputSchema = lazySchema15(
|
|
|
4924
4922
|
})
|
|
4925
4923
|
)
|
|
4926
4924
|
);
|
|
4927
|
-
var computer_20250124 =
|
|
4925
|
+
var computer_20250124 = createProviderDefinedToolFactory5({
|
|
4928
4926
|
id: "anthropic.computer_20250124",
|
|
4929
4927
|
inputSchema: computer_20250124InputSchema
|
|
4930
4928
|
});
|
|
4931
4929
|
|
|
4932
4930
|
// src/tool/computer_20251124.ts
|
|
4933
4931
|
import {
|
|
4934
|
-
|
|
4932
|
+
createProviderDefinedToolFactory as createProviderDefinedToolFactory6,
|
|
4935
4933
|
lazySchema as lazySchema16,
|
|
4936
4934
|
zodSchema as zodSchema16
|
|
4937
4935
|
} from "@ai-sdk/provider-utils";
|
|
@@ -4973,14 +4971,14 @@ var computer_20251124InputSchema = lazySchema16(
|
|
|
4973
4971
|
})
|
|
4974
4972
|
)
|
|
4975
4973
|
);
|
|
4976
|
-
var computer_20251124 =
|
|
4974
|
+
var computer_20251124 = createProviderDefinedToolFactory6({
|
|
4977
4975
|
id: "anthropic.computer_20251124",
|
|
4978
4976
|
inputSchema: computer_20251124InputSchema
|
|
4979
4977
|
});
|
|
4980
4978
|
|
|
4981
4979
|
// src/tool/memory_20250818.ts
|
|
4982
4980
|
import {
|
|
4983
|
-
|
|
4981
|
+
createProviderDefinedToolFactory as createProviderDefinedToolFactory7,
|
|
4984
4982
|
lazySchema as lazySchema17,
|
|
4985
4983
|
zodSchema as zodSchema17
|
|
4986
4984
|
} from "@ai-sdk/provider-utils";
|
|
@@ -5022,14 +5020,14 @@ var memory_20250818InputSchema = lazySchema17(
|
|
|
5022
5020
|
])
|
|
5023
5021
|
)
|
|
5024
5022
|
);
|
|
5025
|
-
var memory_20250818 =
|
|
5023
|
+
var memory_20250818 = createProviderDefinedToolFactory7({
|
|
5026
5024
|
id: "anthropic.memory_20250818",
|
|
5027
5025
|
inputSchema: memory_20250818InputSchema
|
|
5028
5026
|
});
|
|
5029
5027
|
|
|
5030
5028
|
// src/tool/text-editor_20241022.ts
|
|
5031
5029
|
import {
|
|
5032
|
-
|
|
5030
|
+
createProviderDefinedToolFactory as createProviderDefinedToolFactory8,
|
|
5033
5031
|
lazySchema as lazySchema18,
|
|
5034
5032
|
zodSchema as zodSchema18
|
|
5035
5033
|
} from "@ai-sdk/provider-utils";
|
|
@@ -5048,14 +5046,14 @@ var textEditor_20241022InputSchema = lazySchema18(
|
|
|
5048
5046
|
})
|
|
5049
5047
|
)
|
|
5050
5048
|
);
|
|
5051
|
-
var textEditor_20241022 =
|
|
5049
|
+
var textEditor_20241022 = createProviderDefinedToolFactory8({
|
|
5052
5050
|
id: "anthropic.text_editor_20241022",
|
|
5053
5051
|
inputSchema: textEditor_20241022InputSchema
|
|
5054
5052
|
});
|
|
5055
5053
|
|
|
5056
5054
|
// src/tool/text-editor_20250124.ts
|
|
5057
5055
|
import {
|
|
5058
|
-
|
|
5056
|
+
createProviderDefinedToolFactory as createProviderDefinedToolFactory9,
|
|
5059
5057
|
lazySchema as lazySchema19,
|
|
5060
5058
|
zodSchema as zodSchema19
|
|
5061
5059
|
} from "@ai-sdk/provider-utils";
|
|
@@ -5074,14 +5072,14 @@ var textEditor_20250124InputSchema = lazySchema19(
|
|
|
5074
5072
|
})
|
|
5075
5073
|
)
|
|
5076
5074
|
);
|
|
5077
|
-
var textEditor_20250124 =
|
|
5075
|
+
var textEditor_20250124 = createProviderDefinedToolFactory9({
|
|
5078
5076
|
id: "anthropic.text_editor_20250124",
|
|
5079
5077
|
inputSchema: textEditor_20250124InputSchema
|
|
5080
5078
|
});
|
|
5081
5079
|
|
|
5082
5080
|
// src/tool/text-editor_20250429.ts
|
|
5083
5081
|
import {
|
|
5084
|
-
|
|
5082
|
+
createProviderDefinedToolFactory as createProviderDefinedToolFactory10,
|
|
5085
5083
|
lazySchema as lazySchema20,
|
|
5086
5084
|
zodSchema as zodSchema20
|
|
5087
5085
|
} from "@ai-sdk/provider-utils";
|
|
@@ -5100,14 +5098,14 @@ var textEditor_20250429InputSchema = lazySchema20(
|
|
|
5100
5098
|
})
|
|
5101
5099
|
)
|
|
5102
5100
|
);
|
|
5103
|
-
var textEditor_20250429 =
|
|
5101
|
+
var textEditor_20250429 = createProviderDefinedToolFactory10({
|
|
5104
5102
|
id: "anthropic.text_editor_20250429",
|
|
5105
5103
|
inputSchema: textEditor_20250429InputSchema
|
|
5106
5104
|
});
|
|
5107
5105
|
|
|
5108
5106
|
// src/tool/tool-search-bm25_20251119.ts
|
|
5109
5107
|
import {
|
|
5110
|
-
|
|
5108
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory9,
|
|
5111
5109
|
lazySchema as lazySchema21,
|
|
5112
5110
|
zodSchema as zodSchema21
|
|
5113
5111
|
} from "@ai-sdk/provider-utils";
|
|
@@ -5137,7 +5135,7 @@ var toolSearchBm25_20251119InputSchema = lazySchema21(
|
|
|
5137
5135
|
})
|
|
5138
5136
|
)
|
|
5139
5137
|
);
|
|
5140
|
-
var factory10 =
|
|
5138
|
+
var factory10 = createProviderExecutedToolFactory9({
|
|
5141
5139
|
id: "anthropic.tool_search_bm25_20251119",
|
|
5142
5140
|
inputSchema: toolSearchBm25_20251119InputSchema,
|
|
5143
5141
|
outputSchema: toolSearchBm25_20251119OutputSchema,
|
|
@@ -5349,7 +5347,8 @@ var anthropicTools = {
|
|
|
5349
5347
|
toolSearchBm25_20251119
|
|
5350
5348
|
};
|
|
5351
5349
|
export {
|
|
5352
|
-
|
|
5350
|
+
AnthropicLanguageModel,
|
|
5351
|
+
AnthropicLanguageModel as AnthropicMessagesLanguageModel,
|
|
5353
5352
|
anthropicTools,
|
|
5354
5353
|
getModelCapabilities,
|
|
5355
5354
|
prepareTools
|