@ai-sdk/anthropic 4.0.0-beta.6 → 4.0.0-beta.67
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 +494 -4
- package/README.md +2 -0
- package/dist/index.d.ts +265 -68
- package/dist/index.js +2636 -1425
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +234 -62
- package/dist/internal/index.js +2605 -1411
- package/dist/internal/index.js.map +1 -1
- package/docs/05-anthropic.mdx +303 -20
- package/package.json +16 -17
- package/src/{anthropic-messages-api.ts → anthropic-api.ts} +158 -17
- package/src/anthropic-error.ts +1 -1
- package/src/anthropic-files.ts +95 -0
- package/src/{anthropic-messages-options.ts → anthropic-language-model-options.ts} +104 -11
- package/src/{anthropic-messages-language-model.ts → anthropic-language-model.ts} +494 -96
- package/src/anthropic-message-metadata.ts +69 -9
- package/src/anthropic-prepare-tools.ts +31 -5
- package/src/anthropic-provider.ts +42 -13
- package/src/anthropic-tools.ts +31 -0
- package/src/convert-anthropic-usage.ts +109 -0
- package/src/{convert-to-anthropic-messages-prompt.ts → convert-to-anthropic-prompt.ts} +376 -198
- package/src/forward-anthropic-container-id-from-last-step.ts +2 -2
- package/src/get-cache-control.ts +5 -2
- package/src/index.ts +1 -1
- package/src/internal/index.ts +13 -2
- package/src/map-anthropic-stop-reason.ts +1 -1
- package/src/sanitize-json-schema.ts +203 -0
- package/src/skills/anthropic-skills-api.ts +44 -0
- package/src/skills/anthropic-skills.ts +132 -0
- package/src/tool/advisor_20260301.ts +128 -0
- package/src/tool/bash_20241022.ts +84 -13
- package/src/tool/bash_20250124.ts +84 -13
- 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 +6 -3
- 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.d.mts +0 -1090
- package/dist/index.mjs +0 -5242
- package/dist/index.mjs.map +0 -1
- package/dist/internal/index.d.mts +0 -969
- package/dist/internal/index.mjs +0 -5134
- package/dist/internal/index.mjs.map +0 -1
- package/src/convert-anthropic-messages-usage.ts +0 -73
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,495 @@
|
|
|
1
1
|
# @ai-sdk/anthropic
|
|
2
2
|
|
|
3
|
+
## 4.0.0-beta.67
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b8396f0: trigger initial beta release
|
|
8
|
+
- Updated dependencies [b8396f0]
|
|
9
|
+
- @ai-sdk/provider-utils@5.0.0-beta.49
|
|
10
|
+
- @ai-sdk/provider@4.0.0-beta.19
|
|
11
|
+
|
|
12
|
+
## 4.0.0-canary.66
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [aeda373]
|
|
17
|
+
- Updated dependencies [375fdd7]
|
|
18
|
+
- Updated dependencies [b4507d5]
|
|
19
|
+
- @ai-sdk/provider-utils@5.0.0-canary.48
|
|
20
|
+
|
|
21
|
+
## 4.0.0-canary.65
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [bae5e2b]
|
|
26
|
+
- @ai-sdk/provider-utils@5.0.0-canary.47
|
|
27
|
+
|
|
28
|
+
## 4.0.0-canary.64
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- 6b4d325: feat(provider/anthropic): add support for `claude-fable-5` and the `fallbacks` API parameter
|
|
33
|
+
|
|
34
|
+
## 4.0.0-canary.63
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- Updated dependencies [ce769dd]
|
|
39
|
+
- @ai-sdk/provider@4.0.0-canary.18
|
|
40
|
+
- @ai-sdk/provider-utils@5.0.0-canary.46
|
|
41
|
+
|
|
42
|
+
## 4.0.0-canary.62
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- ee798eb: chore(provider-utils): rename `Experimental_Sandbox` to `Experimental_SandboxSession`
|
|
47
|
+
- Updated dependencies [ee798eb]
|
|
48
|
+
- Updated dependencies [daf6637]
|
|
49
|
+
- @ai-sdk/provider-utils@5.0.0-canary.45
|
|
50
|
+
|
|
51
|
+
## 4.0.0-canary.61
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- e02f041: feat(provider/anthropic): add support for `claude-opus-4-8`
|
|
56
|
+
|
|
57
|
+
## 4.0.0-canary.60
|
|
58
|
+
|
|
59
|
+
### Patch Changes
|
|
60
|
+
|
|
61
|
+
- 6c93e36: feat(provider-utils): add `spawnCommand` method to `Experimental_Sandbox` to allow for detached command execution
|
|
62
|
+
- Updated dependencies [6c93e36]
|
|
63
|
+
- Updated dependencies [f617ac2]
|
|
64
|
+
- @ai-sdk/provider-utils@5.0.0-canary.44
|
|
65
|
+
|
|
66
|
+
## 4.0.0-canary.59
|
|
67
|
+
|
|
68
|
+
### Patch Changes
|
|
69
|
+
|
|
70
|
+
- 648705c: fix(provider/anthropic): fix remaining errors with Anthropic `code_execution` tool dynamic calls from latest `web_fetch` or `web_search`
|
|
71
|
+
|
|
72
|
+
## 4.0.0-canary.58
|
|
73
|
+
|
|
74
|
+
### Patch Changes
|
|
75
|
+
|
|
76
|
+
- acdbf84: Handle errors from anthropic websearch tool
|
|
77
|
+
|
|
78
|
+
## 4.0.0-canary.57
|
|
79
|
+
|
|
80
|
+
### Patch Changes
|
|
81
|
+
|
|
82
|
+
- 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
|
|
83
|
+
- Updated dependencies [7fc6bd6]
|
|
84
|
+
- @ai-sdk/provider-utils@5.0.0-canary.43
|
|
85
|
+
- @ai-sdk/provider@4.0.0-canary.17
|
|
86
|
+
|
|
87
|
+
## 4.0.0-canary.56
|
|
88
|
+
|
|
89
|
+
### Patch Changes
|
|
90
|
+
|
|
91
|
+
- a6617c5: feat(provider-utils): add `readFile` and `writeFile` plus convenience wrappers to `Experimental_Sandbox` abstraction
|
|
92
|
+
- Updated dependencies [a6617c5]
|
|
93
|
+
- @ai-sdk/provider-utils@5.0.0-canary.42
|
|
94
|
+
|
|
95
|
+
## 4.0.0-canary.55
|
|
96
|
+
|
|
97
|
+
### Patch Changes
|
|
98
|
+
|
|
99
|
+
- a464505: fix(anthropic): propagate toModelOutput providerOption to anthropic tool results
|
|
100
|
+
- Updated dependencies [28dfa06]
|
|
101
|
+
- Updated dependencies [e93fa91]
|
|
102
|
+
- @ai-sdk/provider-utils@5.0.0-canary.41
|
|
103
|
+
|
|
104
|
+
## 4.0.0-canary.54
|
|
105
|
+
|
|
106
|
+
### Patch Changes
|
|
107
|
+
|
|
108
|
+
- Updated dependencies [a7de9c9]
|
|
109
|
+
- @ai-sdk/provider-utils@5.0.0-canary.40
|
|
110
|
+
|
|
111
|
+
## 4.0.0-canary.53
|
|
112
|
+
|
|
113
|
+
### Patch Changes
|
|
114
|
+
|
|
115
|
+
- Updated dependencies [105f95b]
|
|
116
|
+
- @ai-sdk/provider-utils@5.0.0-canary.39
|
|
117
|
+
|
|
118
|
+
## 4.0.0-canary.52
|
|
119
|
+
|
|
120
|
+
### Patch Changes
|
|
121
|
+
|
|
122
|
+
- 8018480: feat(anthropic): add the new advisor tool
|
|
123
|
+
|
|
124
|
+
## 4.0.0-canary.51
|
|
125
|
+
|
|
126
|
+
### Patch Changes
|
|
127
|
+
|
|
128
|
+
- Updated dependencies [ca446f8]
|
|
129
|
+
- @ai-sdk/provider-utils@5.0.0-canary.38
|
|
130
|
+
|
|
131
|
+
## 4.0.0-canary.50
|
|
132
|
+
|
|
133
|
+
### Patch Changes
|
|
134
|
+
|
|
135
|
+
- d848405: feat: add optional `abortSignal` parameters to sandbox command execution
|
|
136
|
+
- Updated dependencies [d848405]
|
|
137
|
+
- @ai-sdk/provider-utils@5.0.0-canary.37
|
|
138
|
+
|
|
139
|
+
## 4.0.0-canary.49
|
|
140
|
+
|
|
141
|
+
### Patch Changes
|
|
142
|
+
|
|
143
|
+
- Updated dependencies [ca39020]
|
|
144
|
+
- @ai-sdk/provider-utils@5.0.0-canary.36
|
|
145
|
+
|
|
146
|
+
## 4.0.0-canary.48
|
|
147
|
+
|
|
148
|
+
### Patch Changes
|
|
149
|
+
|
|
150
|
+
- Updated dependencies [f634bac]
|
|
151
|
+
- @ai-sdk/provider-utils@5.0.0-canary.35
|
|
152
|
+
|
|
153
|
+
## 4.0.0-canary.47
|
|
154
|
+
|
|
155
|
+
### Patch Changes
|
|
156
|
+
|
|
157
|
+
- 2610e84: feat(provider/anthropic): automatically use sandbox in bash tool
|
|
158
|
+
- Updated dependencies [69254e0]
|
|
159
|
+
- Updated dependencies [3015fc3]
|
|
160
|
+
- @ai-sdk/provider-utils@5.0.0-canary.34
|
|
161
|
+
|
|
162
|
+
## 4.0.0-canary.46
|
|
163
|
+
|
|
164
|
+
### Patch Changes
|
|
165
|
+
|
|
166
|
+
- e5c4f40: Remove stale `effort-2025-11-24` beta header — the extended thinking effort parameter is GA and no longer requires the beta flag. Vertex AI's strict validator was actively rejecting requests with this header.
|
|
167
|
+
|
|
168
|
+
## 4.0.0-canary.45
|
|
169
|
+
|
|
170
|
+
### Patch Changes
|
|
171
|
+
|
|
172
|
+
- Updated dependencies [2427d88]
|
|
173
|
+
- @ai-sdk/provider-utils@5.0.0-canary.33
|
|
174
|
+
|
|
175
|
+
## 4.0.0-canary.44
|
|
176
|
+
|
|
177
|
+
### Patch Changes
|
|
178
|
+
|
|
179
|
+
- 5463d0d: feat(provider): align tool result output content file part types with top-level message file part types
|
|
180
|
+
- Updated dependencies [5463d0d]
|
|
181
|
+
- @ai-sdk/provider-utils@5.0.0-canary.32
|
|
182
|
+
- @ai-sdk/provider@4.0.0-canary.16
|
|
183
|
+
|
|
184
|
+
## 4.0.0-canary.43
|
|
185
|
+
|
|
186
|
+
### Patch Changes
|
|
187
|
+
|
|
188
|
+
- 0c4c275: trigger initial canary release
|
|
189
|
+
- Updated dependencies [0c4c275]
|
|
190
|
+
- @ai-sdk/provider-utils@5.0.0-canary.31
|
|
191
|
+
- @ai-sdk/provider@4.0.0-canary.15
|
|
192
|
+
|
|
193
|
+
## 4.0.0-beta.42
|
|
194
|
+
|
|
195
|
+
### Major Changes
|
|
196
|
+
|
|
197
|
+
- 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols
|
|
198
|
+
|
|
199
|
+
For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases.
|
|
200
|
+
|
|
201
|
+
### Patch Changes
|
|
202
|
+
|
|
203
|
+
- Updated dependencies [08d2129]
|
|
204
|
+
- @ai-sdk/provider-utils@5.0.0-beta.30
|
|
205
|
+
|
|
206
|
+
## 4.0.0-beta.41
|
|
207
|
+
|
|
208
|
+
### Patch Changes
|
|
209
|
+
|
|
210
|
+
- 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type
|
|
211
|
+
- 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
|
|
212
|
+
- Updated dependencies [9bd6512]
|
|
213
|
+
- Updated dependencies [258c093]
|
|
214
|
+
- Updated dependencies [b6783da]
|
|
215
|
+
- @ai-sdk/provider-utils@5.0.0-beta.29
|
|
216
|
+
- @ai-sdk/provider@4.0.0-beta.14
|
|
217
|
+
|
|
218
|
+
## 4.0.0-beta.40
|
|
219
|
+
|
|
220
|
+
### Patch Changes
|
|
221
|
+
|
|
222
|
+
- c012d57: feat(anthropic): sanitize the unsupported JSON schema validation properties
|
|
223
|
+
|
|
224
|
+
## 4.0.0-beta.39
|
|
225
|
+
|
|
226
|
+
### Patch Changes
|
|
227
|
+
|
|
228
|
+
- 9f0e36c: trigger release for all packages after provenance setup
|
|
229
|
+
- Updated dependencies [9f0e36c]
|
|
230
|
+
- @ai-sdk/provider@4.0.0-beta.13
|
|
231
|
+
- @ai-sdk/provider-utils@5.0.0-beta.28
|
|
232
|
+
|
|
233
|
+
## 4.0.0-beta.38
|
|
234
|
+
|
|
235
|
+
### Patch Changes
|
|
236
|
+
|
|
237
|
+
- 87d1723: chore(anthropic): remove unnecessary messages affix from Anthropic symbols and files
|
|
238
|
+
- 58a2ad7: fix: more precise default message for tool execution denial
|
|
239
|
+
- Updated dependencies [785fe16]
|
|
240
|
+
- Updated dependencies [67df0a0]
|
|
241
|
+
- Updated dependencies [befb78c]
|
|
242
|
+
- Updated dependencies [0458559]
|
|
243
|
+
- Updated dependencies [5852c0a]
|
|
244
|
+
- Updated dependencies [fc92055]
|
|
245
|
+
- @ai-sdk/provider-utils@5.0.0-beta.27
|
|
246
|
+
|
|
247
|
+
## 4.0.0-beta.37
|
|
248
|
+
|
|
249
|
+
### Patch Changes
|
|
250
|
+
|
|
251
|
+
- Updated dependencies [2e98477]
|
|
252
|
+
- @ai-sdk/provider-utils@5.0.0-beta.26
|
|
253
|
+
|
|
254
|
+
## 4.0.0-beta.36
|
|
255
|
+
|
|
256
|
+
### Patch Changes
|
|
257
|
+
|
|
258
|
+
- Updated dependencies [eea8d98]
|
|
259
|
+
- @ai-sdk/provider-utils@5.0.0-beta.25
|
|
260
|
+
|
|
261
|
+
## 4.0.0-beta.35
|
|
262
|
+
|
|
263
|
+
### Patch Changes
|
|
264
|
+
|
|
265
|
+
- Updated dependencies [f807e45]
|
|
266
|
+
- @ai-sdk/provider-utils@5.0.0-beta.24
|
|
267
|
+
|
|
268
|
+
## 4.0.0-beta.34
|
|
269
|
+
|
|
270
|
+
### Patch Changes
|
|
271
|
+
|
|
272
|
+
- Updated dependencies [350ea38]
|
|
273
|
+
- @ai-sdk/provider-utils@5.0.0-beta.23
|
|
274
|
+
|
|
275
|
+
## 4.0.0-beta.33
|
|
276
|
+
|
|
277
|
+
### Major Changes
|
|
278
|
+
|
|
279
|
+
- 832f86f: fix(anthropic): remove cacheCreationInputTokens from providerMetadata
|
|
280
|
+
|
|
281
|
+
## 4.0.0-beta.32
|
|
282
|
+
|
|
283
|
+
### Patch Changes
|
|
284
|
+
|
|
285
|
+
- ad0b376: fix(provider/anthropic): stop adding `fine-grained-tool-streaming-2025-05-14` beta for `claude-opus-4-7`
|
|
286
|
+
|
|
287
|
+
## 4.0.0-beta.31
|
|
288
|
+
|
|
289
|
+
### Patch Changes
|
|
290
|
+
|
|
291
|
+
- Updated dependencies [083947b]
|
|
292
|
+
- @ai-sdk/provider-utils@5.0.0-beta.22
|
|
293
|
+
|
|
294
|
+
## 4.0.0-beta.30
|
|
295
|
+
|
|
296
|
+
### Patch Changes
|
|
297
|
+
|
|
298
|
+
- 0d8f107: feat(provider/anthropic): add support for Opus 4.7 and relevant API enhancements
|
|
299
|
+
|
|
300
|
+
## 4.0.0-beta.29
|
|
301
|
+
|
|
302
|
+
### Patch Changes
|
|
303
|
+
|
|
304
|
+
- Updated dependencies [add1126]
|
|
305
|
+
- @ai-sdk/provider-utils@5.0.0-beta.21
|
|
306
|
+
|
|
307
|
+
## 4.0.0-beta.28
|
|
308
|
+
|
|
309
|
+
### Patch Changes
|
|
310
|
+
|
|
311
|
+
- b3976a2: Add workflow serialization support to all provider models.
|
|
312
|
+
|
|
313
|
+
**`@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.
|
|
314
|
+
|
|
315
|
+
**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.
|
|
316
|
+
|
|
317
|
+
All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
|
|
318
|
+
|
|
319
|
+
- ff5eba1: feat: roll `image-*` tool output types into their equivalent `file-*` types
|
|
320
|
+
- Updated dependencies [b3976a2]
|
|
321
|
+
- Updated dependencies [ff5eba1]
|
|
322
|
+
- @ai-sdk/provider-utils@5.0.0-beta.20
|
|
323
|
+
- @ai-sdk/provider@4.0.0-beta.12
|
|
324
|
+
|
|
325
|
+
## 4.0.0-beta.27
|
|
326
|
+
|
|
327
|
+
### Major Changes
|
|
328
|
+
|
|
329
|
+
- ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
|
|
330
|
+
|
|
331
|
+
### Patch Changes
|
|
332
|
+
|
|
333
|
+
- Updated dependencies [ef992f8]
|
|
334
|
+
- @ai-sdk/provider@4.0.0-beta.11
|
|
335
|
+
- @ai-sdk/provider-utils@5.0.0-beta.19
|
|
336
|
+
|
|
337
|
+
## 4.0.0-beta.26
|
|
338
|
+
|
|
339
|
+
### Patch Changes
|
|
340
|
+
|
|
341
|
+
- 90e2d8a: chore: fix unused vars not being flagged by our lint tooling
|
|
342
|
+
- Updated dependencies [90e2d8a]
|
|
343
|
+
- @ai-sdk/provider-utils@5.0.0-beta.18
|
|
344
|
+
|
|
345
|
+
## 4.0.0-beta.25
|
|
346
|
+
|
|
347
|
+
### Patch Changes
|
|
348
|
+
|
|
349
|
+
- 09bd27b: feat (provider/anthropic): add support for inference_geo provider option
|
|
350
|
+
|
|
351
|
+
## 4.0.0-beta.24
|
|
352
|
+
|
|
353
|
+
### Patch Changes
|
|
354
|
+
|
|
355
|
+
- Updated dependencies [3ae1786]
|
|
356
|
+
- @ai-sdk/provider-utils@5.0.0-beta.17
|
|
357
|
+
|
|
358
|
+
## 4.0.0-beta.23
|
|
359
|
+
|
|
360
|
+
### Patch Changes
|
|
361
|
+
|
|
362
|
+
- Updated dependencies [176466a]
|
|
363
|
+
- @ai-sdk/provider@4.0.0-beta.10
|
|
364
|
+
- @ai-sdk/provider-utils@5.0.0-beta.16
|
|
365
|
+
|
|
366
|
+
## 4.0.0-beta.22
|
|
367
|
+
|
|
368
|
+
### Patch Changes
|
|
369
|
+
|
|
370
|
+
- e311194: feat(ai): allow passing provider instance to `uploadFile` and `uploadSkill` as shorthand
|
|
371
|
+
- Updated dependencies [e311194]
|
|
372
|
+
- @ai-sdk/provider@4.0.0-beta.9
|
|
373
|
+
- @ai-sdk/provider-utils@5.0.0-beta.15
|
|
374
|
+
|
|
375
|
+
## 4.0.0-beta.21
|
|
376
|
+
|
|
377
|
+
### Patch Changes
|
|
378
|
+
|
|
379
|
+
- 34bd95d: feat(ai): add support for uploading provider skills using the provider references abstraction
|
|
380
|
+
- Updated dependencies [34bd95d]
|
|
381
|
+
- Updated dependencies [008271d]
|
|
382
|
+
- @ai-sdk/provider@4.0.0-beta.8
|
|
383
|
+
- @ai-sdk/provider-utils@5.0.0-beta.14
|
|
384
|
+
|
|
385
|
+
## 4.0.0-beta.20
|
|
386
|
+
|
|
387
|
+
### Patch Changes
|
|
388
|
+
|
|
389
|
+
- Updated dependencies [b0c2869]
|
|
390
|
+
- Updated dependencies [7e26e81]
|
|
391
|
+
- @ai-sdk/provider-utils@5.0.0-beta.13
|
|
392
|
+
|
|
393
|
+
## 4.0.0-beta.19
|
|
394
|
+
|
|
395
|
+
### Patch Changes
|
|
396
|
+
|
|
397
|
+
- Updated dependencies [46d1149]
|
|
398
|
+
- @ai-sdk/provider-utils@5.0.0-beta.12
|
|
399
|
+
|
|
400
|
+
## 4.0.0-beta.18
|
|
401
|
+
|
|
402
|
+
### Patch Changes
|
|
403
|
+
|
|
404
|
+
- 6fd51c0: fix(provider): preserve error type prefix in getErrorMessage
|
|
405
|
+
- Updated dependencies [6fd51c0]
|
|
406
|
+
- @ai-sdk/provider-utils@5.0.0-beta.11
|
|
407
|
+
- @ai-sdk/provider@4.0.0-beta.7
|
|
408
|
+
|
|
409
|
+
## 4.0.0-beta.17
|
|
410
|
+
|
|
411
|
+
### Patch Changes
|
|
412
|
+
|
|
413
|
+
- c29a26f: feat(provider): add support for provider references and uploading files as supported per provider
|
|
414
|
+
- Updated dependencies [c29a26f]
|
|
415
|
+
- @ai-sdk/provider-utils@5.0.0-beta.10
|
|
416
|
+
- @ai-sdk/provider@4.0.0-beta.6
|
|
417
|
+
|
|
418
|
+
## 4.0.0-beta.16
|
|
419
|
+
|
|
420
|
+
### Patch Changes
|
|
421
|
+
|
|
422
|
+
- 38fc777: Add AI Gateway hint to provider READMEs
|
|
423
|
+
|
|
424
|
+
## 4.0.0-beta.15
|
|
425
|
+
|
|
426
|
+
### Patch Changes
|
|
427
|
+
|
|
428
|
+
- f57c702: fix(anthropic): allow both temperature and topP for non-Anthropic models using the Anthropic-compatible API
|
|
429
|
+
|
|
430
|
+
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.
|
|
431
|
+
|
|
432
|
+
## 4.0.0-beta.14
|
|
433
|
+
|
|
434
|
+
### Patch Changes
|
|
435
|
+
|
|
436
|
+
- Updated dependencies [2e17091]
|
|
437
|
+
- @ai-sdk/provider-utils@5.0.0-beta.9
|
|
438
|
+
|
|
439
|
+
## 4.0.0-beta.13
|
|
440
|
+
|
|
441
|
+
### Patch Changes
|
|
442
|
+
|
|
443
|
+
- Updated dependencies [986c6fd]
|
|
444
|
+
- Updated dependencies [493295c]
|
|
445
|
+
- @ai-sdk/provider-utils@5.0.0-beta.8
|
|
446
|
+
|
|
447
|
+
## 4.0.0-beta.12
|
|
448
|
+
|
|
449
|
+
### Patch Changes
|
|
450
|
+
|
|
451
|
+
- Updated dependencies [1f509d4]
|
|
452
|
+
- @ai-sdk/provider-utils@5.0.0-beta.7
|
|
453
|
+
- @ai-sdk/provider@4.0.0-beta.5
|
|
454
|
+
|
|
455
|
+
## 4.0.0-beta.11
|
|
456
|
+
|
|
457
|
+
### Patch Changes
|
|
458
|
+
|
|
459
|
+
- 0ee8aec: feat (provider/anthropic): support passing metadata.user_id
|
|
460
|
+
|
|
461
|
+
## 4.0.0-beta.10
|
|
462
|
+
|
|
463
|
+
### Patch Changes
|
|
464
|
+
|
|
465
|
+
- 3887c70: feat(provider): add new top-level reasoning parameter to spec and support it in `generateText` and `streamText`
|
|
466
|
+
- Updated dependencies [3887c70]
|
|
467
|
+
- @ai-sdk/provider-utils@5.0.0-beta.6
|
|
468
|
+
- @ai-sdk/provider@4.0.0-beta.4
|
|
469
|
+
|
|
470
|
+
## 4.0.0-beta.9
|
|
471
|
+
|
|
472
|
+
### Patch Changes
|
|
473
|
+
|
|
474
|
+
- Updated dependencies [776b617]
|
|
475
|
+
- @ai-sdk/provider-utils@5.0.0-beta.5
|
|
476
|
+
- @ai-sdk/provider@4.0.0-beta.3
|
|
477
|
+
|
|
478
|
+
## 4.0.0-beta.8
|
|
479
|
+
|
|
480
|
+
### Patch Changes
|
|
481
|
+
|
|
482
|
+
- Updated dependencies [61753c3]
|
|
483
|
+
- @ai-sdk/provider-utils@5.0.0-beta.4
|
|
484
|
+
|
|
485
|
+
## 4.0.0-beta.7
|
|
486
|
+
|
|
487
|
+
### Patch Changes
|
|
488
|
+
|
|
489
|
+
- Updated dependencies [f7d4f01]
|
|
490
|
+
- @ai-sdk/provider-utils@5.0.0-beta.3
|
|
491
|
+
- @ai-sdk/provider@4.0.0-beta.2
|
|
492
|
+
|
|
3
493
|
## 4.0.0-beta.6
|
|
4
494
|
|
|
5
495
|
### Patch Changes
|
|
@@ -466,13 +956,13 @@
|
|
|
466
956
|
Before
|
|
467
957
|
|
|
468
958
|
```ts
|
|
469
|
-
model.textEmbeddingModel(
|
|
959
|
+
model.textEmbeddingModel("my-model-id");
|
|
470
960
|
```
|
|
471
961
|
|
|
472
962
|
After
|
|
473
963
|
|
|
474
964
|
```ts
|
|
475
|
-
model.embeddingModel(
|
|
965
|
+
model.embeddingModel("my-model-id");
|
|
476
966
|
```
|
|
477
967
|
|
|
478
968
|
- f33a018: chore: add model ID for Haiku 4.5
|
|
@@ -812,13 +1302,13 @@
|
|
|
812
1302
|
Before
|
|
813
1303
|
|
|
814
1304
|
```ts
|
|
815
|
-
model.textEmbeddingModel(
|
|
1305
|
+
model.textEmbeddingModel("my-model-id");
|
|
816
1306
|
```
|
|
817
1307
|
|
|
818
1308
|
After
|
|
819
1309
|
|
|
820
1310
|
```ts
|
|
821
|
-
model.embeddingModel(
|
|
1311
|
+
model.embeddingModel("my-model-id");
|
|
822
1312
|
```
|
|
823
1313
|
|
|
824
1314
|
- 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
|