@ai-sdk/anthropic 4.0.0-beta.3 → 4.0.0-beta.31
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 +230 -4
- package/README.md +2 -0
- package/dist/index.d.ts +60 -34
- package/dist/index.js +1747 -1218
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +67 -36
- package/dist/internal/index.js +1506 -1203
- package/dist/internal/index.js.map +1 -1
- package/docs/05-anthropic.mdx +105 -4
- package/package.json +9 -12
- package/src/anthropic-files.ts +96 -0
- package/src/anthropic-messages-api.ts +4 -0
- package/src/anthropic-messages-language-model.ts +219 -9
- package/src/anthropic-messages-options.ts +62 -6
- package/src/anthropic-prepare-tools.ts +16 -4
- package/src/anthropic-provider.ts +30 -1
- package/src/convert-to-anthropic-messages-prompt.ts +42 -20
- package/src/internal/index.ts +4 -1
- package/src/skills/anthropic-skills-api.ts +44 -0
- package/src/skills/anthropic-skills.ts +136 -0
- package/dist/index.d.mts +0 -1090
- package/dist/index.mjs +0 -5233
- package/dist/index.mjs.map +0 -1
- package/dist/internal/index.d.mts +0 -960
- package/dist/internal/index.mjs +0 -5125
- package/dist/internal/index.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,231 @@
|
|
|
1
1
|
# @ai-sdk/anthropic
|
|
2
2
|
|
|
3
|
+
## 4.0.0-beta.31
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [083947b]
|
|
8
|
+
- @ai-sdk/provider-utils@5.0.0-beta.22
|
|
9
|
+
|
|
10
|
+
## 4.0.0-beta.30
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 0d8f107: feat(provider/anthropic): add support for Opus 4.7 and relevant API enhancements
|
|
15
|
+
|
|
16
|
+
## 4.0.0-beta.29
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [add1126]
|
|
21
|
+
- @ai-sdk/provider-utils@5.0.0-beta.21
|
|
22
|
+
|
|
23
|
+
## 4.0.0-beta.28
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- b3976a2: Add workflow serialization support to all provider models.
|
|
28
|
+
|
|
29
|
+
**`@ai-sdk/provider-utils`:** New `serializeModel()` helper that extracts only serializable properties from a model instance, filtering out functions and objects containing functions. Third-party provider authors can use this to add workflow support to their own models.
|
|
30
|
+
|
|
31
|
+
**All providers:** `headers` is now optional in provider config types. This is non-breaking — existing code that passes `headers` continues to work. Custom provider implementations that construct model configs manually can now omit `headers`, which is useful when models are deserialized from a workflow step boundary where auth is provided separately.
|
|
32
|
+
|
|
33
|
+
All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
|
|
34
|
+
|
|
35
|
+
- ff5eba1: feat: roll `image-*` tool output types into their equivalent `file-*` types
|
|
36
|
+
- Updated dependencies [b3976a2]
|
|
37
|
+
- Updated dependencies [ff5eba1]
|
|
38
|
+
- @ai-sdk/provider-utils@5.0.0-beta.20
|
|
39
|
+
- @ai-sdk/provider@4.0.0-beta.12
|
|
40
|
+
|
|
41
|
+
## 4.0.0-beta.27
|
|
42
|
+
|
|
43
|
+
### Major Changes
|
|
44
|
+
|
|
45
|
+
- ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- Updated dependencies [ef992f8]
|
|
50
|
+
- @ai-sdk/provider@4.0.0-beta.11
|
|
51
|
+
- @ai-sdk/provider-utils@5.0.0-beta.19
|
|
52
|
+
|
|
53
|
+
## 4.0.0-beta.26
|
|
54
|
+
|
|
55
|
+
### Patch Changes
|
|
56
|
+
|
|
57
|
+
- 90e2d8a: chore: fix unused vars not being flagged by our lint tooling
|
|
58
|
+
- Updated dependencies [90e2d8a]
|
|
59
|
+
- @ai-sdk/provider-utils@5.0.0-beta.18
|
|
60
|
+
|
|
61
|
+
## 4.0.0-beta.25
|
|
62
|
+
|
|
63
|
+
### Patch Changes
|
|
64
|
+
|
|
65
|
+
- 09bd27b: feat (provider/anthropic): add support for inference_geo provider option
|
|
66
|
+
|
|
67
|
+
## 4.0.0-beta.24
|
|
68
|
+
|
|
69
|
+
### Patch Changes
|
|
70
|
+
|
|
71
|
+
- Updated dependencies [3ae1786]
|
|
72
|
+
- @ai-sdk/provider-utils@5.0.0-beta.17
|
|
73
|
+
|
|
74
|
+
## 4.0.0-beta.23
|
|
75
|
+
|
|
76
|
+
### Patch Changes
|
|
77
|
+
|
|
78
|
+
- Updated dependencies [176466a]
|
|
79
|
+
- @ai-sdk/provider@4.0.0-beta.10
|
|
80
|
+
- @ai-sdk/provider-utils@5.0.0-beta.16
|
|
81
|
+
|
|
82
|
+
## 4.0.0-beta.22
|
|
83
|
+
|
|
84
|
+
### Patch Changes
|
|
85
|
+
|
|
86
|
+
- e311194: feat(ai): allow passing provider instance to `uploadFile` and `uploadSkill` as shorthand
|
|
87
|
+
- Updated dependencies [e311194]
|
|
88
|
+
- @ai-sdk/provider@4.0.0-beta.9
|
|
89
|
+
- @ai-sdk/provider-utils@5.0.0-beta.15
|
|
90
|
+
|
|
91
|
+
## 4.0.0-beta.21
|
|
92
|
+
|
|
93
|
+
### Patch Changes
|
|
94
|
+
|
|
95
|
+
- 34bd95d: feat(ai): add support for uploading provider skills using the provider references abstraction
|
|
96
|
+
- Updated dependencies [34bd95d]
|
|
97
|
+
- Updated dependencies [008271d]
|
|
98
|
+
- @ai-sdk/provider@4.0.0-beta.8
|
|
99
|
+
- @ai-sdk/provider-utils@5.0.0-beta.14
|
|
100
|
+
|
|
101
|
+
## 4.0.0-beta.20
|
|
102
|
+
|
|
103
|
+
### Patch Changes
|
|
104
|
+
|
|
105
|
+
- Updated dependencies [b0c2869]
|
|
106
|
+
- Updated dependencies [7e26e81]
|
|
107
|
+
- @ai-sdk/provider-utils@5.0.0-beta.13
|
|
108
|
+
|
|
109
|
+
## 4.0.0-beta.19
|
|
110
|
+
|
|
111
|
+
### Patch Changes
|
|
112
|
+
|
|
113
|
+
- Updated dependencies [46d1149]
|
|
114
|
+
- @ai-sdk/provider-utils@5.0.0-beta.12
|
|
115
|
+
|
|
116
|
+
## 4.0.0-beta.18
|
|
117
|
+
|
|
118
|
+
### Patch Changes
|
|
119
|
+
|
|
120
|
+
- 6fd51c0: fix(provider): preserve error type prefix in getErrorMessage
|
|
121
|
+
- Updated dependencies [6fd51c0]
|
|
122
|
+
- @ai-sdk/provider-utils@5.0.0-beta.11
|
|
123
|
+
- @ai-sdk/provider@4.0.0-beta.7
|
|
124
|
+
|
|
125
|
+
## 4.0.0-beta.17
|
|
126
|
+
|
|
127
|
+
### Patch Changes
|
|
128
|
+
|
|
129
|
+
- c29a26f: feat(provider): add support for provider references and uploading files as supported per provider
|
|
130
|
+
- Updated dependencies [c29a26f]
|
|
131
|
+
- @ai-sdk/provider-utils@5.0.0-beta.10
|
|
132
|
+
- @ai-sdk/provider@4.0.0-beta.6
|
|
133
|
+
|
|
134
|
+
## 4.0.0-beta.16
|
|
135
|
+
|
|
136
|
+
### Patch Changes
|
|
137
|
+
|
|
138
|
+
- 38fc777: Add AI Gateway hint to provider READMEs
|
|
139
|
+
|
|
140
|
+
## 4.0.0-beta.15
|
|
141
|
+
|
|
142
|
+
### Patch Changes
|
|
143
|
+
|
|
144
|
+
- f57c702: fix(anthropic): allow both temperature and topP for non-Anthropic models using the Anthropic-compatible API
|
|
145
|
+
|
|
146
|
+
The temperature/topP mutual exclusivity check now only applies to known Anthropic models (model IDs starting with `claude-`). Non-Anthropic models using the Anthropic-compatible API (e.g. Minimax) can now send both parameters as required by their APIs.
|
|
147
|
+
|
|
148
|
+
## 4.0.0-beta.14
|
|
149
|
+
|
|
150
|
+
### Patch Changes
|
|
151
|
+
|
|
152
|
+
- Updated dependencies [2e17091]
|
|
153
|
+
- @ai-sdk/provider-utils@5.0.0-beta.9
|
|
154
|
+
|
|
155
|
+
## 4.0.0-beta.13
|
|
156
|
+
|
|
157
|
+
### Patch Changes
|
|
158
|
+
|
|
159
|
+
- Updated dependencies [986c6fd]
|
|
160
|
+
- Updated dependencies [493295c]
|
|
161
|
+
- @ai-sdk/provider-utils@5.0.0-beta.8
|
|
162
|
+
|
|
163
|
+
## 4.0.0-beta.12
|
|
164
|
+
|
|
165
|
+
### Patch Changes
|
|
166
|
+
|
|
167
|
+
- Updated dependencies [1f509d4]
|
|
168
|
+
- @ai-sdk/provider-utils@5.0.0-beta.7
|
|
169
|
+
- @ai-sdk/provider@4.0.0-beta.5
|
|
170
|
+
|
|
171
|
+
## 4.0.0-beta.11
|
|
172
|
+
|
|
173
|
+
### Patch Changes
|
|
174
|
+
|
|
175
|
+
- 0ee8aec: feat (provider/anthropic): support passing metadata.user_id
|
|
176
|
+
|
|
177
|
+
## 4.0.0-beta.10
|
|
178
|
+
|
|
179
|
+
### Patch Changes
|
|
180
|
+
|
|
181
|
+
- 3887c70: feat(provider): add new top-level reasoning parameter to spec and support it in `generateText` and `streamText`
|
|
182
|
+
- Updated dependencies [3887c70]
|
|
183
|
+
- @ai-sdk/provider-utils@5.0.0-beta.6
|
|
184
|
+
- @ai-sdk/provider@4.0.0-beta.4
|
|
185
|
+
|
|
186
|
+
## 4.0.0-beta.9
|
|
187
|
+
|
|
188
|
+
### Patch Changes
|
|
189
|
+
|
|
190
|
+
- Updated dependencies [776b617]
|
|
191
|
+
- @ai-sdk/provider-utils@5.0.0-beta.5
|
|
192
|
+
- @ai-sdk/provider@4.0.0-beta.3
|
|
193
|
+
|
|
194
|
+
## 4.0.0-beta.8
|
|
195
|
+
|
|
196
|
+
### Patch Changes
|
|
197
|
+
|
|
198
|
+
- Updated dependencies [61753c3]
|
|
199
|
+
- @ai-sdk/provider-utils@5.0.0-beta.4
|
|
200
|
+
|
|
201
|
+
## 4.0.0-beta.7
|
|
202
|
+
|
|
203
|
+
### Patch Changes
|
|
204
|
+
|
|
205
|
+
- Updated dependencies [f7d4f01]
|
|
206
|
+
- @ai-sdk/provider-utils@5.0.0-beta.3
|
|
207
|
+
- @ai-sdk/provider@4.0.0-beta.2
|
|
208
|
+
|
|
209
|
+
## 4.0.0-beta.6
|
|
210
|
+
|
|
211
|
+
### Patch Changes
|
|
212
|
+
|
|
213
|
+
- 21d1ee3: fix(anthropic): skip passing beta header for tool search tools
|
|
214
|
+
|
|
215
|
+
## 4.0.0-beta.5
|
|
216
|
+
|
|
217
|
+
### Patch Changes
|
|
218
|
+
|
|
219
|
+
- Updated dependencies [5c2a5a2]
|
|
220
|
+
- @ai-sdk/provider@4.0.0-beta.1
|
|
221
|
+
- @ai-sdk/provider-utils@5.0.0-beta.2
|
|
222
|
+
|
|
223
|
+
## 4.0.0-beta.4
|
|
224
|
+
|
|
225
|
+
### Patch Changes
|
|
226
|
+
|
|
227
|
+
- f05a40d: fix(vertex): throw warning when strict: true for vertexAnthropic
|
|
228
|
+
|
|
3
229
|
## 4.0.0-beta.3
|
|
4
230
|
|
|
5
231
|
### Patch Changes
|
|
@@ -446,13 +672,13 @@
|
|
|
446
672
|
Before
|
|
447
673
|
|
|
448
674
|
```ts
|
|
449
|
-
model.textEmbeddingModel(
|
|
675
|
+
model.textEmbeddingModel("my-model-id");
|
|
450
676
|
```
|
|
451
677
|
|
|
452
678
|
After
|
|
453
679
|
|
|
454
680
|
```ts
|
|
455
|
-
model.embeddingModel(
|
|
681
|
+
model.embeddingModel("my-model-id");
|
|
456
682
|
```
|
|
457
683
|
|
|
458
684
|
- f33a018: chore: add model ID for Haiku 4.5
|
|
@@ -792,13 +1018,13 @@
|
|
|
792
1018
|
Before
|
|
793
1019
|
|
|
794
1020
|
```ts
|
|
795
|
-
model.textEmbeddingModel(
|
|
1021
|
+
model.textEmbeddingModel("my-model-id");
|
|
796
1022
|
```
|
|
797
1023
|
|
|
798
1024
|
After
|
|
799
1025
|
|
|
800
1026
|
```ts
|
|
801
|
-
model.embeddingModel(
|
|
1027
|
+
model.embeddingModel("my-model-id");
|
|
802
1028
|
```
|
|
803
1029
|
|
|
804
1030
|
- Updated dependencies [8d9e8ad]
|
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
The **[Anthropic provider](https://ai-sdk.dev/providers/ai-sdk-providers/anthropic)** for the [AI SDK](https://ai-sdk.dev/docs) contains language model support for the [Anthropic Messages API](https://docs.anthropic.com/claude/reference/messages_post).
|
|
4
4
|
|
|
5
|
+
> **Deploying to Vercel?** With Vercel's AI Gateway you can access Anthropic (and hundreds of models from other providers) — no additional packages, API keys, or extra cost. [Get started with AI Gateway](https://vercel.com/ai-gateway).
|
|
6
|
+
|
|
5
7
|
## Setup
|
|
6
8
|
|
|
7
9
|
The Anthropic provider is available in the `@ai-sdk/anthropic` module. You can install it with
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JSONObject, ProviderV4, LanguageModelV4 } from '@ai-sdk/provider';
|
|
1
|
+
import { JSONObject, ProviderV4, LanguageModelV4, FilesV4, SkillsV4 } from '@ai-sdk/provider';
|
|
2
2
|
import { z } from 'zod/v4';
|
|
3
3
|
import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
|
|
4
4
|
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
@@ -128,7 +128,7 @@ interface AnthropicMessageMetadata {
|
|
|
128
128
|
} | null;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
type AnthropicMessagesModelId = 'claude-3-haiku-20240307' | 'claude-haiku-4-5-20251001' | 'claude-haiku-4-5' | 'claude-opus-4-0' | 'claude-opus-4-20250514' | 'claude-opus-4-1-20250805' | 'claude-opus-4-1' | 'claude-opus-4-5' | 'claude-opus-4-5-20251101' | 'claude-sonnet-4-0' | 'claude-sonnet-4-20250514' | 'claude-sonnet-4-5-20250929' | 'claude-sonnet-4-5' | 'claude-sonnet-4-6' | 'claude-opus-4-6' | (string & {});
|
|
131
|
+
type AnthropicMessagesModelId = 'claude-3-haiku-20240307' | 'claude-haiku-4-5-20251001' | 'claude-haiku-4-5' | 'claude-opus-4-0' | 'claude-opus-4-20250514' | 'claude-opus-4-1-20250805' | 'claude-opus-4-1' | 'claude-opus-4-5' | 'claude-opus-4-5-20251101' | 'claude-sonnet-4-0' | 'claude-sonnet-4-20250514' | 'claude-sonnet-4-5-20250929' | 'claude-sonnet-4-5' | 'claude-sonnet-4-6' | 'claude-opus-4-6' | 'claude-opus-4-7' | (string & {});
|
|
132
132
|
declare const anthropicLanguageModelOptions: z.ZodObject<{
|
|
133
133
|
sendReasoning: z.ZodOptional<z.ZodBoolean>;
|
|
134
134
|
structuredOutputMode: z.ZodOptional<z.ZodEnum<{
|
|
@@ -138,6 +138,10 @@ declare const anthropicLanguageModelOptions: z.ZodObject<{
|
|
|
138
138
|
}>>;
|
|
139
139
|
thinking: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
140
140
|
type: z.ZodLiteral<"adaptive">;
|
|
141
|
+
display: z.ZodOptional<z.ZodEnum<{
|
|
142
|
+
omitted: "omitted";
|
|
143
|
+
summarized: "summarized";
|
|
144
|
+
}>>;
|
|
141
145
|
}, z.core.$strip>, z.ZodObject<{
|
|
142
146
|
type: z.ZodLiteral<"enabled">;
|
|
143
147
|
budgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -149,6 +153,9 @@ declare const anthropicLanguageModelOptions: z.ZodObject<{
|
|
|
149
153
|
type: z.ZodLiteral<"ephemeral">;
|
|
150
154
|
ttl: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"5m">, z.ZodLiteral<"1h">]>>;
|
|
151
155
|
}, z.core.$strip>>;
|
|
156
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
157
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
158
|
+
}, z.core.$strip>>;
|
|
152
159
|
mcpServers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
153
160
|
type: z.ZodLiteral<"url">;
|
|
154
161
|
name: z.ZodString;
|
|
@@ -161,23 +168,37 @@ declare const anthropicLanguageModelOptions: z.ZodObject<{
|
|
|
161
168
|
}, z.core.$strip>>>;
|
|
162
169
|
container: z.ZodOptional<z.ZodObject<{
|
|
163
170
|
id: z.ZodOptional<z.ZodString>;
|
|
164
|
-
skills: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
165
|
-
type: z.
|
|
171
|
+
skills: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
172
|
+
type: z.ZodLiteral<"anthropic">;
|
|
166
173
|
skillId: z.ZodString;
|
|
167
174
|
version: z.ZodOptional<z.ZodString>;
|
|
168
|
-
}, z.core.$strip
|
|
175
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
176
|
+
type: z.ZodLiteral<"custom">;
|
|
177
|
+
providerReference: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
178
|
+
version: z.ZodOptional<z.ZodString>;
|
|
179
|
+
}, z.core.$strip>]>>>;
|
|
169
180
|
}, z.core.$strip>>;
|
|
170
181
|
toolStreaming: z.ZodOptional<z.ZodBoolean>;
|
|
171
182
|
effort: z.ZodOptional<z.ZodEnum<{
|
|
172
183
|
low: "low";
|
|
173
184
|
medium: "medium";
|
|
174
185
|
high: "high";
|
|
186
|
+
xhigh: "xhigh";
|
|
175
187
|
max: "max";
|
|
176
188
|
}>>;
|
|
189
|
+
taskBudget: z.ZodOptional<z.ZodObject<{
|
|
190
|
+
type: z.ZodLiteral<"tokens">;
|
|
191
|
+
total: z.ZodNumber;
|
|
192
|
+
remaining: z.ZodOptional<z.ZodNumber>;
|
|
193
|
+
}, z.core.$strip>>;
|
|
177
194
|
speed: z.ZodOptional<z.ZodEnum<{
|
|
178
195
|
fast: "fast";
|
|
179
196
|
standard: "standard";
|
|
180
197
|
}>>;
|
|
198
|
+
inferenceGeo: z.ZodOptional<z.ZodEnum<{
|
|
199
|
+
us: "us";
|
|
200
|
+
global: "global";
|
|
201
|
+
}>>;
|
|
181
202
|
anthropicBeta: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
182
203
|
contextManagement: z.ZodOptional<z.ZodObject<{
|
|
183
204
|
edits: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -234,7 +255,7 @@ declare const anthropicTools: {
|
|
|
234
255
|
bash_20241022: _ai_sdk_provider_utils.ProviderToolFactory<{
|
|
235
256
|
command: string;
|
|
236
257
|
restart?: boolean;
|
|
237
|
-
}, {}>;
|
|
258
|
+
}, {}, {}>;
|
|
238
259
|
/**
|
|
239
260
|
* The bash tool enables Claude to execute shell commands in a persistent bash session,
|
|
240
261
|
* allowing system operations, script execution, and command-line automation.
|
|
@@ -244,7 +265,7 @@ declare const anthropicTools: {
|
|
|
244
265
|
bash_20250124: _ai_sdk_provider_utils.ProviderToolFactory<{
|
|
245
266
|
command: string;
|
|
246
267
|
restart?: boolean;
|
|
247
|
-
}, {}>;
|
|
268
|
+
}, {}, {}>;
|
|
248
269
|
/**
|
|
249
270
|
* Claude can analyze data, create visualizations, perform complex calculations,
|
|
250
271
|
* run system commands, create and edit files, and process uploaded files directly within
|
|
@@ -264,7 +285,7 @@ declare const anthropicTools: {
|
|
|
264
285
|
type: "code_execution_output";
|
|
265
286
|
file_id: string;
|
|
266
287
|
}>;
|
|
267
|
-
}, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
288
|
+
}, {}, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
268
289
|
code: string;
|
|
269
290
|
}, {
|
|
270
291
|
type: "code_execution_result";
|
|
@@ -275,7 +296,7 @@ declare const anthropicTools: {
|
|
|
275
296
|
type: "code_execution_output";
|
|
276
297
|
file_id: string;
|
|
277
298
|
}>;
|
|
278
|
-
}>;
|
|
299
|
+
}, {}>;
|
|
279
300
|
/**
|
|
280
301
|
* Claude can analyze data, create visualizations, perform complex calculations,
|
|
281
302
|
* run system commands, create and edit files, and process uploaded files directly within
|
|
@@ -348,7 +369,7 @@ declare const anthropicTools: {
|
|
|
348
369
|
new_start: number | null;
|
|
349
370
|
old_lines: number | null;
|
|
350
371
|
old_start: number | null;
|
|
351
|
-
}, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
372
|
+
}, {}, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
352
373
|
type: "programmatic-tool-call";
|
|
353
374
|
code: string;
|
|
354
375
|
} | {
|
|
@@ -410,7 +431,7 @@ declare const anthropicTools: {
|
|
|
410
431
|
new_start: number | null;
|
|
411
432
|
old_lines: number | null;
|
|
412
433
|
old_start: number | null;
|
|
413
|
-
}>;
|
|
434
|
+
}, {}>;
|
|
414
435
|
/**
|
|
415
436
|
* Claude can analyze data, create visualizations, perform complex calculations,
|
|
416
437
|
* run system commands, create and edit files, and process uploaded files directly within
|
|
@@ -494,7 +515,7 @@ declare const anthropicTools: {
|
|
|
494
515
|
new_start: number | null;
|
|
495
516
|
old_lines: number | null;
|
|
496
517
|
old_start: number | null;
|
|
497
|
-
}, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
518
|
+
}, {}, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
498
519
|
type: "programmatic-tool-call";
|
|
499
520
|
code: string;
|
|
500
521
|
} | {
|
|
@@ -565,7 +586,7 @@ declare const anthropicTools: {
|
|
|
565
586
|
new_start: number | null;
|
|
566
587
|
old_lines: number | null;
|
|
567
588
|
old_start: number | null;
|
|
568
|
-
}>;
|
|
589
|
+
}, {}>;
|
|
569
590
|
/**
|
|
570
591
|
* Claude can interact with computer environments through the computer use tool, which
|
|
571
592
|
* provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.
|
|
@@ -584,7 +605,7 @@ declare const anthropicTools: {
|
|
|
584
605
|
displayWidthPx: number;
|
|
585
606
|
displayHeightPx: number;
|
|
586
607
|
displayNumber?: number;
|
|
587
|
-
}>;
|
|
608
|
+
}, {}>;
|
|
588
609
|
/**
|
|
589
610
|
* Claude can interact with computer environments through the computer use tool, which
|
|
590
611
|
* provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.
|
|
@@ -607,7 +628,7 @@ declare const anthropicTools: {
|
|
|
607
628
|
displayWidthPx: number;
|
|
608
629
|
displayHeightPx: number;
|
|
609
630
|
displayNumber?: number;
|
|
610
|
-
}>;
|
|
631
|
+
}, {}>;
|
|
611
632
|
/**
|
|
612
633
|
* Claude can interact with computer environments through the computer use tool, which
|
|
613
634
|
* provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.
|
|
@@ -637,7 +658,7 @@ declare const anthropicTools: {
|
|
|
637
658
|
displayHeightPx: number;
|
|
638
659
|
displayNumber?: number;
|
|
639
660
|
enableZoom?: boolean;
|
|
640
|
-
}>;
|
|
661
|
+
}, {}>;
|
|
641
662
|
/**
|
|
642
663
|
* The memory tool enables Claude to store and retrieve information across conversations through a memory file directory.
|
|
643
664
|
* Claude can create, read, update, and delete files that persist between sessions,
|
|
@@ -671,7 +692,7 @@ declare const anthropicTools: {
|
|
|
671
692
|
command: "rename";
|
|
672
693
|
old_path: string;
|
|
673
694
|
new_path: string;
|
|
674
|
-
}, {}>;
|
|
695
|
+
}, {}, {}>;
|
|
675
696
|
/**
|
|
676
697
|
* Claude can use an Anthropic-defined text editor tool to view and modify text files,
|
|
677
698
|
* helping you debug, fix, and improve your code or other text documents. This allows Claude
|
|
@@ -688,7 +709,7 @@ declare const anthropicTools: {
|
|
|
688
709
|
insert_text?: string;
|
|
689
710
|
old_str?: string;
|
|
690
711
|
view_range?: number[];
|
|
691
|
-
}, {}>;
|
|
712
|
+
}, {}, {}>;
|
|
692
713
|
/**
|
|
693
714
|
* Claude can use an Anthropic-defined text editor tool to view and modify text files,
|
|
694
715
|
* helping you debug, fix, and improve your code or other text documents. This allows Claude
|
|
@@ -705,7 +726,7 @@ declare const anthropicTools: {
|
|
|
705
726
|
insert_text?: string;
|
|
706
727
|
old_str?: string;
|
|
707
728
|
view_range?: number[];
|
|
708
|
-
}, {}>;
|
|
729
|
+
}, {}, {}>;
|
|
709
730
|
/**
|
|
710
731
|
* Claude can use an Anthropic-defined text editor tool to view and modify text files,
|
|
711
732
|
* helping you debug, fix, and improve your code or other text documents. This allows Claude
|
|
@@ -724,7 +745,7 @@ declare const anthropicTools: {
|
|
|
724
745
|
insert_text?: string;
|
|
725
746
|
old_str?: string;
|
|
726
747
|
view_range?: number[];
|
|
727
|
-
}, {}>;
|
|
748
|
+
}, {}, {}>;
|
|
728
749
|
/**
|
|
729
750
|
* Claude can use an Anthropic-defined text editor tool to view and modify text files,
|
|
730
751
|
* helping you debug, fix, and improve your code or other text documents. This allows Claude
|
|
@@ -747,7 +768,7 @@ declare const anthropicTools: {
|
|
|
747
768
|
view_range?: number[];
|
|
748
769
|
}, {
|
|
749
770
|
maxCharacters?: number;
|
|
750
|
-
}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
771
|
+
}, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
751
772
|
command: "view" | "create" | "str_replace" | "insert";
|
|
752
773
|
path: string;
|
|
753
774
|
file_text?: string;
|
|
@@ -756,7 +777,7 @@ declare const anthropicTools: {
|
|
|
756
777
|
insert_text?: string;
|
|
757
778
|
old_str?: string;
|
|
758
779
|
view_range?: number[];
|
|
759
|
-
}, unknown>;
|
|
780
|
+
}, unknown, {}>;
|
|
760
781
|
/**
|
|
761
782
|
* Creates a web fetch tool that gives Claude direct access to real-time web content.
|
|
762
783
|
*
|
|
@@ -796,7 +817,7 @@ declare const anthropicTools: {
|
|
|
796
817
|
enabled: boolean;
|
|
797
818
|
};
|
|
798
819
|
maxContentTokens?: number;
|
|
799
|
-
}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
820
|
+
}, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
800
821
|
url: string;
|
|
801
822
|
}, {
|
|
802
823
|
type: "web_fetch_result";
|
|
@@ -818,7 +839,7 @@ declare const anthropicTools: {
|
|
|
818
839
|
};
|
|
819
840
|
};
|
|
820
841
|
retrievedAt: string | null;
|
|
821
|
-
}>;
|
|
842
|
+
}, {}>;
|
|
822
843
|
/**
|
|
823
844
|
* Creates a web fetch tool that gives Claude direct access to real-time web content.
|
|
824
845
|
*
|
|
@@ -858,7 +879,7 @@ declare const anthropicTools: {
|
|
|
858
879
|
enabled: boolean;
|
|
859
880
|
};
|
|
860
881
|
maxContentTokens?: number;
|
|
861
|
-
}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
882
|
+
}, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
862
883
|
url: string;
|
|
863
884
|
}, {
|
|
864
885
|
type: "web_fetch_result";
|
|
@@ -880,7 +901,7 @@ declare const anthropicTools: {
|
|
|
880
901
|
};
|
|
881
902
|
};
|
|
882
903
|
retrievedAt: string | null;
|
|
883
|
-
}>;
|
|
904
|
+
}, {}>;
|
|
884
905
|
/**
|
|
885
906
|
* Creates a web search tool that gives Claude direct access to real-time web content.
|
|
886
907
|
*
|
|
@@ -908,7 +929,7 @@ declare const anthropicTools: {
|
|
|
908
929
|
country?: string;
|
|
909
930
|
timezone?: string;
|
|
910
931
|
};
|
|
911
|
-
}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
932
|
+
}, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
912
933
|
query: string;
|
|
913
934
|
}, {
|
|
914
935
|
type: "web_search_result";
|
|
@@ -916,7 +937,7 @@ declare const anthropicTools: {
|
|
|
916
937
|
title: string | null;
|
|
917
938
|
pageAge: string | null;
|
|
918
939
|
encryptedContent: string;
|
|
919
|
-
}[]>;
|
|
940
|
+
}[], {}>;
|
|
920
941
|
/**
|
|
921
942
|
* Creates a web search tool that gives Claude direct access to real-time web content.
|
|
922
943
|
*
|
|
@@ -944,7 +965,7 @@ declare const anthropicTools: {
|
|
|
944
965
|
country?: string;
|
|
945
966
|
timezone?: string;
|
|
946
967
|
};
|
|
947
|
-
}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
968
|
+
}, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
948
969
|
query: string;
|
|
949
970
|
}, {
|
|
950
971
|
type: "web_search_result";
|
|
@@ -952,7 +973,7 @@ declare const anthropicTools: {
|
|
|
952
973
|
title: string | null;
|
|
953
974
|
pageAge: string | null;
|
|
954
975
|
encryptedContent: string;
|
|
955
|
-
}[]>;
|
|
976
|
+
}[], {}>;
|
|
956
977
|
/**
|
|
957
978
|
* Creates a tool search tool that uses regex patterns to find tools.
|
|
958
979
|
*
|
|
@@ -972,13 +993,13 @@ declare const anthropicTools: {
|
|
|
972
993
|
}, {
|
|
973
994
|
type: "tool_reference";
|
|
974
995
|
toolName: string;
|
|
975
|
-
}[], {}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
996
|
+
}[], {}, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
976
997
|
pattern: string;
|
|
977
998
|
limit?: number;
|
|
978
999
|
}, {
|
|
979
1000
|
type: "tool_reference";
|
|
980
1001
|
toolName: string;
|
|
981
|
-
}[]>;
|
|
1002
|
+
}[], {}>;
|
|
982
1003
|
/**
|
|
983
1004
|
* Creates a tool search tool that uses BM25 (natural language) to find tools.
|
|
984
1005
|
*
|
|
@@ -998,13 +1019,13 @@ declare const anthropicTools: {
|
|
|
998
1019
|
}, {
|
|
999
1020
|
type: "tool_reference";
|
|
1000
1021
|
toolName: string;
|
|
1001
|
-
}[], {}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
1022
|
+
}[], {}, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
1002
1023
|
query: string;
|
|
1003
1024
|
limit?: number;
|
|
1004
1025
|
}, {
|
|
1005
1026
|
type: "tool_reference";
|
|
1006
1027
|
toolName: string;
|
|
1007
|
-
}[]>;
|
|
1028
|
+
}[], {}>;
|
|
1008
1029
|
};
|
|
1009
1030
|
|
|
1010
1031
|
interface AnthropicProvider extends ProviderV4 {
|
|
@@ -1022,6 +1043,11 @@ interface AnthropicProvider extends ProviderV4 {
|
|
|
1022
1043
|
* @deprecated Use `embeddingModel` instead.
|
|
1023
1044
|
*/
|
|
1024
1045
|
textEmbeddingModel(modelId: string): never;
|
|
1046
|
+
files(): FilesV4;
|
|
1047
|
+
/**
|
|
1048
|
+
* Returns a SkillsV4 interface for uploading skills to Anthropic.
|
|
1049
|
+
*/
|
|
1050
|
+
skills(): SkillsV4;
|
|
1025
1051
|
/**
|
|
1026
1052
|
* Anthropic-specific computer use tool.
|
|
1027
1053
|
*/
|