@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/index.js
CHANGED
|
@@ -111,7 +111,7 @@ var AnthropicFiles = class {
|
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
-
// src/anthropic-
|
|
114
|
+
// src/anthropic-language-model.ts
|
|
115
115
|
import {
|
|
116
116
|
APICallError
|
|
117
117
|
} from "@ai-sdk/provider";
|
|
@@ -133,10 +133,10 @@ import {
|
|
|
133
133
|
WORKFLOW_DESERIALIZE
|
|
134
134
|
} from "@ai-sdk/provider-utils";
|
|
135
135
|
|
|
136
|
-
// src/anthropic-
|
|
136
|
+
// src/anthropic-api.ts
|
|
137
137
|
import { lazySchema as lazySchema3, zodSchema as zodSchema3 } from "@ai-sdk/provider-utils";
|
|
138
138
|
import { z as z3 } from "zod/v4";
|
|
139
|
-
var
|
|
139
|
+
var anthropicResponseSchema = lazySchema3(
|
|
140
140
|
() => zodSchema3(
|
|
141
141
|
z3.object({
|
|
142
142
|
type: z3.literal("message"),
|
|
@@ -453,7 +453,7 @@ var anthropicMessagesResponseSchema = lazySchema3(
|
|
|
453
453
|
})
|
|
454
454
|
)
|
|
455
455
|
);
|
|
456
|
-
var
|
|
456
|
+
var anthropicChunkSchema = lazySchema3(
|
|
457
457
|
() => zodSchema3(
|
|
458
458
|
z3.discriminatedUnion("type", [
|
|
459
459
|
z3.object({
|
|
@@ -872,7 +872,7 @@ var anthropicReasoningMetadataSchema = lazySchema3(
|
|
|
872
872
|
)
|
|
873
873
|
);
|
|
874
874
|
|
|
875
|
-
// src/anthropic-
|
|
875
|
+
// src/anthropic-options.ts
|
|
876
876
|
import { z as z4 } from "zod/v4";
|
|
877
877
|
var anthropicFilePartProviderOptions = z4.object({
|
|
878
878
|
/**
|
|
@@ -1145,7 +1145,7 @@ var CacheControlValidator = class {
|
|
|
1145
1145
|
};
|
|
1146
1146
|
|
|
1147
1147
|
// src/tool/text-editor_20250728.ts
|
|
1148
|
-
import {
|
|
1148
|
+
import { createProviderDefinedToolFactory } from "@ai-sdk/provider-utils";
|
|
1149
1149
|
import { z as z5 } from "zod/v4";
|
|
1150
1150
|
import { lazySchema as lazySchema4, zodSchema as zodSchema4 } from "@ai-sdk/provider-utils";
|
|
1151
1151
|
var textEditor_20250728ArgsSchema = lazySchema4(
|
|
@@ -1169,7 +1169,7 @@ var textEditor_20250728InputSchema = lazySchema4(
|
|
|
1169
1169
|
})
|
|
1170
1170
|
)
|
|
1171
1171
|
);
|
|
1172
|
-
var factory =
|
|
1172
|
+
var factory = createProviderDefinedToolFactory({
|
|
1173
1173
|
id: "anthropic.text_editor_20250728",
|
|
1174
1174
|
inputSchema: textEditor_20250728InputSchema
|
|
1175
1175
|
});
|
|
@@ -1179,7 +1179,7 @@ var textEditor_20250728 = (args = {}) => {
|
|
|
1179
1179
|
|
|
1180
1180
|
// src/tool/web-search_20260209.ts
|
|
1181
1181
|
import {
|
|
1182
|
-
|
|
1182
|
+
createProviderExecutedToolFactory,
|
|
1183
1183
|
lazySchema as lazySchema5,
|
|
1184
1184
|
zodSchema as zodSchema5
|
|
1185
1185
|
} from "@ai-sdk/provider-utils";
|
|
@@ -1220,7 +1220,7 @@ var webSearch_20260209InputSchema = lazySchema5(
|
|
|
1220
1220
|
})
|
|
1221
1221
|
)
|
|
1222
1222
|
);
|
|
1223
|
-
var factory2 =
|
|
1223
|
+
var factory2 = createProviderExecutedToolFactory({
|
|
1224
1224
|
id: "anthropic.web_search_20260209",
|
|
1225
1225
|
inputSchema: webSearch_20260209InputSchema,
|
|
1226
1226
|
outputSchema: webSearch_20260209OutputSchema,
|
|
@@ -1232,7 +1232,7 @@ var webSearch_20260209 = (args = {}) => {
|
|
|
1232
1232
|
|
|
1233
1233
|
// src/tool/web-search_20250305.ts
|
|
1234
1234
|
import {
|
|
1235
|
-
|
|
1235
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory2,
|
|
1236
1236
|
lazySchema as lazySchema6,
|
|
1237
1237
|
zodSchema as zodSchema6
|
|
1238
1238
|
} from "@ai-sdk/provider-utils";
|
|
@@ -1273,7 +1273,7 @@ var webSearch_20250305InputSchema = lazySchema6(
|
|
|
1273
1273
|
})
|
|
1274
1274
|
)
|
|
1275
1275
|
);
|
|
1276
|
-
var factory3 =
|
|
1276
|
+
var factory3 = createProviderExecutedToolFactory2({
|
|
1277
1277
|
id: "anthropic.web_search_20250305",
|
|
1278
1278
|
inputSchema: webSearch_20250305InputSchema,
|
|
1279
1279
|
outputSchema: webSearch_20250305OutputSchema,
|
|
@@ -1285,7 +1285,7 @@ var webSearch_20250305 = (args = {}) => {
|
|
|
1285
1285
|
|
|
1286
1286
|
// src/tool/web-fetch-20260209.ts
|
|
1287
1287
|
import {
|
|
1288
|
-
|
|
1288
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory3,
|
|
1289
1289
|
lazySchema as lazySchema7,
|
|
1290
1290
|
zodSchema as zodSchema7
|
|
1291
1291
|
} from "@ai-sdk/provider-utils";
|
|
@@ -1334,7 +1334,7 @@ var webFetch_20260209InputSchema = lazySchema7(
|
|
|
1334
1334
|
})
|
|
1335
1335
|
)
|
|
1336
1336
|
);
|
|
1337
|
-
var factory4 =
|
|
1337
|
+
var factory4 = createProviderExecutedToolFactory3({
|
|
1338
1338
|
id: "anthropic.web_fetch_20260209",
|
|
1339
1339
|
inputSchema: webFetch_20260209InputSchema,
|
|
1340
1340
|
outputSchema: webFetch_20260209OutputSchema,
|
|
@@ -1346,7 +1346,7 @@ var webFetch_20260209 = (args = {}) => {
|
|
|
1346
1346
|
|
|
1347
1347
|
// src/tool/web-fetch-20250910.ts
|
|
1348
1348
|
import {
|
|
1349
|
-
|
|
1349
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory4,
|
|
1350
1350
|
lazySchema as lazySchema8,
|
|
1351
1351
|
zodSchema as zodSchema8
|
|
1352
1352
|
} from "@ai-sdk/provider-utils";
|
|
@@ -1395,7 +1395,7 @@ var webFetch_20250910InputSchema = lazySchema8(
|
|
|
1395
1395
|
})
|
|
1396
1396
|
)
|
|
1397
1397
|
);
|
|
1398
|
-
var factory5 =
|
|
1398
|
+
var factory5 = createProviderExecutedToolFactory4({
|
|
1399
1399
|
id: "anthropic.web_fetch_20250910",
|
|
1400
1400
|
inputSchema: webFetch_20250910InputSchema,
|
|
1401
1401
|
outputSchema: webFetch_20250910OutputSchema,
|
|
@@ -1749,8 +1749,8 @@ async function prepareTools({
|
|
|
1749
1749
|
}
|
|
1750
1750
|
}
|
|
1751
1751
|
|
|
1752
|
-
// src/convert-anthropic-
|
|
1753
|
-
function
|
|
1752
|
+
// src/convert-anthropic-usage.ts
|
|
1753
|
+
function convertAnthropicUsage({
|
|
1754
1754
|
usage,
|
|
1755
1755
|
rawUsage
|
|
1756
1756
|
}) {
|
|
@@ -1789,7 +1789,7 @@ function convertAnthropicMessagesUsage({
|
|
|
1789
1789
|
};
|
|
1790
1790
|
}
|
|
1791
1791
|
|
|
1792
|
-
// src/convert-to-anthropic-
|
|
1792
|
+
// src/convert-to-anthropic-prompt.ts
|
|
1793
1793
|
import {
|
|
1794
1794
|
UnsupportedFunctionalityError as UnsupportedFunctionalityError2
|
|
1795
1795
|
} from "@ai-sdk/provider";
|
|
@@ -1805,7 +1805,7 @@ import {
|
|
|
1805
1805
|
|
|
1806
1806
|
// src/tool/code-execution_20250522.ts
|
|
1807
1807
|
import {
|
|
1808
|
-
|
|
1808
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory5,
|
|
1809
1809
|
lazySchema as lazySchema9,
|
|
1810
1810
|
zodSchema as zodSchema9
|
|
1811
1811
|
} from "@ai-sdk/provider-utils";
|
|
@@ -1833,7 +1833,7 @@ var codeExecution_20250522InputSchema = lazySchema9(
|
|
|
1833
1833
|
})
|
|
1834
1834
|
)
|
|
1835
1835
|
);
|
|
1836
|
-
var factory6 =
|
|
1836
|
+
var factory6 = createProviderExecutedToolFactory5({
|
|
1837
1837
|
id: "anthropic.code_execution_20250522",
|
|
1838
1838
|
inputSchema: codeExecution_20250522InputSchema,
|
|
1839
1839
|
outputSchema: codeExecution_20250522OutputSchema
|
|
@@ -1844,7 +1844,7 @@ var codeExecution_20250522 = (args = {}) => {
|
|
|
1844
1844
|
|
|
1845
1845
|
// src/tool/code-execution_20250825.ts
|
|
1846
1846
|
import {
|
|
1847
|
-
|
|
1847
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory6,
|
|
1848
1848
|
lazySchema as lazySchema10,
|
|
1849
1849
|
zodSchema as zodSchema10
|
|
1850
1850
|
} from "@ai-sdk/provider-utils";
|
|
@@ -1942,7 +1942,7 @@ var codeExecution_20250825InputSchema = lazySchema10(
|
|
|
1942
1942
|
])
|
|
1943
1943
|
)
|
|
1944
1944
|
);
|
|
1945
|
-
var factory7 =
|
|
1945
|
+
var factory7 = createProviderExecutedToolFactory6({
|
|
1946
1946
|
id: "anthropic.code_execution_20250825",
|
|
1947
1947
|
inputSchema: codeExecution_20250825InputSchema,
|
|
1948
1948
|
outputSchema: codeExecution_20250825OutputSchema,
|
|
@@ -1957,7 +1957,7 @@ var codeExecution_20250825 = (args = {}) => {
|
|
|
1957
1957
|
|
|
1958
1958
|
// src/tool/code-execution_20260120.ts
|
|
1959
1959
|
import {
|
|
1960
|
-
|
|
1960
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory7,
|
|
1961
1961
|
lazySchema as lazySchema11,
|
|
1962
1962
|
zodSchema as zodSchema11
|
|
1963
1963
|
} from "@ai-sdk/provider-utils";
|
|
@@ -2066,7 +2066,7 @@ var codeExecution_20260120InputSchema = lazySchema11(
|
|
|
2066
2066
|
])
|
|
2067
2067
|
)
|
|
2068
2068
|
);
|
|
2069
|
-
var factory8 =
|
|
2069
|
+
var factory8 = createProviderExecutedToolFactory7({
|
|
2070
2070
|
id: "anthropic.code_execution_20260120",
|
|
2071
2071
|
inputSchema: codeExecution_20260120InputSchema,
|
|
2072
2072
|
outputSchema: codeExecution_20260120OutputSchema,
|
|
@@ -2078,7 +2078,7 @@ var codeExecution_20260120 = (args = {}) => {
|
|
|
2078
2078
|
|
|
2079
2079
|
// src/tool/tool-search-regex_20251119.ts
|
|
2080
2080
|
import {
|
|
2081
|
-
|
|
2081
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory8,
|
|
2082
2082
|
lazySchema as lazySchema12,
|
|
2083
2083
|
zodSchema as zodSchema12
|
|
2084
2084
|
} from "@ai-sdk/provider-utils";
|
|
@@ -2114,7 +2114,7 @@ var toolSearchRegex_20251119InputSchema = lazySchema12(
|
|
|
2114
2114
|
})
|
|
2115
2115
|
)
|
|
2116
2116
|
);
|
|
2117
|
-
var factory9 =
|
|
2117
|
+
var factory9 = createProviderExecutedToolFactory8({
|
|
2118
2118
|
id: "anthropic.tool_search_regex_20251119",
|
|
2119
2119
|
inputSchema: toolSearchRegex_20251119InputSchema,
|
|
2120
2120
|
outputSchema: toolSearchRegex_20251119OutputSchema,
|
|
@@ -2124,7 +2124,7 @@ var toolSearchRegex_20251119 = (args = {}) => {
|
|
|
2124
2124
|
return factory9(args);
|
|
2125
2125
|
};
|
|
2126
2126
|
|
|
2127
|
-
// src/convert-to-anthropic-
|
|
2127
|
+
// src/convert-to-anthropic-prompt.ts
|
|
2128
2128
|
function convertToString(data) {
|
|
2129
2129
|
if (typeof data === "string") {
|
|
2130
2130
|
return new TextDecoder().decode(convertBase64ToUint8Array2(data));
|
|
@@ -2150,7 +2150,7 @@ function isUrlString(data) {
|
|
|
2150
2150
|
function getUrlString(data) {
|
|
2151
2151
|
return data instanceof URL ? data.toString() : data;
|
|
2152
2152
|
}
|
|
2153
|
-
async function
|
|
2153
|
+
async function convertToAnthropicPrompt({
|
|
2154
2154
|
prompt,
|
|
2155
2155
|
sendReasoning,
|
|
2156
2156
|
warnings,
|
|
@@ -2423,7 +2423,7 @@ async function convertToAnthropicMessagesPrompt({
|
|
|
2423
2423
|
contentValue = output.value;
|
|
2424
2424
|
break;
|
|
2425
2425
|
case "execution-denied":
|
|
2426
|
-
contentValue = (_e = output.reason) != null ? _e : "Tool execution denied.";
|
|
2426
|
+
contentValue = (_e = output.reason) != null ? _e : "Tool call execution denied.";
|
|
2427
2427
|
break;
|
|
2428
2428
|
case "json":
|
|
2429
2429
|
case "error-json":
|
|
@@ -2978,7 +2978,7 @@ function mapAnthropicStopReason({
|
|
|
2978
2978
|
}
|
|
2979
2979
|
}
|
|
2980
2980
|
|
|
2981
|
-
// src/anthropic-
|
|
2981
|
+
// src/anthropic-language-model.ts
|
|
2982
2982
|
function createCitationSource(citation, citationDocuments, generateId3) {
|
|
2983
2983
|
var _a;
|
|
2984
2984
|
if (citation.type === "web_search_result_location") {
|
|
@@ -3023,7 +3023,7 @@ function createCitationSource(citation, citationDocuments, generateId3) {
|
|
|
3023
3023
|
}
|
|
3024
3024
|
};
|
|
3025
3025
|
}
|
|
3026
|
-
var
|
|
3026
|
+
var AnthropicLanguageModel = class _AnthropicLanguageModel {
|
|
3027
3027
|
constructor(modelId, config) {
|
|
3028
3028
|
this.specificationVersion = "v4";
|
|
3029
3029
|
var _a;
|
|
@@ -3038,7 +3038,7 @@ var AnthropicMessagesLanguageModel = class _AnthropicMessagesLanguageModel {
|
|
|
3038
3038
|
});
|
|
3039
3039
|
}
|
|
3040
3040
|
static [WORKFLOW_DESERIALIZE](options) {
|
|
3041
|
-
return new
|
|
3041
|
+
return new _AnthropicLanguageModel(options.modelId, options.config);
|
|
3042
3042
|
}
|
|
3043
3043
|
supportsUrl(url) {
|
|
3044
3044
|
return url.protocol === "https:";
|
|
@@ -3199,7 +3199,7 @@ var AnthropicMessagesLanguageModel = class _AnthropicMessagesLanguageModel {
|
|
|
3199
3199
|
"anthropic.tool_search_bm25_20251119": "tool_search_tool_bm25"
|
|
3200
3200
|
}
|
|
3201
3201
|
});
|
|
3202
|
-
const { prompt: messagesPrompt, betas } = await
|
|
3202
|
+
const { prompt: messagesPrompt, betas } = await convertToAnthropicPrompt({
|
|
3203
3203
|
prompt,
|
|
3204
3204
|
sendReasoning: (_d = anthropicOptions == null ? void 0 : anthropicOptions.sendReasoning) != null ? _d : true,
|
|
3205
3205
|
warnings,
|
|
@@ -3586,7 +3586,7 @@ var AnthropicMessagesLanguageModel = class _AnthropicMessagesLanguageModel {
|
|
|
3586
3586
|
body: this.transformRequestBody(args, betas),
|
|
3587
3587
|
failedResponseHandler: anthropicFailedResponseHandler,
|
|
3588
3588
|
successfulResponseHandler: createJsonResponseHandler2(
|
|
3589
|
-
|
|
3589
|
+
anthropicResponseSchema
|
|
3590
3590
|
),
|
|
3591
3591
|
abortSignal: options.abortSignal,
|
|
3592
3592
|
fetch: this.config.fetch
|
|
@@ -3935,7 +3935,7 @@ var AnthropicMessagesLanguageModel = class _AnthropicMessagesLanguageModel {
|
|
|
3935
3935
|
}),
|
|
3936
3936
|
raw: (_e = response.stop_reason) != null ? _e : void 0
|
|
3937
3937
|
},
|
|
3938
|
-
usage:
|
|
3938
|
+
usage: convertAnthropicUsage({ usage: response.usage }),
|
|
3939
3939
|
request: { body: args },
|
|
3940
3940
|
response: {
|
|
3941
3941
|
id: (_f = response.id) != null ? _f : void 0,
|
|
@@ -4005,9 +4005,7 @@ var AnthropicMessagesLanguageModel = class _AnthropicMessagesLanguageModel {
|
|
|
4005
4005
|
headers: await this.getHeaders({ betas, headers: options.headers }),
|
|
4006
4006
|
body: this.transformRequestBody(body, betas),
|
|
4007
4007
|
failedResponseHandler: anthropicFailedResponseHandler,
|
|
4008
|
-
successfulResponseHandler: createEventSourceResponseHandler(
|
|
4009
|
-
anthropicMessagesChunkSchema
|
|
4010
|
-
),
|
|
4008
|
+
successfulResponseHandler: createEventSourceResponseHandler(anthropicChunkSchema),
|
|
4011
4009
|
abortSignal: options.abortSignal,
|
|
4012
4010
|
fetch: this.config.fetch
|
|
4013
4011
|
});
|
|
@@ -4699,7 +4697,7 @@ var AnthropicMessagesLanguageModel = class _AnthropicMessagesLanguageModel {
|
|
|
4699
4697
|
controller.enqueue({
|
|
4700
4698
|
type: "finish",
|
|
4701
4699
|
finishReason,
|
|
4702
|
-
usage:
|
|
4700
|
+
usage: convertAnthropicUsage({ usage, rawUsage }),
|
|
4703
4701
|
providerMetadata
|
|
4704
4702
|
});
|
|
4705
4703
|
return;
|
|
@@ -4907,7 +4905,7 @@ function mapAnthropicResponseContextManagement(contextManagement) {
|
|
|
4907
4905
|
|
|
4908
4906
|
// src/tool/bash_20241022.ts
|
|
4909
4907
|
import {
|
|
4910
|
-
|
|
4908
|
+
createProviderDefinedToolFactory as createProviderDefinedToolFactory2,
|
|
4911
4909
|
lazySchema as lazySchema13,
|
|
4912
4910
|
zodSchema as zodSchema13
|
|
4913
4911
|
} from "@ai-sdk/provider-utils";
|
|
@@ -4920,14 +4918,14 @@ var bash_20241022InputSchema = lazySchema13(
|
|
|
4920
4918
|
})
|
|
4921
4919
|
)
|
|
4922
4920
|
);
|
|
4923
|
-
var bash_20241022 =
|
|
4921
|
+
var bash_20241022 = createProviderDefinedToolFactory2({
|
|
4924
4922
|
id: "anthropic.bash_20241022",
|
|
4925
4923
|
inputSchema: bash_20241022InputSchema
|
|
4926
4924
|
});
|
|
4927
4925
|
|
|
4928
4926
|
// src/tool/bash_20250124.ts
|
|
4929
4927
|
import {
|
|
4930
|
-
|
|
4928
|
+
createProviderDefinedToolFactory as createProviderDefinedToolFactory3,
|
|
4931
4929
|
lazySchema as lazySchema14,
|
|
4932
4930
|
zodSchema as zodSchema14
|
|
4933
4931
|
} from "@ai-sdk/provider-utils";
|
|
@@ -4940,14 +4938,14 @@ var bash_20250124InputSchema = lazySchema14(
|
|
|
4940
4938
|
})
|
|
4941
4939
|
)
|
|
4942
4940
|
);
|
|
4943
|
-
var bash_20250124 =
|
|
4941
|
+
var bash_20250124 = createProviderDefinedToolFactory3({
|
|
4944
4942
|
id: "anthropic.bash_20250124",
|
|
4945
4943
|
inputSchema: bash_20250124InputSchema
|
|
4946
4944
|
});
|
|
4947
4945
|
|
|
4948
4946
|
// src/tool/computer_20241022.ts
|
|
4949
4947
|
import {
|
|
4950
|
-
|
|
4948
|
+
createProviderDefinedToolFactory as createProviderDefinedToolFactory4,
|
|
4951
4949
|
lazySchema as lazySchema15,
|
|
4952
4950
|
zodSchema as zodSchema15
|
|
4953
4951
|
} from "@ai-sdk/provider-utils";
|
|
@@ -4972,14 +4970,14 @@ var computer_20241022InputSchema = lazySchema15(
|
|
|
4972
4970
|
})
|
|
4973
4971
|
)
|
|
4974
4972
|
);
|
|
4975
|
-
var computer_20241022 =
|
|
4973
|
+
var computer_20241022 = createProviderDefinedToolFactory4({
|
|
4976
4974
|
id: "anthropic.computer_20241022",
|
|
4977
4975
|
inputSchema: computer_20241022InputSchema
|
|
4978
4976
|
});
|
|
4979
4977
|
|
|
4980
4978
|
// src/tool/computer_20250124.ts
|
|
4981
4979
|
import {
|
|
4982
|
-
|
|
4980
|
+
createProviderDefinedToolFactory as createProviderDefinedToolFactory5,
|
|
4983
4981
|
lazySchema as lazySchema16,
|
|
4984
4982
|
zodSchema as zodSchema16
|
|
4985
4983
|
} from "@ai-sdk/provider-utils";
|
|
@@ -5014,14 +5012,14 @@ var computer_20250124InputSchema = lazySchema16(
|
|
|
5014
5012
|
})
|
|
5015
5013
|
)
|
|
5016
5014
|
);
|
|
5017
|
-
var computer_20250124 =
|
|
5015
|
+
var computer_20250124 = createProviderDefinedToolFactory5({
|
|
5018
5016
|
id: "anthropic.computer_20250124",
|
|
5019
5017
|
inputSchema: computer_20250124InputSchema
|
|
5020
5018
|
});
|
|
5021
5019
|
|
|
5022
5020
|
// src/tool/computer_20251124.ts
|
|
5023
5021
|
import {
|
|
5024
|
-
|
|
5022
|
+
createProviderDefinedToolFactory as createProviderDefinedToolFactory6,
|
|
5025
5023
|
lazySchema as lazySchema17,
|
|
5026
5024
|
zodSchema as zodSchema17
|
|
5027
5025
|
} from "@ai-sdk/provider-utils";
|
|
@@ -5063,14 +5061,14 @@ var computer_20251124InputSchema = lazySchema17(
|
|
|
5063
5061
|
})
|
|
5064
5062
|
)
|
|
5065
5063
|
);
|
|
5066
|
-
var computer_20251124 =
|
|
5064
|
+
var computer_20251124 = createProviderDefinedToolFactory6({
|
|
5067
5065
|
id: "anthropic.computer_20251124",
|
|
5068
5066
|
inputSchema: computer_20251124InputSchema
|
|
5069
5067
|
});
|
|
5070
5068
|
|
|
5071
5069
|
// src/tool/memory_20250818.ts
|
|
5072
5070
|
import {
|
|
5073
|
-
|
|
5071
|
+
createProviderDefinedToolFactory as createProviderDefinedToolFactory7,
|
|
5074
5072
|
lazySchema as lazySchema18,
|
|
5075
5073
|
zodSchema as zodSchema18
|
|
5076
5074
|
} from "@ai-sdk/provider-utils";
|
|
@@ -5112,14 +5110,14 @@ var memory_20250818InputSchema = lazySchema18(
|
|
|
5112
5110
|
])
|
|
5113
5111
|
)
|
|
5114
5112
|
);
|
|
5115
|
-
var memory_20250818 =
|
|
5113
|
+
var memory_20250818 = createProviderDefinedToolFactory7({
|
|
5116
5114
|
id: "anthropic.memory_20250818",
|
|
5117
5115
|
inputSchema: memory_20250818InputSchema
|
|
5118
5116
|
});
|
|
5119
5117
|
|
|
5120
5118
|
// src/tool/text-editor_20241022.ts
|
|
5121
5119
|
import {
|
|
5122
|
-
|
|
5120
|
+
createProviderDefinedToolFactory as createProviderDefinedToolFactory8,
|
|
5123
5121
|
lazySchema as lazySchema19,
|
|
5124
5122
|
zodSchema as zodSchema19
|
|
5125
5123
|
} from "@ai-sdk/provider-utils";
|
|
@@ -5138,14 +5136,14 @@ var textEditor_20241022InputSchema = lazySchema19(
|
|
|
5138
5136
|
})
|
|
5139
5137
|
)
|
|
5140
5138
|
);
|
|
5141
|
-
var textEditor_20241022 =
|
|
5139
|
+
var textEditor_20241022 = createProviderDefinedToolFactory8({
|
|
5142
5140
|
id: "anthropic.text_editor_20241022",
|
|
5143
5141
|
inputSchema: textEditor_20241022InputSchema
|
|
5144
5142
|
});
|
|
5145
5143
|
|
|
5146
5144
|
// src/tool/text-editor_20250124.ts
|
|
5147
5145
|
import {
|
|
5148
|
-
|
|
5146
|
+
createProviderDefinedToolFactory as createProviderDefinedToolFactory9,
|
|
5149
5147
|
lazySchema as lazySchema20,
|
|
5150
5148
|
zodSchema as zodSchema20
|
|
5151
5149
|
} from "@ai-sdk/provider-utils";
|
|
@@ -5164,14 +5162,14 @@ var textEditor_20250124InputSchema = lazySchema20(
|
|
|
5164
5162
|
})
|
|
5165
5163
|
)
|
|
5166
5164
|
);
|
|
5167
|
-
var textEditor_20250124 =
|
|
5165
|
+
var textEditor_20250124 = createProviderDefinedToolFactory9({
|
|
5168
5166
|
id: "anthropic.text_editor_20250124",
|
|
5169
5167
|
inputSchema: textEditor_20250124InputSchema
|
|
5170
5168
|
});
|
|
5171
5169
|
|
|
5172
5170
|
// src/tool/text-editor_20250429.ts
|
|
5173
5171
|
import {
|
|
5174
|
-
|
|
5172
|
+
createProviderDefinedToolFactory as createProviderDefinedToolFactory10,
|
|
5175
5173
|
lazySchema as lazySchema21,
|
|
5176
5174
|
zodSchema as zodSchema21
|
|
5177
5175
|
} from "@ai-sdk/provider-utils";
|
|
@@ -5190,14 +5188,14 @@ var textEditor_20250429InputSchema = lazySchema21(
|
|
|
5190
5188
|
})
|
|
5191
5189
|
)
|
|
5192
5190
|
);
|
|
5193
|
-
var textEditor_20250429 =
|
|
5191
|
+
var textEditor_20250429 = createProviderDefinedToolFactory10({
|
|
5194
5192
|
id: "anthropic.text_editor_20250429",
|
|
5195
5193
|
inputSchema: textEditor_20250429InputSchema
|
|
5196
5194
|
});
|
|
5197
5195
|
|
|
5198
5196
|
// src/tool/tool-search-bm25_20251119.ts
|
|
5199
5197
|
import {
|
|
5200
|
-
|
|
5198
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory9,
|
|
5201
5199
|
lazySchema as lazySchema22,
|
|
5202
5200
|
zodSchema as zodSchema22
|
|
5203
5201
|
} from "@ai-sdk/provider-utils";
|
|
@@ -5227,7 +5225,7 @@ var toolSearchBm25_20251119InputSchema = lazySchema22(
|
|
|
5227
5225
|
})
|
|
5228
5226
|
)
|
|
5229
5227
|
);
|
|
5230
|
-
var factory10 =
|
|
5228
|
+
var factory10 = createProviderExecutedToolFactory9({
|
|
5231
5229
|
id: "anthropic.tool_search_bm25_20251119",
|
|
5232
5230
|
inputSchema: toolSearchBm25_20251119InputSchema,
|
|
5233
5231
|
outputSchema: toolSearchBm25_20251119OutputSchema,
|
|
@@ -5569,7 +5567,7 @@ var AnthropicSkills = class {
|
|
|
5569
5567
|
};
|
|
5570
5568
|
|
|
5571
5569
|
// src/version.ts
|
|
5572
|
-
var VERSION = true ? "4.0.0-beta.
|
|
5570
|
+
var VERSION = true ? "4.0.0-beta.39" : "0.0.0-test";
|
|
5573
5571
|
|
|
5574
5572
|
// src/anthropic-provider.ts
|
|
5575
5573
|
function createAnthropic(options = {}) {
|
|
@@ -5606,7 +5604,7 @@ function createAnthropic(options = {}) {
|
|
|
5606
5604
|
};
|
|
5607
5605
|
const createChatModel = (modelId) => {
|
|
5608
5606
|
var _a2;
|
|
5609
|
-
return new
|
|
5607
|
+
return new AnthropicLanguageModel(modelId, {
|
|
5610
5608
|
provider: providerName,
|
|
5611
5609
|
baseURL,
|
|
5612
5610
|
headers: getHeaders,
|