@ai-sdk/deepseek 3.0.0-beta.4 → 3.0.0-beta.55
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 +417 -4
- package/README.md +2 -0
- package/dist/index.d.ts +17 -9
- package/dist/index.js +171 -227
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +57 -0
- package/dist/{index.mjs → internal/index.js} +84 -183
- package/dist/internal/index.js.map +1 -0
- package/docs/30-deepseek.mdx +31 -19
- package/internal.d.ts +1 -0
- package/package.json +21 -15
- package/src/chat/convert-to-deepseek-chat-messages.ts +18 -12
- package/src/chat/convert-to-deepseek-usage.ts +2 -2
- package/src/chat/deepseek-chat-language-model-options.ts +34 -0
- package/src/chat/deepseek-chat-language-model.ts +95 -172
- package/src/chat/deepseek-prepare-tools.ts +9 -6
- package/src/chat/map-deepseek-finish-reason.ts +2 -2
- package/src/deepseek-provider.ts +10 -10
- package/src/index.ts +12 -5
- package/src/internal/index.ts +2 -0
- package/dist/index.d.mts +0 -68
- package/dist/index.mjs.map +0 -1
- package/src/chat/deepseek-chat-options.ts +0 -22
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,418 @@
|
|
|
1
1
|
# @ai-sdk/deepseek
|
|
2
2
|
|
|
3
|
+
## 3.0.0-beta.55
|
|
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
|
+
## 3.0.0-canary.54
|
|
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
|
+
## 3.0.0-canary.53
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [bae5e2b]
|
|
26
|
+
- @ai-sdk/provider-utils@5.0.0-canary.47
|
|
27
|
+
|
|
28
|
+
## 3.0.0-canary.52
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- b23b042: feat(azure): add deepseek model support to azure
|
|
33
|
+
|
|
34
|
+
## 3.0.0-canary.51
|
|
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
|
+
## 3.0.0-canary.50
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- Updated dependencies [ee798eb]
|
|
47
|
+
- Updated dependencies [daf6637]
|
|
48
|
+
- @ai-sdk/provider-utils@5.0.0-canary.45
|
|
49
|
+
|
|
50
|
+
## 3.0.0-canary.49
|
|
51
|
+
|
|
52
|
+
### Patch Changes
|
|
53
|
+
|
|
54
|
+
- Updated dependencies [6c93e36]
|
|
55
|
+
- Updated dependencies [f617ac2]
|
|
56
|
+
- @ai-sdk/provider-utils@5.0.0-canary.44
|
|
57
|
+
|
|
58
|
+
## 3.0.0-canary.48
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
|
|
63
|
+
- Updated dependencies [7fc6bd6]
|
|
64
|
+
- @ai-sdk/provider-utils@5.0.0-canary.43
|
|
65
|
+
- @ai-sdk/provider@4.0.0-canary.17
|
|
66
|
+
|
|
67
|
+
## 3.0.0-canary.47
|
|
68
|
+
|
|
69
|
+
### Patch Changes
|
|
70
|
+
|
|
71
|
+
- Updated dependencies [a6617c5]
|
|
72
|
+
- @ai-sdk/provider-utils@5.0.0-canary.42
|
|
73
|
+
|
|
74
|
+
## 3.0.0-canary.46
|
|
75
|
+
|
|
76
|
+
### Patch Changes
|
|
77
|
+
|
|
78
|
+
- Updated dependencies [28dfa06]
|
|
79
|
+
- Updated dependencies [e93fa91]
|
|
80
|
+
- @ai-sdk/provider-utils@5.0.0-canary.41
|
|
81
|
+
|
|
82
|
+
## 3.0.0-canary.45
|
|
83
|
+
|
|
84
|
+
### Patch Changes
|
|
85
|
+
|
|
86
|
+
- Updated dependencies [a7de9c9]
|
|
87
|
+
- @ai-sdk/provider-utils@5.0.0-canary.40
|
|
88
|
+
|
|
89
|
+
## 3.0.0-canary.44
|
|
90
|
+
|
|
91
|
+
### Patch Changes
|
|
92
|
+
|
|
93
|
+
- Updated dependencies [105f95b]
|
|
94
|
+
- @ai-sdk/provider-utils@5.0.0-canary.39
|
|
95
|
+
|
|
96
|
+
## 3.0.0-canary.43
|
|
97
|
+
|
|
98
|
+
### Patch Changes
|
|
99
|
+
|
|
100
|
+
- 87280a6: Accept `thinking.type: 'adaptive'` and the full `reasoningEffort` enum (`low`, `medium`, `high`, `xhigh`, `max`) for the DeepSeek provider.
|
|
101
|
+
|
|
102
|
+
## 3.0.0-canary.42
|
|
103
|
+
|
|
104
|
+
### Patch Changes
|
|
105
|
+
|
|
106
|
+
- Updated dependencies [ca446f8]
|
|
107
|
+
- @ai-sdk/provider-utils@5.0.0-canary.38
|
|
108
|
+
|
|
109
|
+
## 3.0.0-canary.41
|
|
110
|
+
|
|
111
|
+
### Patch Changes
|
|
112
|
+
|
|
113
|
+
- Updated dependencies [d848405]
|
|
114
|
+
- @ai-sdk/provider-utils@5.0.0-canary.37
|
|
115
|
+
|
|
116
|
+
## 3.0.0-canary.40
|
|
117
|
+
|
|
118
|
+
### Patch Changes
|
|
119
|
+
|
|
120
|
+
- Updated dependencies [ca39020]
|
|
121
|
+
- @ai-sdk/provider-utils@5.0.0-canary.36
|
|
122
|
+
|
|
123
|
+
## 3.0.0-canary.39
|
|
124
|
+
|
|
125
|
+
### Patch Changes
|
|
126
|
+
|
|
127
|
+
- Updated dependencies [f634bac]
|
|
128
|
+
- @ai-sdk/provider-utils@5.0.0-canary.35
|
|
129
|
+
|
|
130
|
+
## 3.0.0-canary.38
|
|
131
|
+
|
|
132
|
+
### Patch Changes
|
|
133
|
+
|
|
134
|
+
- Updated dependencies [69254e0]
|
|
135
|
+
- Updated dependencies [3015fc3]
|
|
136
|
+
- @ai-sdk/provider-utils@5.0.0-canary.34
|
|
137
|
+
|
|
138
|
+
## 3.0.0-canary.37
|
|
139
|
+
|
|
140
|
+
### Patch Changes
|
|
141
|
+
|
|
142
|
+
- eda4373: feat(provider/deepseek): add DeepSeek V4 reasoning effort support
|
|
143
|
+
|
|
144
|
+
## 3.0.0-canary.36
|
|
145
|
+
|
|
146
|
+
### Patch Changes
|
|
147
|
+
|
|
148
|
+
- Updated dependencies [2427d88]
|
|
149
|
+
- @ai-sdk/provider-utils@5.0.0-canary.33
|
|
150
|
+
|
|
151
|
+
## 3.0.0-canary.35
|
|
152
|
+
|
|
153
|
+
### Patch Changes
|
|
154
|
+
|
|
155
|
+
- Updated dependencies [5463d0d]
|
|
156
|
+
- @ai-sdk/provider-utils@5.0.0-canary.32
|
|
157
|
+
- @ai-sdk/provider@4.0.0-canary.16
|
|
158
|
+
|
|
159
|
+
## 3.0.0-canary.34
|
|
160
|
+
|
|
161
|
+
### Patch Changes
|
|
162
|
+
|
|
163
|
+
- 0c4c275: trigger initial canary release
|
|
164
|
+
- Updated dependencies [0c4c275]
|
|
165
|
+
- @ai-sdk/provider-utils@5.0.0-canary.31
|
|
166
|
+
- @ai-sdk/provider@4.0.0-canary.15
|
|
167
|
+
|
|
168
|
+
## 3.0.0-beta.33
|
|
169
|
+
|
|
170
|
+
### Major Changes
|
|
171
|
+
|
|
172
|
+
- 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols
|
|
173
|
+
|
|
174
|
+
For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases.
|
|
175
|
+
|
|
176
|
+
### Patch Changes
|
|
177
|
+
|
|
178
|
+
- Updated dependencies [08d2129]
|
|
179
|
+
- @ai-sdk/provider-utils@5.0.0-beta.30
|
|
180
|
+
|
|
181
|
+
## 3.0.0-beta.32
|
|
182
|
+
|
|
183
|
+
### Patch Changes
|
|
184
|
+
|
|
185
|
+
- 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type
|
|
186
|
+
- 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
|
|
187
|
+
- Updated dependencies [9bd6512]
|
|
188
|
+
- Updated dependencies [258c093]
|
|
189
|
+
- Updated dependencies [b6783da]
|
|
190
|
+
- @ai-sdk/provider-utils@5.0.0-beta.29
|
|
191
|
+
- @ai-sdk/provider@4.0.0-beta.14
|
|
192
|
+
|
|
193
|
+
## 3.0.0-beta.31
|
|
194
|
+
|
|
195
|
+
### Patch Changes
|
|
196
|
+
|
|
197
|
+
- 9f0e36c: trigger release for all packages after provenance setup
|
|
198
|
+
- Updated dependencies [9f0e36c]
|
|
199
|
+
- @ai-sdk/provider@4.0.0-beta.13
|
|
200
|
+
- @ai-sdk/provider-utils@5.0.0-beta.28
|
|
201
|
+
|
|
202
|
+
## 3.0.0-beta.30
|
|
203
|
+
|
|
204
|
+
### Patch Changes
|
|
205
|
+
|
|
206
|
+
- 0498012: fix(provider/deepseek): preserve reasoning_content for deepseek-v4 in multi-turn requests
|
|
207
|
+
- 58a2ad7: fix: more precise default message for tool execution denial
|
|
208
|
+
- Updated dependencies [785fe16]
|
|
209
|
+
- Updated dependencies [67df0a0]
|
|
210
|
+
- Updated dependencies [befb78c]
|
|
211
|
+
- Updated dependencies [0458559]
|
|
212
|
+
- Updated dependencies [5852c0a]
|
|
213
|
+
- Updated dependencies [fc92055]
|
|
214
|
+
- @ai-sdk/provider-utils@5.0.0-beta.27
|
|
215
|
+
|
|
216
|
+
## 3.0.0-beta.29
|
|
217
|
+
|
|
218
|
+
### Patch Changes
|
|
219
|
+
|
|
220
|
+
- Updated dependencies [2e98477]
|
|
221
|
+
- @ai-sdk/provider-utils@5.0.0-beta.26
|
|
222
|
+
|
|
223
|
+
## 3.0.0-beta.28
|
|
224
|
+
|
|
225
|
+
### Patch Changes
|
|
226
|
+
|
|
227
|
+
- Updated dependencies [eea8d98]
|
|
228
|
+
- @ai-sdk/provider-utils@5.0.0-beta.25
|
|
229
|
+
|
|
230
|
+
## 3.0.0-beta.27
|
|
231
|
+
|
|
232
|
+
### Patch Changes
|
|
233
|
+
|
|
234
|
+
- f807e45: Extract shared `StreamingToolCallTracker` class into `@ai-sdk/provider-utils` to deduplicate streaming tool call handling across OpenAI-compatible providers. Also adds missing `generateId()` fallback for `toolCallId` in Alibaba's `doGenerate` path and ensures all providers finalize unfinished tool calls during stream flush.
|
|
235
|
+
- Updated dependencies [f807e45]
|
|
236
|
+
- @ai-sdk/provider-utils@5.0.0-beta.24
|
|
237
|
+
|
|
238
|
+
## 3.0.0-beta.26
|
|
239
|
+
|
|
240
|
+
### Patch Changes
|
|
241
|
+
|
|
242
|
+
- Updated dependencies [350ea38]
|
|
243
|
+
- @ai-sdk/provider-utils@5.0.0-beta.23
|
|
244
|
+
|
|
245
|
+
## 3.0.0-beta.25
|
|
246
|
+
|
|
247
|
+
### Patch Changes
|
|
248
|
+
|
|
249
|
+
- Updated dependencies [083947b]
|
|
250
|
+
- @ai-sdk/provider-utils@5.0.0-beta.22
|
|
251
|
+
|
|
252
|
+
## 3.0.0-beta.24
|
|
253
|
+
|
|
254
|
+
### Patch Changes
|
|
255
|
+
|
|
256
|
+
- Updated dependencies [add1126]
|
|
257
|
+
- @ai-sdk/provider-utils@5.0.0-beta.21
|
|
258
|
+
|
|
259
|
+
## 3.0.0-beta.23
|
|
260
|
+
|
|
261
|
+
### Patch Changes
|
|
262
|
+
|
|
263
|
+
- b3976a2: Add workflow serialization support to all provider models.
|
|
264
|
+
|
|
265
|
+
**`@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.
|
|
266
|
+
|
|
267
|
+
**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.
|
|
268
|
+
|
|
269
|
+
All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
|
|
270
|
+
|
|
271
|
+
- Updated dependencies [b3976a2]
|
|
272
|
+
- Updated dependencies [ff5eba1]
|
|
273
|
+
- @ai-sdk/provider-utils@5.0.0-beta.20
|
|
274
|
+
- @ai-sdk/provider@4.0.0-beta.12
|
|
275
|
+
|
|
276
|
+
## 3.0.0-beta.22
|
|
277
|
+
|
|
278
|
+
### Major Changes
|
|
279
|
+
|
|
280
|
+
- ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
|
|
281
|
+
|
|
282
|
+
### Patch Changes
|
|
283
|
+
|
|
284
|
+
- Updated dependencies [ef992f8]
|
|
285
|
+
- @ai-sdk/provider@4.0.0-beta.11
|
|
286
|
+
- @ai-sdk/provider-utils@5.0.0-beta.19
|
|
287
|
+
|
|
288
|
+
## 3.0.0-beta.21
|
|
289
|
+
|
|
290
|
+
### Patch Changes
|
|
291
|
+
|
|
292
|
+
- Updated dependencies [90e2d8a]
|
|
293
|
+
- @ai-sdk/provider-utils@5.0.0-beta.18
|
|
294
|
+
|
|
295
|
+
## 3.0.0-beta.20
|
|
296
|
+
|
|
297
|
+
### Patch Changes
|
|
298
|
+
|
|
299
|
+
- Updated dependencies [3ae1786]
|
|
300
|
+
- @ai-sdk/provider-utils@5.0.0-beta.17
|
|
301
|
+
|
|
302
|
+
## 3.0.0-beta.19
|
|
303
|
+
|
|
304
|
+
### Patch Changes
|
|
305
|
+
|
|
306
|
+
- Updated dependencies [176466a]
|
|
307
|
+
- @ai-sdk/provider@4.0.0-beta.10
|
|
308
|
+
- @ai-sdk/provider-utils@5.0.0-beta.16
|
|
309
|
+
|
|
310
|
+
## 3.0.0-beta.18
|
|
311
|
+
|
|
312
|
+
### Patch Changes
|
|
313
|
+
|
|
314
|
+
- Updated dependencies [e311194]
|
|
315
|
+
- @ai-sdk/provider@4.0.0-beta.9
|
|
316
|
+
- @ai-sdk/provider-utils@5.0.0-beta.15
|
|
317
|
+
|
|
318
|
+
## 3.0.0-beta.17
|
|
319
|
+
|
|
320
|
+
### Patch Changes
|
|
321
|
+
|
|
322
|
+
- Updated dependencies [34bd95d]
|
|
323
|
+
- Updated dependencies [008271d]
|
|
324
|
+
- @ai-sdk/provider@4.0.0-beta.8
|
|
325
|
+
- @ai-sdk/provider-utils@5.0.0-beta.14
|
|
326
|
+
|
|
327
|
+
## 3.0.0-beta.16
|
|
328
|
+
|
|
329
|
+
### Patch Changes
|
|
330
|
+
|
|
331
|
+
- Updated dependencies [b0c2869]
|
|
332
|
+
- Updated dependencies [7e26e81]
|
|
333
|
+
- @ai-sdk/provider-utils@5.0.0-beta.13
|
|
334
|
+
|
|
335
|
+
## 3.0.0-beta.15
|
|
336
|
+
|
|
337
|
+
### Patch Changes
|
|
338
|
+
|
|
339
|
+
- Updated dependencies [46d1149]
|
|
340
|
+
- @ai-sdk/provider-utils@5.0.0-beta.12
|
|
341
|
+
|
|
342
|
+
## 3.0.0-beta.14
|
|
343
|
+
|
|
344
|
+
### Patch Changes
|
|
345
|
+
|
|
346
|
+
- Updated dependencies [6fd51c0]
|
|
347
|
+
- @ai-sdk/provider-utils@5.0.0-beta.11
|
|
348
|
+
- @ai-sdk/provider@4.0.0-beta.7
|
|
349
|
+
|
|
350
|
+
## 3.0.0-beta.13
|
|
351
|
+
|
|
352
|
+
### Patch Changes
|
|
353
|
+
|
|
354
|
+
- Updated dependencies [c29a26f]
|
|
355
|
+
- @ai-sdk/provider-utils@5.0.0-beta.10
|
|
356
|
+
- @ai-sdk/provider@4.0.0-beta.6
|
|
357
|
+
|
|
358
|
+
## 3.0.0-beta.12
|
|
359
|
+
|
|
360
|
+
### Patch Changes
|
|
361
|
+
|
|
362
|
+
- 38fc777: Add AI Gateway hint to provider READMEs
|
|
363
|
+
|
|
364
|
+
## 3.0.0-beta.11
|
|
365
|
+
|
|
366
|
+
### Patch Changes
|
|
367
|
+
|
|
368
|
+
- Updated dependencies [2e17091]
|
|
369
|
+
- @ai-sdk/provider-utils@5.0.0-beta.9
|
|
370
|
+
|
|
371
|
+
## 3.0.0-beta.10
|
|
372
|
+
|
|
373
|
+
### Patch Changes
|
|
374
|
+
|
|
375
|
+
- Updated dependencies [986c6fd]
|
|
376
|
+
- Updated dependencies [493295c]
|
|
377
|
+
- @ai-sdk/provider-utils@5.0.0-beta.8
|
|
378
|
+
|
|
379
|
+
## 3.0.0-beta.9
|
|
380
|
+
|
|
381
|
+
### Patch Changes
|
|
382
|
+
|
|
383
|
+
- Updated dependencies [1f509d4]
|
|
384
|
+
- @ai-sdk/provider-utils@5.0.0-beta.7
|
|
385
|
+
- @ai-sdk/provider@4.0.0-beta.5
|
|
386
|
+
|
|
387
|
+
## 3.0.0-beta.8
|
|
388
|
+
|
|
389
|
+
### Patch Changes
|
|
390
|
+
|
|
391
|
+
- 74d520f: feat: migrate providers to support new top-level `reasoning` parameter
|
|
392
|
+
|
|
393
|
+
## 3.0.0-beta.7
|
|
394
|
+
|
|
395
|
+
### Patch Changes
|
|
396
|
+
|
|
397
|
+
- Updated dependencies [3887c70]
|
|
398
|
+
- @ai-sdk/provider-utils@5.0.0-beta.6
|
|
399
|
+
- @ai-sdk/provider@4.0.0-beta.4
|
|
400
|
+
|
|
401
|
+
## 3.0.0-beta.6
|
|
402
|
+
|
|
403
|
+
### Patch Changes
|
|
404
|
+
|
|
405
|
+
- Updated dependencies [776b617]
|
|
406
|
+
- @ai-sdk/provider-utils@5.0.0-beta.5
|
|
407
|
+
- @ai-sdk/provider@4.0.0-beta.3
|
|
408
|
+
|
|
409
|
+
## 3.0.0-beta.5
|
|
410
|
+
|
|
411
|
+
### Patch Changes
|
|
412
|
+
|
|
413
|
+
- Updated dependencies [61753c3]
|
|
414
|
+
- @ai-sdk/provider-utils@5.0.0-beta.4
|
|
415
|
+
|
|
3
416
|
## 3.0.0-beta.4
|
|
4
417
|
|
|
5
418
|
### Patch Changes
|
|
@@ -236,13 +649,13 @@
|
|
|
236
649
|
Before
|
|
237
650
|
|
|
238
651
|
```ts
|
|
239
|
-
model.textEmbeddingModel(
|
|
652
|
+
model.textEmbeddingModel("my-model-id");
|
|
240
653
|
```
|
|
241
654
|
|
|
242
655
|
After
|
|
243
656
|
|
|
244
657
|
```ts
|
|
245
|
-
model.embeddingModel(
|
|
658
|
+
model.embeddingModel("my-model-id");
|
|
246
659
|
```
|
|
247
660
|
|
|
248
661
|
- 2625a04: feat(openai); update spec for mcp approval
|
|
@@ -459,13 +872,13 @@
|
|
|
459
872
|
Before
|
|
460
873
|
|
|
461
874
|
```ts
|
|
462
|
-
model.textEmbeddingModel(
|
|
875
|
+
model.textEmbeddingModel("my-model-id");
|
|
463
876
|
```
|
|
464
877
|
|
|
465
878
|
After
|
|
466
879
|
|
|
467
880
|
```ts
|
|
468
|
-
model.embeddingModel(
|
|
881
|
+
model.embeddingModel("my-model-id");
|
|
469
882
|
```
|
|
470
883
|
|
|
471
884
|
- Updated dependencies [8d9e8ad]
|
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
The **[DeepSeek provider](https://ai-sdk.dev/providers/ai-sdk-providers/deepseek)** for the [AI SDK](https://ai-sdk.dev/docs) contains language model support for the [DeepSeek](https://www.deepseek.com) platform.
|
|
4
4
|
|
|
5
|
+
> **Deploying to Vercel?** With Vercel's AI Gateway you can access DeepSeek (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 DeepSeek provider is available in the `@ai-sdk/deepseek` module. You can install it with
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ProviderV4, LanguageModelV4 } from '@ai-sdk/provider';
|
|
2
2
|
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
3
3
|
import { z } from 'zod/v4';
|
|
4
4
|
|
|
5
5
|
type DeepSeekChatModelId = 'deepseek-chat' | 'deepseek-reasoner' | (string & {});
|
|
6
|
-
declare const
|
|
6
|
+
declare const deepseekLanguageModelChatOptions: z.ZodObject<{
|
|
7
7
|
thinking: z.ZodOptional<z.ZodObject<{
|
|
8
8
|
type: z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
adaptive: "adaptive";
|
|
9
10
|
enabled: "enabled";
|
|
10
11
|
disabled: "disabled";
|
|
11
12
|
}>>;
|
|
12
13
|
}, z.core.$strip>>;
|
|
14
|
+
reasoningEffort: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
low: "low";
|
|
16
|
+
medium: "medium";
|
|
17
|
+
high: "high";
|
|
18
|
+
xhigh: "xhigh";
|
|
19
|
+
max: "max";
|
|
20
|
+
}>>;
|
|
13
21
|
}, z.core.$strip>;
|
|
14
|
-
type
|
|
22
|
+
type DeepSeekLanguageModelChatOptions = z.infer<typeof deepseekLanguageModelChatOptions>;
|
|
15
23
|
|
|
16
24
|
interface DeepSeekProviderSettings {
|
|
17
25
|
/**
|
|
@@ -32,26 +40,26 @@ interface DeepSeekProviderSettings {
|
|
|
32
40
|
*/
|
|
33
41
|
fetch?: FetchFunction;
|
|
34
42
|
}
|
|
35
|
-
interface DeepSeekProvider extends
|
|
43
|
+
interface DeepSeekProvider extends ProviderV4 {
|
|
36
44
|
/**
|
|
37
45
|
* Creates a DeepSeek model for text generation.
|
|
38
46
|
*/
|
|
39
|
-
(modelId: DeepSeekChatModelId):
|
|
47
|
+
(modelId: DeepSeekChatModelId): LanguageModelV4;
|
|
40
48
|
/**
|
|
41
49
|
* Creates a DeepSeek model for text generation.
|
|
42
50
|
*/
|
|
43
|
-
languageModel(modelId: DeepSeekChatModelId):
|
|
51
|
+
languageModel(modelId: DeepSeekChatModelId): LanguageModelV4;
|
|
44
52
|
/**
|
|
45
53
|
* Creates a DeepSeek chat model for text generation.
|
|
46
54
|
*/
|
|
47
|
-
chat(modelId: DeepSeekChatModelId):
|
|
55
|
+
chat(modelId: DeepSeekChatModelId): LanguageModelV4;
|
|
48
56
|
/**
|
|
49
57
|
* @deprecated Use `embeddingModel` instead.
|
|
50
58
|
*/
|
|
51
59
|
textEmbeddingModel(modelId: string): never;
|
|
52
60
|
}
|
|
53
61
|
declare function createDeepSeek(options?: DeepSeekProviderSettings): DeepSeekProvider;
|
|
54
|
-
declare const
|
|
62
|
+
declare const deepSeek: DeepSeekProvider;
|
|
55
63
|
|
|
56
64
|
declare const VERSION: string;
|
|
57
65
|
|
|
@@ -65,4 +73,4 @@ declare const deepSeekErrorSchema: z.ZodObject<{
|
|
|
65
73
|
}, z.core.$strip>;
|
|
66
74
|
type DeepSeekErrorData = z.infer<typeof deepSeekErrorSchema>;
|
|
67
75
|
|
|
68
|
-
export { type
|
|
76
|
+
export { type DeepSeekLanguageModelChatOptions as DeepSeekChatOptions, type DeepSeekErrorData, type DeepSeekLanguageModelChatOptions, type DeepSeekLanguageModelChatOptions as DeepSeekLanguageModelOptions, type DeepSeekProvider, type DeepSeekProviderSettings, VERSION, createDeepSeek, deepSeek, deepSeek as deepseek };
|