@ai-sdk/cohere 4.0.0-beta.5 → 4.0.0-beta.53

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 CHANGED
@@ -1,5 +1,398 @@
1
1
  # @ai-sdk/cohere
2
2
 
3
+ ## 4.0.0-beta.53
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.52
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.51
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.50
29
+
30
+ ### Patch Changes
31
+
32
+ - Updated dependencies [ce769dd]
33
+ - @ai-sdk/provider@4.0.0-canary.18
34
+ - @ai-sdk/provider-utils@5.0.0-canary.46
35
+
36
+ ## 4.0.0-canary.49
37
+
38
+ ### Patch Changes
39
+
40
+ - Updated dependencies [ee798eb]
41
+ - Updated dependencies [daf6637]
42
+ - @ai-sdk/provider-utils@5.0.0-canary.45
43
+
44
+ ## 4.0.0-canary.48
45
+
46
+ ### Patch Changes
47
+
48
+ - Updated dependencies [6c93e36]
49
+ - Updated dependencies [f617ac2]
50
+ - @ai-sdk/provider-utils@5.0.0-canary.44
51
+
52
+ ## 4.0.0-canary.47
53
+
54
+ ### Patch Changes
55
+
56
+ - 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
57
+ - Updated dependencies [7fc6bd6]
58
+ - @ai-sdk/provider-utils@5.0.0-canary.43
59
+ - @ai-sdk/provider@4.0.0-canary.17
60
+
61
+ ## 4.0.0-canary.46
62
+
63
+ ### Patch Changes
64
+
65
+ - Updated dependencies [a6617c5]
66
+ - @ai-sdk/provider-utils@5.0.0-canary.42
67
+
68
+ ## 4.0.0-canary.45
69
+
70
+ ### Patch Changes
71
+
72
+ - Updated dependencies [28dfa06]
73
+ - Updated dependencies [e93fa91]
74
+ - @ai-sdk/provider-utils@5.0.0-canary.41
75
+
76
+ ## 4.0.0-canary.44
77
+
78
+ ### Patch Changes
79
+
80
+ - 3cfb762: Harden streamed tool call argument parsing against prototype keys.
81
+
82
+ ## 4.0.0-canary.43
83
+
84
+ ### Patch Changes
85
+
86
+ - Updated dependencies [a7de9c9]
87
+ - @ai-sdk/provider-utils@5.0.0-canary.40
88
+
89
+ ## 4.0.0-canary.42
90
+
91
+ ### Patch Changes
92
+
93
+ - Updated dependencies [105f95b]
94
+ - @ai-sdk/provider-utils@5.0.0-canary.39
95
+
96
+ ## 4.0.0-canary.41
97
+
98
+ ### Patch Changes
99
+
100
+ - Updated dependencies [ca446f8]
101
+ - @ai-sdk/provider-utils@5.0.0-canary.38
102
+
103
+ ## 4.0.0-canary.40
104
+
105
+ ### Patch Changes
106
+
107
+ - Updated dependencies [d848405]
108
+ - @ai-sdk/provider-utils@5.0.0-canary.37
109
+
110
+ ## 4.0.0-canary.39
111
+
112
+ ### Patch Changes
113
+
114
+ - Updated dependencies [ca39020]
115
+ - @ai-sdk/provider-utils@5.0.0-canary.36
116
+
117
+ ## 4.0.0-canary.38
118
+
119
+ ### Patch Changes
120
+
121
+ - Updated dependencies [f634bac]
122
+ - @ai-sdk/provider-utils@5.0.0-canary.35
123
+
124
+ ## 4.0.0-canary.37
125
+
126
+ ### Patch Changes
127
+
128
+ - Updated dependencies [69254e0]
129
+ - Updated dependencies [3015fc3]
130
+ - @ai-sdk/provider-utils@5.0.0-canary.34
131
+
132
+ ## 4.0.0-canary.36
133
+
134
+ ### Patch Changes
135
+
136
+ - Updated dependencies [2427d88]
137
+ - @ai-sdk/provider-utils@5.0.0-canary.33
138
+
139
+ ## 4.0.0-canary.35
140
+
141
+ ### Patch Changes
142
+
143
+ - Updated dependencies [5463d0d]
144
+ - @ai-sdk/provider-utils@5.0.0-canary.32
145
+ - @ai-sdk/provider@4.0.0-canary.16
146
+
147
+ ## 4.0.0-canary.34
148
+
149
+ ### Patch Changes
150
+
151
+ - f2919d5: feat(provider/cohere): add support for passing images to Cohere models
152
+
153
+ ## 4.0.0-canary.33
154
+
155
+ ### Patch Changes
156
+
157
+ - 0c4c275: trigger initial canary release
158
+ - Updated dependencies [0c4c275]
159
+ - @ai-sdk/provider-utils@5.0.0-canary.31
160
+ - @ai-sdk/provider@4.0.0-canary.15
161
+
162
+ ## 4.0.0-beta.32
163
+
164
+ ### Major Changes
165
+
166
+ - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols
167
+
168
+ For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases.
169
+
170
+ ### Patch Changes
171
+
172
+ - Updated dependencies [08d2129]
173
+ - @ai-sdk/provider-utils@5.0.0-beta.30
174
+
175
+ ## 4.0.0-beta.31
176
+
177
+ ### Patch Changes
178
+
179
+ - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type
180
+ - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
181
+ - Updated dependencies [9bd6512]
182
+ - Updated dependencies [258c093]
183
+ - Updated dependencies [b6783da]
184
+ - @ai-sdk/provider-utils@5.0.0-beta.29
185
+ - @ai-sdk/provider@4.0.0-beta.14
186
+
187
+ ## 4.0.0-beta.30
188
+
189
+ ### Patch Changes
190
+
191
+ - 9f0e36c: trigger release for all packages after provenance setup
192
+ - Updated dependencies [9f0e36c]
193
+ - @ai-sdk/provider@4.0.0-beta.13
194
+ - @ai-sdk/provider-utils@5.0.0-beta.28
195
+
196
+ ## 4.0.0-beta.29
197
+
198
+ ### Patch Changes
199
+
200
+ - 58a2ad7: fix: more precise default message for tool execution denial
201
+ - Updated dependencies [785fe16]
202
+ - Updated dependencies [67df0a0]
203
+ - Updated dependencies [befb78c]
204
+ - Updated dependencies [0458559]
205
+ - Updated dependencies [5852c0a]
206
+ - Updated dependencies [fc92055]
207
+ - @ai-sdk/provider-utils@5.0.0-beta.27
208
+
209
+ ## 4.0.0-beta.28
210
+
211
+ ### Patch Changes
212
+
213
+ - Updated dependencies [2e98477]
214
+ - @ai-sdk/provider-utils@5.0.0-beta.26
215
+
216
+ ## 4.0.0-beta.27
217
+
218
+ ### Patch Changes
219
+
220
+ - Updated dependencies [eea8d98]
221
+ - @ai-sdk/provider-utils@5.0.0-beta.25
222
+
223
+ ## 4.0.0-beta.26
224
+
225
+ ### Patch Changes
226
+
227
+ - Updated dependencies [f807e45]
228
+ - @ai-sdk/provider-utils@5.0.0-beta.24
229
+
230
+ ## 4.0.0-beta.25
231
+
232
+ ### Patch Changes
233
+
234
+ - Updated dependencies [350ea38]
235
+ - @ai-sdk/provider-utils@5.0.0-beta.23
236
+
237
+ ## 4.0.0-beta.24
238
+
239
+ ### Patch Changes
240
+
241
+ - Updated dependencies [083947b]
242
+ - @ai-sdk/provider-utils@5.0.0-beta.22
243
+
244
+ ## 4.0.0-beta.23
245
+
246
+ ### Patch Changes
247
+
248
+ - Updated dependencies [add1126]
249
+ - @ai-sdk/provider-utils@5.0.0-beta.21
250
+
251
+ ## 4.0.0-beta.22
252
+
253
+ ### Patch Changes
254
+
255
+ - b3976a2: Add workflow serialization support to all provider models.
256
+
257
+ **`@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.
258
+
259
+ **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.
260
+
261
+ All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
262
+
263
+ - Updated dependencies [b3976a2]
264
+ - Updated dependencies [ff5eba1]
265
+ - @ai-sdk/provider-utils@5.0.0-beta.20
266
+ - @ai-sdk/provider@4.0.0-beta.12
267
+
268
+ ## 4.0.0-beta.21
269
+
270
+ ### Major Changes
271
+
272
+ - ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
273
+
274
+ ### Patch Changes
275
+
276
+ - Updated dependencies [ef992f8]
277
+ - @ai-sdk/provider@4.0.0-beta.11
278
+ - @ai-sdk/provider-utils@5.0.0-beta.19
279
+
280
+ ## 4.0.0-beta.20
281
+
282
+ ### Patch Changes
283
+
284
+ - 90e2d8a: chore: fix unused vars not being flagged by our lint tooling
285
+ - Updated dependencies [90e2d8a]
286
+ - @ai-sdk/provider-utils@5.0.0-beta.18
287
+
288
+ ## 4.0.0-beta.19
289
+
290
+ ### Patch Changes
291
+
292
+ - Updated dependencies [3ae1786]
293
+ - @ai-sdk/provider-utils@5.0.0-beta.17
294
+
295
+ ## 4.0.0-beta.18
296
+
297
+ ### Patch Changes
298
+
299
+ - Updated dependencies [176466a]
300
+ - @ai-sdk/provider@4.0.0-beta.10
301
+ - @ai-sdk/provider-utils@5.0.0-beta.16
302
+
303
+ ## 4.0.0-beta.17
304
+
305
+ ### Patch Changes
306
+
307
+ - Updated dependencies [e311194]
308
+ - @ai-sdk/provider@4.0.0-beta.9
309
+ - @ai-sdk/provider-utils@5.0.0-beta.15
310
+
311
+ ## 4.0.0-beta.16
312
+
313
+ ### Patch Changes
314
+
315
+ - Updated dependencies [34bd95d]
316
+ - Updated dependencies [008271d]
317
+ - @ai-sdk/provider@4.0.0-beta.8
318
+ - @ai-sdk/provider-utils@5.0.0-beta.14
319
+
320
+ ## 4.0.0-beta.15
321
+
322
+ ### Patch Changes
323
+
324
+ - Updated dependencies [b0c2869]
325
+ - Updated dependencies [7e26e81]
326
+ - @ai-sdk/provider-utils@5.0.0-beta.13
327
+
328
+ ## 4.0.0-beta.14
329
+
330
+ ### Patch Changes
331
+
332
+ - Updated dependencies [46d1149]
333
+ - @ai-sdk/provider-utils@5.0.0-beta.12
334
+
335
+ ## 4.0.0-beta.13
336
+
337
+ ### Patch Changes
338
+
339
+ - 6fd51c0: fix(provider): preserve error type prefix in getErrorMessage
340
+ - Updated dependencies [6fd51c0]
341
+ - @ai-sdk/provider-utils@5.0.0-beta.11
342
+ - @ai-sdk/provider@4.0.0-beta.7
343
+
344
+ ## 4.0.0-beta.12
345
+
346
+ ### Patch Changes
347
+
348
+ - c29a26f: feat(provider): add support for provider references and uploading files as supported per provider
349
+ - Updated dependencies [c29a26f]
350
+ - @ai-sdk/provider-utils@5.0.0-beta.10
351
+ - @ai-sdk/provider@4.0.0-beta.6
352
+
353
+ ## 4.0.0-beta.11
354
+
355
+ ### Patch Changes
356
+
357
+ - 38fc777: Add AI Gateway hint to provider READMEs
358
+
359
+ ## 4.0.0-beta.10
360
+
361
+ ### Patch Changes
362
+
363
+ - Updated dependencies [2e17091]
364
+ - @ai-sdk/provider-utils@5.0.0-beta.9
365
+
366
+ ## 4.0.0-beta.9
367
+
368
+ ### Patch Changes
369
+
370
+ - Updated dependencies [986c6fd]
371
+ - Updated dependencies [493295c]
372
+ - @ai-sdk/provider-utils@5.0.0-beta.8
373
+
374
+ ## 4.0.0-beta.8
375
+
376
+ ### Patch Changes
377
+
378
+ - Updated dependencies [1f509d4]
379
+ - @ai-sdk/provider-utils@5.0.0-beta.7
380
+ - @ai-sdk/provider@4.0.0-beta.5
381
+
382
+ ## 4.0.0-beta.7
383
+
384
+ ### Patch Changes
385
+
386
+ - 74d520f: feat: migrate providers to support new top-level `reasoning` parameter
387
+
388
+ ## 4.0.0-beta.6
389
+
390
+ ### Patch Changes
391
+
392
+ - Updated dependencies [3887c70]
393
+ - @ai-sdk/provider-utils@5.0.0-beta.6
394
+ - @ai-sdk/provider@4.0.0-beta.4
395
+
3
396
  ## 4.0.0-beta.5
4
397
 
5
398
  ### Patch Changes
@@ -247,13 +640,13 @@
247
640
  Before
248
641
 
249
642
  ```ts
250
- model.textEmbeddingModel('my-model-id');
643
+ model.textEmbeddingModel("my-model-id");
251
644
  ```
252
645
 
253
646
  After
254
647
 
255
648
  ```ts
256
- model.embeddingModel('my-model-id');
649
+ model.embeddingModel("my-model-id");
257
650
  ```
258
651
 
259
652
  - 2625a04: feat(openai); update spec for mcp approval
@@ -465,13 +858,13 @@
465
858
  Before
466
859
 
467
860
  ```ts
468
- model.textEmbeddingModel('my-model-id');
861
+ model.textEmbeddingModel("my-model-id");
469
862
  ```
470
863
 
471
864
  After
472
865
 
473
866
  ```ts
474
- model.embeddingModel('my-model-id');
867
+ model.embeddingModel("my-model-id");
475
868
  ```
476
869
 
477
870
  - Updated dependencies [8d9e8ad]
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  The **[Cohere provider](https://ai-sdk.dev/providers/ai-sdk-providers/cohere)** for the [AI SDK](https://ai-sdk.dev/docs) contains language model support for the Cohere API.
4
4
 
5
+ > **Deploying to Vercel?** With Vercel's AI Gateway you can access Cohere (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 Cohere provider is available in the `@ai-sdk/cohere` module. You can install it with
package/dist/index.d.ts CHANGED
@@ -2,8 +2,8 @@ import { z } from 'zod/v4';
2
2
  import { ProviderV4, LanguageModelV4, EmbeddingModelV4, RerankingModelV4 } from '@ai-sdk/provider';
3
3
  import { FetchFunction } from '@ai-sdk/provider-utils';
4
4
 
5
- type CohereChatModelId = 'command-a-03-2025' | 'command-a-reasoning-08-2025' | 'command-r7b-12-2024' | 'command-r-plus-04-2024' | 'command-r-plus' | 'command-r-08-2024' | 'command-r-03-2024' | 'command-r' | 'command' | 'command-nightly' | 'command-light' | 'command-light-nightly' | (string & {});
6
- declare const cohereLanguageModelOptions: z.ZodObject<{
5
+ type CohereChatModelId = 'command-a-03-2025' | 'command-a-reasoning-08-2025' | 'command-a-vision-07-2025' | 'command-r7b-12-2024' | 'command-r-plus-04-2024' | 'command-r-plus' | 'command-r-08-2024' | 'command-r-03-2024' | 'command-r' | 'command' | 'command-nightly' | 'command-light' | 'command-light-nightly' | (string & {});
6
+ declare const cohereLanguageModelChatOptions: z.ZodObject<{
7
7
  thinking: z.ZodOptional<z.ZodObject<{
8
8
  type: z.ZodOptional<z.ZodEnum<{
9
9
  enabled: "enabled";
@@ -12,7 +12,7 @@ declare const cohereLanguageModelOptions: z.ZodObject<{
12
12
  tokenBudget: z.ZodOptional<z.ZodNumber>;
13
13
  }, z.core.$strip>>;
14
14
  }, z.core.$strip>;
15
- type CohereLanguageModelOptions = z.infer<typeof cohereLanguageModelOptions>;
15
+ type CohereLanguageModelChatOptions = z.infer<typeof cohereLanguageModelChatOptions>;
16
16
 
17
17
  type CohereRerankingModelId = 'rerank-v3.5' | 'rerank-english-v3.0' | 'rerank-multilingual-v3.0' | (string & {});
18
18
  type CohereRerankingModelOptions = {
@@ -114,4 +114,4 @@ declare const cohere: CohereProvider;
114
114
 
115
115
  declare const VERSION: string;
116
116
 
117
- export { type CohereLanguageModelOptions as CohereChatModelOptions, type CohereEmbeddingModelOptions, type CohereLanguageModelOptions, type CohereProvider, type CohereProviderSettings, type CohereRerankingModelOptions, type CohereRerankingModelOptions as CohereRerankingOptions, VERSION, cohere, createCohere };
117
+ export { type CohereLanguageModelChatOptions as CohereChatModelOptions, type CohereEmbeddingModelOptions, type CohereLanguageModelChatOptions, type CohereLanguageModelChatOptions as CohereLanguageModelOptions, type CohereProvider, type CohereProviderSettings, type CohereRerankingModelOptions, type CohereRerankingModelOptions as CohereRerankingOptions, VERSION, cohere, createCohere };