@ai-sdk/mistral 4.0.0-beta.5 → 4.0.0-beta.56

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,418 @@
1
1
  # @ai-sdk/mistral
2
2
 
3
+ ## 4.0.0-beta.56
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [0416e3e]
8
+ - @ai-sdk/provider@4.0.0-beta.20
9
+ - @ai-sdk/provider-utils@5.0.0-beta.50
10
+
11
+ ## 4.0.0-beta.55
12
+
13
+ ### Patch Changes
14
+
15
+ - b8396f0: trigger initial beta release
16
+ - Updated dependencies [b8396f0]
17
+ - @ai-sdk/provider-utils@5.0.0-beta.49
18
+ - @ai-sdk/provider@4.0.0-beta.19
19
+
20
+ ## 4.0.0-canary.54
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [aeda373]
25
+ - Updated dependencies [375fdd7]
26
+ - Updated dependencies [b4507d5]
27
+ - @ai-sdk/provider-utils@5.0.0-canary.48
28
+
29
+ ## 4.0.0-canary.53
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies [bae5e2b]
34
+ - @ai-sdk/provider-utils@5.0.0-canary.47
35
+
36
+ ## 4.0.0-canary.52
37
+
38
+ ### Patch Changes
39
+
40
+ - Updated dependencies [ce769dd]
41
+ - @ai-sdk/provider@4.0.0-canary.18
42
+ - @ai-sdk/provider-utils@5.0.0-canary.46
43
+
44
+ ## 4.0.0-canary.51
45
+
46
+ ### Patch Changes
47
+
48
+ - Updated dependencies [ee798eb]
49
+ - Updated dependencies [daf6637]
50
+ - @ai-sdk/provider-utils@5.0.0-canary.45
51
+
52
+ ## 4.0.0-canary.50
53
+
54
+ ### Patch Changes
55
+
56
+ - Updated dependencies [6c93e36]
57
+ - Updated dependencies [f617ac2]
58
+ - @ai-sdk/provider-utils@5.0.0-canary.44
59
+
60
+ ## 4.0.0-canary.49
61
+
62
+ ### Patch Changes
63
+
64
+ - 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
65
+ - Updated dependencies [7fc6bd6]
66
+ - @ai-sdk/provider-utils@5.0.0-canary.43
67
+ - @ai-sdk/provider@4.0.0-canary.17
68
+
69
+ ## 4.0.0-canary.48
70
+
71
+ ### Patch Changes
72
+
73
+ - Updated dependencies [a6617c5]
74
+ - @ai-sdk/provider-utils@5.0.0-canary.42
75
+
76
+ ## 4.0.0-canary.47
77
+
78
+ ### Patch Changes
79
+
80
+ - Updated dependencies [28dfa06]
81
+ - Updated dependencies [e93fa91]
82
+ - @ai-sdk/provider-utils@5.0.0-canary.41
83
+
84
+ ## 4.0.0-canary.46
85
+
86
+ ### Patch Changes
87
+
88
+ - Updated dependencies [a7de9c9]
89
+ - @ai-sdk/provider-utils@5.0.0-canary.40
90
+
91
+ ## 4.0.0-canary.45
92
+
93
+ ### Patch Changes
94
+
95
+ - Updated dependencies [105f95b]
96
+ - @ai-sdk/provider-utils@5.0.0-canary.39
97
+
98
+ ## 4.0.0-canary.44
99
+
100
+ ### Patch Changes
101
+
102
+ - 7acf358: fix(mistral): forward `stopSequences` as Mistral's native `stop` parameter
103
+
104
+ ## 4.0.0-canary.43
105
+
106
+ ### Patch Changes
107
+
108
+ - Updated dependencies [ca446f8]
109
+ - @ai-sdk/provider-utils@5.0.0-canary.38
110
+
111
+ ## 4.0.0-canary.42
112
+
113
+ ### Patch Changes
114
+
115
+ - Updated dependencies [d848405]
116
+ - @ai-sdk/provider-utils@5.0.0-canary.37
117
+
118
+ ## 4.0.0-canary.41
119
+
120
+ ### Patch Changes
121
+
122
+ - Updated dependencies [ca39020]
123
+ - @ai-sdk/provider-utils@5.0.0-canary.36
124
+
125
+ ## 4.0.0-canary.40
126
+
127
+ ### Patch Changes
128
+
129
+ - Updated dependencies [f634bac]
130
+ - @ai-sdk/provider-utils@5.0.0-canary.35
131
+
132
+ ## 4.0.0-canary.39
133
+
134
+ ### Patch Changes
135
+
136
+ - Updated dependencies [69254e0]
137
+ - Updated dependencies [3015fc3]
138
+ - @ai-sdk/provider-utils@5.0.0-canary.34
139
+
140
+ ## 4.0.0-canary.38
141
+
142
+ ### Patch Changes
143
+
144
+ - Updated dependencies [2427d88]
145
+ - @ai-sdk/provider-utils@5.0.0-canary.33
146
+
147
+ ## 4.0.0-canary.37
148
+
149
+ ### Patch Changes
150
+
151
+ - 5463d0d: feat(provider): align tool result output content file part types with top-level message file part types
152
+ - Updated dependencies [5463d0d]
153
+ - @ai-sdk/provider-utils@5.0.0-canary.32
154
+ - @ai-sdk/provider@4.0.0-canary.16
155
+
156
+ ## 4.0.0-canary.36
157
+
158
+ ### Patch Changes
159
+
160
+ - 3ae1d12: Add support for mistral-medium-3.5
161
+
162
+ ## 4.0.0-canary.35
163
+
164
+ ### Patch Changes
165
+
166
+ - 8abd80f: Map cached token counts from Mistral API usage response. Previously all prompt tokens were reported as noCacheTokens, ignoring the `num_cached_tokens`, `prompt_tokens_details.cached_tokens`, and `prompt_token_details.cached_tokens` fields returned by Mistral.
167
+
168
+ ## 4.0.0-canary.34
169
+
170
+ ### Patch Changes
171
+
172
+ - 0c4c275: trigger initial canary release
173
+ - Updated dependencies [0c4c275]
174
+ - @ai-sdk/provider-utils@5.0.0-canary.31
175
+ - @ai-sdk/provider@4.0.0-canary.15
176
+
177
+ ## 4.0.0-beta.33
178
+
179
+ ### Major Changes
180
+
181
+ - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols
182
+
183
+ For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases.
184
+
185
+ ### Patch Changes
186
+
187
+ - Updated dependencies [08d2129]
188
+ - @ai-sdk/provider-utils@5.0.0-beta.30
189
+
190
+ ## 4.0.0-beta.32
191
+
192
+ ### Patch Changes
193
+
194
+ - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type
195
+ - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
196
+ - Updated dependencies [9bd6512]
197
+ - Updated dependencies [258c093]
198
+ - Updated dependencies [b6783da]
199
+ - @ai-sdk/provider-utils@5.0.0-beta.29
200
+ - @ai-sdk/provider@4.0.0-beta.14
201
+
202
+ ## 4.0.0-beta.31
203
+
204
+ ### Patch Changes
205
+
206
+ - 9f0e36c: trigger release for all packages after provenance setup
207
+ - Updated dependencies [9f0e36c]
208
+ - @ai-sdk/provider@4.0.0-beta.13
209
+ - @ai-sdk/provider-utils@5.0.0-beta.28
210
+
211
+ ## 4.0.0-beta.30
212
+
213
+ ### Patch Changes
214
+
215
+ - 58a2ad7: fix: more precise default message for tool execution denial
216
+ - Updated dependencies [785fe16]
217
+ - Updated dependencies [67df0a0]
218
+ - Updated dependencies [befb78c]
219
+ - Updated dependencies [0458559]
220
+ - Updated dependencies [5852c0a]
221
+ - Updated dependencies [fc92055]
222
+ - @ai-sdk/provider-utils@5.0.0-beta.27
223
+
224
+ ## 4.0.0-beta.29
225
+
226
+ ### Patch Changes
227
+
228
+ - Updated dependencies [2e98477]
229
+ - @ai-sdk/provider-utils@5.0.0-beta.26
230
+
231
+ ## 4.0.0-beta.28
232
+
233
+ ### Patch Changes
234
+
235
+ - Updated dependencies [eea8d98]
236
+ - @ai-sdk/provider-utils@5.0.0-beta.25
237
+
238
+ ## 4.0.0-beta.27
239
+
240
+ ### Patch Changes
241
+
242
+ - Updated dependencies [f807e45]
243
+ - @ai-sdk/provider-utils@5.0.0-beta.24
244
+
245
+ ## 4.0.0-beta.26
246
+
247
+ ### Patch Changes
248
+
249
+ - Updated dependencies [350ea38]
250
+ - @ai-sdk/provider-utils@5.0.0-beta.23
251
+
252
+ ## 4.0.0-beta.25
253
+
254
+ ### Patch Changes
255
+
256
+ - Updated dependencies [083947b]
257
+ - @ai-sdk/provider-utils@5.0.0-beta.22
258
+
259
+ ## 4.0.0-beta.24
260
+
261
+ ### Patch Changes
262
+
263
+ - Updated dependencies [add1126]
264
+ - @ai-sdk/provider-utils@5.0.0-beta.21
265
+
266
+ ## 4.0.0-beta.23
267
+
268
+ ### Patch Changes
269
+
270
+ - b3976a2: Add workflow serialization support to all provider models.
271
+
272
+ **`@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.
273
+
274
+ **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.
275
+
276
+ All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
277
+
278
+ - ff5eba1: feat: roll `image-*` tool output types into their equivalent `file-*` types
279
+ - Updated dependencies [b3976a2]
280
+ - Updated dependencies [ff5eba1]
281
+ - @ai-sdk/provider-utils@5.0.0-beta.20
282
+ - @ai-sdk/provider@4.0.0-beta.12
283
+
284
+ ## 4.0.0-beta.22
285
+
286
+ ### Major Changes
287
+
288
+ - ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
289
+
290
+ ### Patch Changes
291
+
292
+ - Updated dependencies [ef992f8]
293
+ - @ai-sdk/provider@4.0.0-beta.11
294
+ - @ai-sdk/provider-utils@5.0.0-beta.19
295
+
296
+ ## 4.0.0-beta.21
297
+
298
+ ### Patch Changes
299
+
300
+ - Updated dependencies [90e2d8a]
301
+ - @ai-sdk/provider-utils@5.0.0-beta.18
302
+
303
+ ## 4.0.0-beta.20
304
+
305
+ ### Patch Changes
306
+
307
+ - Updated dependencies [3ae1786]
308
+ - @ai-sdk/provider-utils@5.0.0-beta.17
309
+
310
+ ## 4.0.0-beta.19
311
+
312
+ ### Patch Changes
313
+
314
+ - Updated dependencies [176466a]
315
+ - @ai-sdk/provider@4.0.0-beta.10
316
+ - @ai-sdk/provider-utils@5.0.0-beta.16
317
+
318
+ ## 4.0.0-beta.18
319
+
320
+ ### Patch Changes
321
+
322
+ - Updated dependencies [e311194]
323
+ - @ai-sdk/provider@4.0.0-beta.9
324
+ - @ai-sdk/provider-utils@5.0.0-beta.15
325
+
326
+ ## 4.0.0-beta.17
327
+
328
+ ### Patch Changes
329
+
330
+ - Updated dependencies [34bd95d]
331
+ - Updated dependencies [008271d]
332
+ - @ai-sdk/provider@4.0.0-beta.8
333
+ - @ai-sdk/provider-utils@5.0.0-beta.14
334
+
335
+ ## 4.0.0-beta.16
336
+
337
+ ### Patch Changes
338
+
339
+ - Updated dependencies [b0c2869]
340
+ - Updated dependencies [7e26e81]
341
+ - @ai-sdk/provider-utils@5.0.0-beta.13
342
+
343
+ ## 4.0.0-beta.15
344
+
345
+ ### Patch Changes
346
+
347
+ - Updated dependencies [46d1149]
348
+ - @ai-sdk/provider-utils@5.0.0-beta.12
349
+
350
+ ## 4.0.0-beta.14
351
+
352
+ ### Patch Changes
353
+
354
+ - Updated dependencies [6fd51c0]
355
+ - @ai-sdk/provider-utils@5.0.0-beta.11
356
+ - @ai-sdk/provider@4.0.0-beta.7
357
+
358
+ ## 4.0.0-beta.13
359
+
360
+ ### Patch Changes
361
+
362
+ - c29a26f: feat(provider): add support for provider references and uploading files as supported per provider
363
+ - Updated dependencies [c29a26f]
364
+ - @ai-sdk/provider-utils@5.0.0-beta.10
365
+ - @ai-sdk/provider@4.0.0-beta.6
366
+
367
+ ## 4.0.0-beta.12
368
+
369
+ ### Patch Changes
370
+
371
+ - 38fc777: Add AI Gateway hint to provider READMEs
372
+
373
+ ## 4.0.0-beta.11
374
+
375
+ ### Patch Changes
376
+
377
+ - Updated dependencies [2e17091]
378
+ - @ai-sdk/provider-utils@5.0.0-beta.9
379
+
380
+ ## 4.0.0-beta.10
381
+
382
+ ### Patch Changes
383
+
384
+ - Updated dependencies [986c6fd]
385
+ - Updated dependencies [493295c]
386
+ - @ai-sdk/provider-utils@5.0.0-beta.8
387
+
388
+ ## 4.0.0-beta.9
389
+
390
+ ### Patch Changes
391
+
392
+ - Updated dependencies [1f509d4]
393
+ - @ai-sdk/provider-utils@5.0.0-beta.7
394
+ - @ai-sdk/provider@4.0.0-beta.5
395
+
396
+ ## 4.0.0-beta.8
397
+
398
+ ### Patch Changes
399
+
400
+ - 737b8f4: feat(provider/mistral): add support for reasoning configuration (mistral-small-latest)
401
+
402
+ ## 4.0.0-beta.7
403
+
404
+ ### Patch Changes
405
+
406
+ - 5259a95: chore: add warning for providers that do not support new reasoning parameter
407
+
408
+ ## 4.0.0-beta.6
409
+
410
+ ### Patch Changes
411
+
412
+ - Updated dependencies [3887c70]
413
+ - @ai-sdk/provider-utils@5.0.0-beta.6
414
+ - @ai-sdk/provider@4.0.0-beta.4
415
+
3
416
  ## 4.0.0-beta.5
4
417
 
5
418
  ### Patch Changes
@@ -241,13 +654,13 @@
241
654
  Before
242
655
 
243
656
  ```ts
244
- model.textEmbeddingModel('my-model-id');
657
+ model.textEmbeddingModel("my-model-id");
245
658
  ```
246
659
 
247
660
  After
248
661
 
249
662
  ```ts
250
- model.embeddingModel('my-model-id');
663
+ model.embeddingModel("my-model-id");
251
664
  ```
252
665
 
253
666
  - 2625a04: feat(openai); update spec for mcp approval
@@ -462,13 +875,13 @@
462
875
  Before
463
876
 
464
877
  ```ts
465
- model.textEmbeddingModel('my-model-id');
878
+ model.textEmbeddingModel("my-model-id");
466
879
  ```
467
880
 
468
881
  After
469
882
 
470
883
  ```ts
471
- model.embeddingModel('my-model-id');
884
+ model.embeddingModel("my-model-id");
472
885
  ```
473
886
 
474
887
  - Updated dependencies [8d9e8ad]
@@ -818,12 +1231,12 @@
818
1231
  - 3429644: feat(provider/mistral): `MistralLanguageModelOptions` type
819
1232
 
820
1233
  ```ts
821
- import { mistral, type MistralLanguageModelOptions } from '@ai-sdk/mistral';
822
- import { generateText } from 'ai';
1234
+ import { mistral, type MistralLanguageModelOptions } from "@ai-sdk/mistral";
1235
+ import { generateText } from "ai";
823
1236
 
824
1237
  await generateText({
825
- model: mistral('open-mistral-7b'),
826
- prompt: 'Invent a new holiday and describe its traditions.',
1238
+ model: mistral("open-mistral-7b"),
1239
+ prompt: "Invent a new holiday and describe its traditions.",
827
1240
  providerOptions: {
828
1241
  mistral: {
829
1242
  safePrompt: true,
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  The **[Mistral provider](https://ai-sdk.dev/providers/ai-sdk-providers/mistral)** for the [AI SDK](https://ai-sdk.dev/docs) contains language model support for the Mistral chat API.
4
4
 
5
+ > **Deploying to Vercel?** With Vercel's AI Gateway you can access Mistral (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 Mistral provider is available in the `@ai-sdk/mistral` module. You can install it with
package/dist/index.d.ts CHANGED
@@ -2,16 +2,20 @@ import { ProviderV4, LanguageModelV4, EmbeddingModelV4 } from '@ai-sdk/provider'
2
2
  import { FetchFunction } from '@ai-sdk/provider-utils';
3
3
  import { z } from 'zod/v4';
4
4
 
5
- type MistralChatModelId = 'ministral-3b-latest' | 'ministral-8b-latest' | 'mistral-large-latest' | 'mistral-medium-latest' | 'mistral-medium-2508' | 'mistral-medium-2505' | 'mistral-small-latest' | 'pixtral-large-latest' | 'magistral-small-2507' | 'magistral-medium-2507' | 'magistral-small-2506' | 'magistral-medium-2506' | 'pixtral-12b-2409' | 'open-mistral-7b' | 'open-mixtral-8x7b' | 'open-mixtral-8x22b' | (string & {});
6
- declare const mistralLanguageModelOptions: z.ZodObject<{
5
+ type MistralChatModelId = 'ministral-3b-latest' | 'ministral-8b-latest' | 'ministral-14b-latest' | 'mistral-large-latest' | 'mistral-medium-latest' | 'mistral-medium-3' | 'mistral-large-2512' | 'mistral-medium-2508' | 'mistral-medium-2505' | 'mistral-small-2506' | 'pixtral-large-latest' | 'mistral-medium-3.5' | 'mistral-small-latest' | 'mistral-small-2603' | 'magistral-medium-latest' | 'magistral-small-latest' | 'magistral-medium-2509' | 'magistral-small-2509' | (string & {});
6
+ declare const mistralLanguageModelChatOptions: z.ZodObject<{
7
7
  safePrompt: z.ZodOptional<z.ZodBoolean>;
8
8
  documentImageLimit: z.ZodOptional<z.ZodNumber>;
9
9
  documentPageLimit: z.ZodOptional<z.ZodNumber>;
10
10
  structuredOutputs: z.ZodOptional<z.ZodBoolean>;
11
11
  strictJsonSchema: z.ZodOptional<z.ZodBoolean>;
12
12
  parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
13
+ reasoningEffort: z.ZodOptional<z.ZodEnum<{
14
+ none: "none";
15
+ high: "high";
16
+ }>>;
13
17
  }, z.core.$strip>;
14
- type MistralLanguageModelOptions = z.infer<typeof mistralLanguageModelOptions>;
18
+ type MistralLanguageModelChatOptions = z.infer<typeof mistralLanguageModelChatOptions>;
15
19
 
16
20
  type MistralEmbeddingModelId = 'mistral-embed' | (string & {});
17
21
 
@@ -75,4 +79,4 @@ declare const mistral: MistralProvider;
75
79
 
76
80
  declare const VERSION: string;
77
81
 
78
- export { type MistralLanguageModelOptions, type MistralProvider, type MistralProviderSettings, VERSION, createMistral, mistral };
82
+ export { type MistralLanguageModelChatOptions, type MistralLanguageModelChatOptions as MistralLanguageModelOptions, type MistralProvider, type MistralProviderSettings, VERSION, createMistral, mistral };