@ai-sdk/mistral 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 CHANGED
@@ -1,5 +1,234 @@
1
1
  # @ai-sdk/mistral
2
2
 
3
+ ## 4.0.0-beta.31
4
+
5
+ ### Patch Changes
6
+
7
+ - 9f0e36c: trigger release for all packages after provenance setup
8
+ - Updated dependencies [9f0e36c]
9
+ - @ai-sdk/provider@4.0.0-beta.13
10
+ - @ai-sdk/provider-utils@5.0.0-beta.28
11
+
12
+ ## 4.0.0-beta.30
13
+
14
+ ### Patch Changes
15
+
16
+ - 58a2ad7: fix: more precise default message for tool execution denial
17
+ - Updated dependencies [785fe16]
18
+ - Updated dependencies [67df0a0]
19
+ - Updated dependencies [befb78c]
20
+ - Updated dependencies [0458559]
21
+ - Updated dependencies [5852c0a]
22
+ - Updated dependencies [fc92055]
23
+ - @ai-sdk/provider-utils@5.0.0-beta.27
24
+
25
+ ## 4.0.0-beta.29
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies [2e98477]
30
+ - @ai-sdk/provider-utils@5.0.0-beta.26
31
+
32
+ ## 4.0.0-beta.28
33
+
34
+ ### Patch Changes
35
+
36
+ - Updated dependencies [eea8d98]
37
+ - @ai-sdk/provider-utils@5.0.0-beta.25
38
+
39
+ ## 4.0.0-beta.27
40
+
41
+ ### Patch Changes
42
+
43
+ - Updated dependencies [f807e45]
44
+ - @ai-sdk/provider-utils@5.0.0-beta.24
45
+
46
+ ## 4.0.0-beta.26
47
+
48
+ ### Patch Changes
49
+
50
+ - Updated dependencies [350ea38]
51
+ - @ai-sdk/provider-utils@5.0.0-beta.23
52
+
53
+ ## 4.0.0-beta.25
54
+
55
+ ### Patch Changes
56
+
57
+ - Updated dependencies [083947b]
58
+ - @ai-sdk/provider-utils@5.0.0-beta.22
59
+
60
+ ## 4.0.0-beta.24
61
+
62
+ ### Patch Changes
63
+
64
+ - Updated dependencies [add1126]
65
+ - @ai-sdk/provider-utils@5.0.0-beta.21
66
+
67
+ ## 4.0.0-beta.23
68
+
69
+ ### Patch Changes
70
+
71
+ - b3976a2: Add workflow serialization support to all provider models.
72
+
73
+ **`@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.
74
+
75
+ **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.
76
+
77
+ All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
78
+
79
+ - ff5eba1: feat: roll `image-*` tool output types into their equivalent `file-*` types
80
+ - Updated dependencies [b3976a2]
81
+ - Updated dependencies [ff5eba1]
82
+ - @ai-sdk/provider-utils@5.0.0-beta.20
83
+ - @ai-sdk/provider@4.0.0-beta.12
84
+
85
+ ## 4.0.0-beta.22
86
+
87
+ ### Major Changes
88
+
89
+ - ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
90
+
91
+ ### Patch Changes
92
+
93
+ - Updated dependencies [ef992f8]
94
+ - @ai-sdk/provider@4.0.0-beta.11
95
+ - @ai-sdk/provider-utils@5.0.0-beta.19
96
+
97
+ ## 4.0.0-beta.21
98
+
99
+ ### Patch Changes
100
+
101
+ - Updated dependencies [90e2d8a]
102
+ - @ai-sdk/provider-utils@5.0.0-beta.18
103
+
104
+ ## 4.0.0-beta.20
105
+
106
+ ### Patch Changes
107
+
108
+ - Updated dependencies [3ae1786]
109
+ - @ai-sdk/provider-utils@5.0.0-beta.17
110
+
111
+ ## 4.0.0-beta.19
112
+
113
+ ### Patch Changes
114
+
115
+ - Updated dependencies [176466a]
116
+ - @ai-sdk/provider@4.0.0-beta.10
117
+ - @ai-sdk/provider-utils@5.0.0-beta.16
118
+
119
+ ## 4.0.0-beta.18
120
+
121
+ ### Patch Changes
122
+
123
+ - Updated dependencies [e311194]
124
+ - @ai-sdk/provider@4.0.0-beta.9
125
+ - @ai-sdk/provider-utils@5.0.0-beta.15
126
+
127
+ ## 4.0.0-beta.17
128
+
129
+ ### Patch Changes
130
+
131
+ - Updated dependencies [34bd95d]
132
+ - Updated dependencies [008271d]
133
+ - @ai-sdk/provider@4.0.0-beta.8
134
+ - @ai-sdk/provider-utils@5.0.0-beta.14
135
+
136
+ ## 4.0.0-beta.16
137
+
138
+ ### Patch Changes
139
+
140
+ - Updated dependencies [b0c2869]
141
+ - Updated dependencies [7e26e81]
142
+ - @ai-sdk/provider-utils@5.0.0-beta.13
143
+
144
+ ## 4.0.0-beta.15
145
+
146
+ ### Patch Changes
147
+
148
+ - Updated dependencies [46d1149]
149
+ - @ai-sdk/provider-utils@5.0.0-beta.12
150
+
151
+ ## 4.0.0-beta.14
152
+
153
+ ### Patch Changes
154
+
155
+ - Updated dependencies [6fd51c0]
156
+ - @ai-sdk/provider-utils@5.0.0-beta.11
157
+ - @ai-sdk/provider@4.0.0-beta.7
158
+
159
+ ## 4.0.0-beta.13
160
+
161
+ ### Patch Changes
162
+
163
+ - c29a26f: feat(provider): add support for provider references and uploading files as supported per provider
164
+ - Updated dependencies [c29a26f]
165
+ - @ai-sdk/provider-utils@5.0.0-beta.10
166
+ - @ai-sdk/provider@4.0.0-beta.6
167
+
168
+ ## 4.0.0-beta.12
169
+
170
+ ### Patch Changes
171
+
172
+ - 38fc777: Add AI Gateway hint to provider READMEs
173
+
174
+ ## 4.0.0-beta.11
175
+
176
+ ### Patch Changes
177
+
178
+ - Updated dependencies [2e17091]
179
+ - @ai-sdk/provider-utils@5.0.0-beta.9
180
+
181
+ ## 4.0.0-beta.10
182
+
183
+ ### Patch Changes
184
+
185
+ - Updated dependencies [986c6fd]
186
+ - Updated dependencies [493295c]
187
+ - @ai-sdk/provider-utils@5.0.0-beta.8
188
+
189
+ ## 4.0.0-beta.9
190
+
191
+ ### Patch Changes
192
+
193
+ - Updated dependencies [1f509d4]
194
+ - @ai-sdk/provider-utils@5.0.0-beta.7
195
+ - @ai-sdk/provider@4.0.0-beta.5
196
+
197
+ ## 4.0.0-beta.8
198
+
199
+ ### Patch Changes
200
+
201
+ - 737b8f4: feat(provider/mistral): add support for reasoning configuration (mistral-small-latest)
202
+
203
+ ## 4.0.0-beta.7
204
+
205
+ ### Patch Changes
206
+
207
+ - 5259a95: chore: add warning for providers that do not support new reasoning parameter
208
+
209
+ ## 4.0.0-beta.6
210
+
211
+ ### Patch Changes
212
+
213
+ - Updated dependencies [3887c70]
214
+ - @ai-sdk/provider-utils@5.0.0-beta.6
215
+ - @ai-sdk/provider@4.0.0-beta.4
216
+
217
+ ## 4.0.0-beta.5
218
+
219
+ ### Patch Changes
220
+
221
+ - Updated dependencies [776b617]
222
+ - @ai-sdk/provider-utils@5.0.0-beta.5
223
+ - @ai-sdk/provider@4.0.0-beta.3
224
+
225
+ ## 4.0.0-beta.4
226
+
227
+ ### Patch Changes
228
+
229
+ - Updated dependencies [61753c3]
230
+ - @ai-sdk/provider-utils@5.0.0-beta.4
231
+
3
232
  ## 4.0.0-beta.3
4
233
 
5
234
  ### Patch Changes
@@ -226,13 +455,13 @@
226
455
  Before
227
456
 
228
457
  ```ts
229
- model.textEmbeddingModel('my-model-id');
458
+ model.textEmbeddingModel("my-model-id");
230
459
  ```
231
460
 
232
461
  After
233
462
 
234
463
  ```ts
235
- model.embeddingModel('my-model-id');
464
+ model.embeddingModel("my-model-id");
236
465
  ```
237
466
 
238
467
  - 2625a04: feat(openai); update spec for mcp approval
@@ -447,13 +676,13 @@
447
676
  Before
448
677
 
449
678
  ```ts
450
- model.textEmbeddingModel('my-model-id');
679
+ model.textEmbeddingModel("my-model-id");
451
680
  ```
452
681
 
453
682
  After
454
683
 
455
684
  ```ts
456
- model.embeddingModel('my-model-id');
685
+ model.embeddingModel("my-model-id");
457
686
  ```
458
687
 
459
688
  - Updated dependencies [8d9e8ad]
@@ -803,12 +1032,12 @@
803
1032
  - 3429644: feat(provider/mistral): `MistralLanguageModelOptions` type
804
1033
 
805
1034
  ```ts
806
- import { mistral, type MistralLanguageModelOptions } from '@ai-sdk/mistral';
807
- import { generateText } from 'ai';
1035
+ import { mistral, type MistralLanguageModelOptions } from "@ai-sdk/mistral";
1036
+ import { generateText } from "ai";
808
1037
 
809
1038
  await generateText({
810
- model: mistral('open-mistral-7b'),
811
- prompt: 'Invent a new holiday and describe its traditions.',
1039
+ model: mistral("open-mistral-7b"),
1040
+ prompt: "Invent a new holiday and describe its traditions.",
812
1041
  providerOptions: {
813
1042
  mistral: {
814
1043
  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
@@ -1,8 +1,8 @@
1
- import { ProviderV3, LanguageModelV3, EmbeddingModelV3 } from '@ai-sdk/provider';
1
+ 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 & {});
5
+ type MistralChatModelId = 'ministral-3b-latest' | 'ministral-8b-latest' | 'ministral-14b-latest' | 'mistral-large-latest' | 'mistral-medium-latest' | 'mistral-large-2512' | 'mistral-medium-2508' | 'mistral-medium-2505' | 'mistral-small-2506' | 'pixtral-large-latest' | 'mistral-small-latest' | 'mistral-small-2603' | 'magistral-medium-latest' | 'magistral-small-latest' | 'magistral-medium-2509' | 'magistral-small-2509' | (string & {});
6
6
  declare const mistralLanguageModelOptions: z.ZodObject<{
7
7
  safePrompt: z.ZodOptional<z.ZodBoolean>;
8
8
  documentImageLimit: z.ZodOptional<z.ZodNumber>;
@@ -10,37 +10,41 @@ declare const mistralLanguageModelOptions: z.ZodObject<{
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
18
  type MistralLanguageModelOptions = z.infer<typeof mistralLanguageModelOptions>;
15
19
 
16
20
  type MistralEmbeddingModelId = 'mistral-embed' | (string & {});
17
21
 
18
- interface MistralProvider extends ProviderV3 {
19
- (modelId: MistralChatModelId): LanguageModelV3;
22
+ interface MistralProvider extends ProviderV4 {
23
+ (modelId: MistralChatModelId): LanguageModelV4;
20
24
  /**
21
25
  * Creates a model for text generation.
22
26
  */
23
- languageModel(modelId: MistralChatModelId): LanguageModelV3;
27
+ languageModel(modelId: MistralChatModelId): LanguageModelV4;
24
28
  /**
25
29
  * Creates a model for text generation.
26
30
  */
27
- chat(modelId: MistralChatModelId): LanguageModelV3;
31
+ chat(modelId: MistralChatModelId): LanguageModelV4;
28
32
  /**
29
33
  * Creates a model for text embeddings.
30
34
  */
31
- embedding(modelId: MistralEmbeddingModelId): EmbeddingModelV3;
35
+ embedding(modelId: MistralEmbeddingModelId): EmbeddingModelV4;
32
36
  /**
33
37
  * Creates a model for text embeddings.
34
38
  */
35
- embeddingModel: (modelId: MistralEmbeddingModelId) => EmbeddingModelV3;
39
+ embeddingModel: (modelId: MistralEmbeddingModelId) => EmbeddingModelV4;
36
40
  /**
37
41
  * @deprecated Use `embedding` instead.
38
42
  */
39
- textEmbedding(modelId: MistralEmbeddingModelId): EmbeddingModelV3;
43
+ textEmbedding(modelId: MistralEmbeddingModelId): EmbeddingModelV4;
40
44
  /**
41
45
  * @deprecated Use `embeddingModel` instead.
42
46
  */
43
- textEmbeddingModel(modelId: MistralEmbeddingModelId): EmbeddingModelV3;
47
+ textEmbeddingModel(modelId: MistralEmbeddingModelId): EmbeddingModelV4;
44
48
  }
45
49
  interface MistralProviderSettings {
46
50
  /**