@ai-sdk/alibaba 2.0.0-beta.6 → 2.0.0-beta.61

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,506 @@
1
1
  # @ai-sdk/alibaba
2
2
 
3
+ ## 2.0.0-beta.61
4
+
5
+ ### Patch Changes
6
+
7
+ - 0416e3e: feat (video): add first-class `generateAudio` call option
8
+ - Updated dependencies [0416e3e]
9
+ - @ai-sdk/provider@4.0.0-beta.20
10
+ - @ai-sdk/openai-compatible@3.0.0-beta.58
11
+ - @ai-sdk/provider-utils@5.0.0-beta.50
12
+
13
+ ## 2.0.0-beta.60
14
+
15
+ ### Patch Changes
16
+
17
+ - b8396f0: trigger initial beta release
18
+ - Updated dependencies [b8396f0]
19
+ - @ai-sdk/openai-compatible@3.0.0-beta.57
20
+ - @ai-sdk/provider-utils@5.0.0-beta.49
21
+ - @ai-sdk/provider@4.0.0-beta.19
22
+
23
+ ## 2.0.0-canary.59
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies [aeda373]
28
+ - Updated dependencies [375fdd7]
29
+ - Updated dependencies [b4507d5]
30
+ - @ai-sdk/provider-utils@5.0.0-canary.48
31
+ - @ai-sdk/openai-compatible@3.0.0-canary.56
32
+
33
+ ## 2.0.0-canary.58
34
+
35
+ ### Patch Changes
36
+
37
+ - Updated dependencies [bae5e2b]
38
+ - @ai-sdk/provider-utils@5.0.0-canary.47
39
+ - @ai-sdk/openai-compatible@3.0.0-canary.55
40
+
41
+ ## 2.0.0-canary.57
42
+
43
+ ### Patch Changes
44
+
45
+ - Updated dependencies [ce769dd]
46
+ - @ai-sdk/provider@4.0.0-canary.18
47
+ - @ai-sdk/openai-compatible@3.0.0-canary.54
48
+ - @ai-sdk/provider-utils@5.0.0-canary.46
49
+
50
+ ## 2.0.0-canary.56
51
+
52
+ ### Patch Changes
53
+
54
+ - 616bb31: feat(aliababa): add embedding model support
55
+ - Updated dependencies [ee798eb]
56
+ - Updated dependencies [daf6637]
57
+ - @ai-sdk/provider-utils@5.0.0-canary.45
58
+ - @ai-sdk/openai-compatible@3.0.0-canary.53
59
+
60
+ ## 2.0.0-canary.55
61
+
62
+ ### Patch Changes
63
+
64
+ - Updated dependencies [6c93e36]
65
+ - Updated dependencies [f617ac2]
66
+ - @ai-sdk/provider-utils@5.0.0-canary.44
67
+ - @ai-sdk/openai-compatible@3.0.0-canary.52
68
+
69
+ ## 2.0.0-canary.54
70
+
71
+ ### Patch Changes
72
+
73
+ - Updated dependencies [9f1e1ba]
74
+ - @ai-sdk/openai-compatible@3.0.0-canary.51
75
+
76
+ ## 2.0.0-canary.53
77
+
78
+ ### Patch Changes
79
+
80
+ - 94c6edc: Add `qwen3.7-max` model ID to Alibaba and AI Gateway.
81
+
82
+ ## 2.0.0-canary.52
83
+
84
+ ### Patch Changes
85
+
86
+ - 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
87
+ - Updated dependencies [7fc6bd6]
88
+ - @ai-sdk/openai-compatible@3.0.0-canary.50
89
+ - @ai-sdk/provider-utils@5.0.0-canary.43
90
+ - @ai-sdk/provider@4.0.0-canary.17
91
+
92
+ ## 2.0.0-canary.51
93
+
94
+ ### Patch Changes
95
+
96
+ - Updated dependencies [a6617c5]
97
+ - @ai-sdk/provider-utils@5.0.0-canary.42
98
+ - @ai-sdk/openai-compatible@3.0.0-canary.49
99
+
100
+ ## 2.0.0-canary.50
101
+
102
+ ### Patch Changes
103
+
104
+ - Updated dependencies [28dfa06]
105
+ - Updated dependencies [e93fa91]
106
+ - @ai-sdk/provider-utils@5.0.0-canary.41
107
+ - @ai-sdk/openai-compatible@3.0.0-canary.48
108
+
109
+ ## 2.0.0-canary.49
110
+
111
+ ### Patch Changes
112
+
113
+ - Updated dependencies [a7de9c9]
114
+ - @ai-sdk/provider-utils@5.0.0-canary.40
115
+ - @ai-sdk/openai-compatible@3.0.0-canary.47
116
+
117
+ ## 2.0.0-canary.48
118
+
119
+ ### Patch Changes
120
+
121
+ - Updated dependencies [105f95b]
122
+ - @ai-sdk/provider-utils@5.0.0-canary.39
123
+ - @ai-sdk/openai-compatible@3.0.0-canary.46
124
+
125
+ ## 2.0.0-canary.47
126
+
127
+ ### Patch Changes
128
+
129
+ - Updated dependencies [ca446f8]
130
+ - @ai-sdk/provider-utils@5.0.0-canary.38
131
+ - @ai-sdk/openai-compatible@3.0.0-canary.45
132
+
133
+ ## 2.0.0-canary.46
134
+
135
+ ### Patch Changes
136
+
137
+ - Updated dependencies [d848405]
138
+ - @ai-sdk/provider-utils@5.0.0-canary.37
139
+ - @ai-sdk/openai-compatible@3.0.0-canary.44
140
+
141
+ ## 2.0.0-canary.45
142
+
143
+ ### Patch Changes
144
+
145
+ - Updated dependencies [ca39020]
146
+ - @ai-sdk/provider-utils@5.0.0-canary.36
147
+ - @ai-sdk/openai-compatible@3.0.0-canary.43
148
+
149
+ ## 2.0.0-canary.44
150
+
151
+ ### Patch Changes
152
+
153
+ - Updated dependencies [f634bac]
154
+ - @ai-sdk/provider-utils@5.0.0-canary.35
155
+ - @ai-sdk/openai-compatible@3.0.0-canary.42
156
+
157
+ ## 2.0.0-canary.43
158
+
159
+ ### Patch Changes
160
+
161
+ - Updated dependencies [69254e0]
162
+ - Updated dependencies [3015fc3]
163
+ - @ai-sdk/provider-utils@5.0.0-canary.34
164
+ - @ai-sdk/openai-compatible@3.0.0-canary.41
165
+
166
+ ## 2.0.0-canary.42
167
+
168
+ ### Patch Changes
169
+
170
+ - Updated dependencies [2427d88]
171
+ - @ai-sdk/provider-utils@5.0.0-canary.33
172
+ - @ai-sdk/openai-compatible@3.0.0-canary.40
173
+
174
+ ## 2.0.0-canary.41
175
+
176
+ ### Patch Changes
177
+
178
+ - Updated dependencies [5463d0d]
179
+ - @ai-sdk/provider-utils@5.0.0-canary.32
180
+ - @ai-sdk/provider@4.0.0-canary.16
181
+ - @ai-sdk/openai-compatible@3.0.0-canary.39
182
+
183
+ ## 2.0.0-canary.40
184
+
185
+ ### Patch Changes
186
+
187
+ - Updated dependencies [cd9c311]
188
+ - @ai-sdk/openai-compatible@3.0.0-canary.38
189
+
190
+ ## 2.0.0-canary.39
191
+
192
+ ### Patch Changes
193
+
194
+ - 0c4c275: trigger initial canary release
195
+ - Updated dependencies [0c4c275]
196
+ - @ai-sdk/openai-compatible@3.0.0-canary.37
197
+ - @ai-sdk/provider-utils@5.0.0-canary.31
198
+ - @ai-sdk/provider@4.0.0-canary.15
199
+
200
+ ## 2.0.0-beta.38
201
+
202
+ ### Patch Changes
203
+
204
+ - Updated dependencies [e59c955]
205
+ - @ai-sdk/openai-compatible@3.0.0-beta.36
206
+
207
+ ## 2.0.0-beta.37
208
+
209
+ ### Major Changes
210
+
211
+ - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols
212
+
213
+ For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases.
214
+
215
+ ### Patch Changes
216
+
217
+ - Updated dependencies [08d2129]
218
+ - Updated dependencies [04e9009]
219
+ - @ai-sdk/provider-utils@5.0.0-beta.30
220
+ - @ai-sdk/openai-compatible@3.0.0-beta.35
221
+
222
+ ## 2.0.0-beta.36
223
+
224
+ ### Patch Changes
225
+
226
+ - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type
227
+ - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
228
+ - Updated dependencies [9bd6512]
229
+ - Updated dependencies [258c093]
230
+ - Updated dependencies [b6783da]
231
+ - @ai-sdk/openai-compatible@3.0.0-beta.34
232
+ - @ai-sdk/provider-utils@5.0.0-beta.29
233
+ - @ai-sdk/provider@4.0.0-beta.14
234
+
235
+ ## 2.0.0-beta.35
236
+
237
+ ### Patch Changes
238
+
239
+ - 9f0e36c: trigger release for all packages after provenance setup
240
+ - Updated dependencies [9f0e36c]
241
+ - @ai-sdk/openai-compatible@3.0.0-beta.33
242
+ - @ai-sdk/provider@4.0.0-beta.13
243
+ - @ai-sdk/provider-utils@5.0.0-beta.28
244
+
245
+ ## 2.0.0-beta.34
246
+
247
+ ### Patch Changes
248
+
249
+ - 58a2ad7: fix: more precise default message for tool execution denial
250
+ - Updated dependencies [ab81968]
251
+ - Updated dependencies [785fe16]
252
+ - Updated dependencies [67df0a0]
253
+ - Updated dependencies [befb78c]
254
+ - Updated dependencies [0458559]
255
+ - Updated dependencies [58a2ad7]
256
+ - Updated dependencies [5852c0a]
257
+ - Updated dependencies [fc92055]
258
+ - @ai-sdk/openai-compatible@3.0.0-beta.32
259
+ - @ai-sdk/provider-utils@5.0.0-beta.27
260
+
261
+ ## 2.0.0-beta.33
262
+
263
+ ### Patch Changes
264
+
265
+ - Updated dependencies [2e98477]
266
+ - Updated dependencies [bfb756d]
267
+ - @ai-sdk/provider-utils@5.0.0-beta.26
268
+ - @ai-sdk/openai-compatible@3.0.0-beta.31
269
+
270
+ ## 2.0.0-beta.32
271
+
272
+ ### Patch Changes
273
+
274
+ - Updated dependencies [eea8d98]
275
+ - @ai-sdk/provider-utils@5.0.0-beta.25
276
+ - @ai-sdk/openai-compatible@3.0.0-beta.30
277
+
278
+ ## 2.0.0-beta.31
279
+
280
+ ### Patch Changes
281
+
282
+ - 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.
283
+ - Updated dependencies [f807e45]
284
+ - @ai-sdk/provider-utils@5.0.0-beta.24
285
+ - @ai-sdk/openai-compatible@3.0.0-beta.29
286
+
287
+ ## 2.0.0-beta.30
288
+
289
+ ### Patch Changes
290
+
291
+ - Updated dependencies [350ea38]
292
+ - @ai-sdk/provider-utils@5.0.0-beta.23
293
+ - @ai-sdk/openai-compatible@3.0.0-beta.28
294
+
295
+ ## 2.0.0-beta.29
296
+
297
+ ### Patch Changes
298
+
299
+ - Updated dependencies [083947b]
300
+ - @ai-sdk/provider-utils@5.0.0-beta.22
301
+ - @ai-sdk/openai-compatible@3.0.0-beta.27
302
+
303
+ ## 2.0.0-beta.28
304
+
305
+ ### Patch Changes
306
+
307
+ - Updated dependencies [add1126]
308
+ - @ai-sdk/provider-utils@5.0.0-beta.21
309
+ - @ai-sdk/openai-compatible@3.0.0-beta.26
310
+
311
+ ## 2.0.0-beta.27
312
+
313
+ ### Patch Changes
314
+
315
+ - b3976a2: Add workflow serialization support to all provider models.
316
+
317
+ **`@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.
318
+
319
+ **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.
320
+
321
+ All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
322
+
323
+ - Updated dependencies [b3976a2]
324
+ - Updated dependencies [ff5eba1]
325
+ - @ai-sdk/provider-utils@5.0.0-beta.20
326
+ - @ai-sdk/openai-compatible@3.0.0-beta.25
327
+ - @ai-sdk/provider@4.0.0-beta.12
328
+
329
+ ## 2.0.0-beta.26
330
+
331
+ ### Major Changes
332
+
333
+ - ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
334
+
335
+ ### Patch Changes
336
+
337
+ - Updated dependencies [ef992f8]
338
+ - @ai-sdk/openai-compatible@3.0.0-beta.24
339
+ - @ai-sdk/provider@4.0.0-beta.11
340
+ - @ai-sdk/provider-utils@5.0.0-beta.19
341
+
342
+ ## 2.0.0-beta.25
343
+
344
+ ### Patch Changes
345
+
346
+ - 90e2d8a: chore: fix unused vars not being flagged by our lint tooling
347
+ - Updated dependencies [90e2d8a]
348
+ - @ai-sdk/openai-compatible@3.0.0-beta.23
349
+ - @ai-sdk/provider-utils@5.0.0-beta.18
350
+
351
+ ## 2.0.0-beta.24
352
+
353
+ ### Patch Changes
354
+
355
+ - Updated dependencies [3ae1786]
356
+ - @ai-sdk/provider-utils@5.0.0-beta.17
357
+ - @ai-sdk/openai-compatible@3.0.0-beta.22
358
+
359
+ ## 2.0.0-beta.23
360
+
361
+ ### Patch Changes
362
+
363
+ - Updated dependencies [176466a]
364
+ - @ai-sdk/provider@4.0.0-beta.10
365
+ - @ai-sdk/openai-compatible@3.0.0-beta.21
366
+ - @ai-sdk/provider-utils@5.0.0-beta.16
367
+
368
+ ## 2.0.0-beta.22
369
+
370
+ ### Patch Changes
371
+
372
+ - Updated dependencies [e311194]
373
+ - @ai-sdk/provider@4.0.0-beta.9
374
+ - @ai-sdk/openai-compatible@3.0.0-beta.20
375
+ - @ai-sdk/provider-utils@5.0.0-beta.15
376
+
377
+ ## 2.0.0-beta.21
378
+
379
+ ### Patch Changes
380
+
381
+ - Updated dependencies [34bd95d]
382
+ - Updated dependencies [008271d]
383
+ - @ai-sdk/provider@4.0.0-beta.8
384
+ - @ai-sdk/openai-compatible@3.0.0-beta.19
385
+ - @ai-sdk/provider-utils@5.0.0-beta.14
386
+
387
+ ## 2.0.0-beta.20
388
+
389
+ ### Patch Changes
390
+
391
+ - Updated dependencies [b0c2869]
392
+ - Updated dependencies [7e26e81]
393
+ - @ai-sdk/provider-utils@5.0.0-beta.13
394
+ - @ai-sdk/openai-compatible@3.0.0-beta.18
395
+
396
+ ## 2.0.0-beta.19
397
+
398
+ ### Patch Changes
399
+
400
+ - Updated dependencies [816ff67]
401
+ - @ai-sdk/openai-compatible@3.0.0-beta.17
402
+
403
+ ## 2.0.0-beta.18
404
+
405
+ ### Patch Changes
406
+
407
+ - Updated dependencies [46d1149]
408
+ - @ai-sdk/provider-utils@5.0.0-beta.12
409
+ - @ai-sdk/openai-compatible@3.0.0-beta.16
410
+
411
+ ## 2.0.0-beta.17
412
+
413
+ ### Patch Changes
414
+
415
+ - Updated dependencies [6fd51c0]
416
+ - @ai-sdk/provider-utils@5.0.0-beta.11
417
+ - @ai-sdk/provider@4.0.0-beta.7
418
+ - @ai-sdk/openai-compatible@3.0.0-beta.15
419
+
420
+ ## 2.0.0-beta.16
421
+
422
+ ### Patch Changes
423
+
424
+ - c29a26f: feat(provider): add support for provider references and uploading files as supported per provider
425
+ - Updated dependencies [c29a26f]
426
+ - @ai-sdk/openai-compatible@3.0.0-beta.14
427
+ - @ai-sdk/provider-utils@5.0.0-beta.10
428
+ - @ai-sdk/provider@4.0.0-beta.6
429
+
430
+ ## 2.0.0-beta.15
431
+
432
+ ### Patch Changes
433
+
434
+ - 38fc777: Add AI Gateway hint to provider READMEs
435
+ - Updated dependencies [38fc777]
436
+ - @ai-sdk/openai-compatible@3.0.0-beta.13
437
+
438
+ ## 2.0.0-beta.14
439
+
440
+ ### Patch Changes
441
+
442
+ - Updated dependencies [2e17091]
443
+ - @ai-sdk/provider-utils@5.0.0-beta.9
444
+ - @ai-sdk/openai-compatible@3.0.0-beta.12
445
+
446
+ ## 2.0.0-beta.13
447
+
448
+ ### Patch Changes
449
+
450
+ - Updated dependencies [986c6fd]
451
+ - Updated dependencies [493295c]
452
+ - @ai-sdk/provider-utils@5.0.0-beta.8
453
+ - @ai-sdk/openai-compatible@3.0.0-beta.11
454
+
455
+ ## 2.0.0-beta.12
456
+
457
+ ### Patch Changes
458
+
459
+ - Updated dependencies [1f509d4]
460
+ - @ai-sdk/provider-utils@5.0.0-beta.7
461
+ - @ai-sdk/provider@4.0.0-beta.5
462
+ - @ai-sdk/openai-compatible@3.0.0-beta.10
463
+
464
+ ## 2.0.0-beta.11
465
+
466
+ ### Patch Changes
467
+
468
+ - 74d520f: feat: migrate providers to support new top-level `reasoning` parameter
469
+ - Updated dependencies [74d520f]
470
+ - @ai-sdk/openai-compatible@3.0.0-beta.9
471
+
472
+ ## 2.0.0-beta.10
473
+
474
+ ### Patch Changes
475
+
476
+ - Updated dependencies [3887c70]
477
+ - @ai-sdk/provider-utils@5.0.0-beta.6
478
+ - @ai-sdk/provider@4.0.0-beta.4
479
+ - @ai-sdk/openai-compatible@3.0.0-beta.8
480
+
481
+ ## 2.0.0-beta.9
482
+
483
+ ### Patch Changes
484
+
485
+ - Updated dependencies [776b617]
486
+ - @ai-sdk/provider-utils@5.0.0-beta.5
487
+ - @ai-sdk/provider@4.0.0-beta.3
488
+ - @ai-sdk/openai-compatible@3.0.0-beta.7
489
+
490
+ ## 2.0.0-beta.8
491
+
492
+ ### Patch Changes
493
+
494
+ - Updated dependencies [61753c3]
495
+ - @ai-sdk/provider-utils@5.0.0-beta.4
496
+ - @ai-sdk/openai-compatible@3.0.0-beta.6
497
+
498
+ ## 2.0.0-beta.7
499
+
500
+ ### Patch Changes
501
+
502
+ - 811cd8e: fix(provider/alibaba): handle single-item content array cache control
503
+
3
504
  ## 2.0.0-beta.6
4
505
 
5
506
  ### Patch Changes
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # AI SDK - Alibaba Provider
2
2
 
3
- The **[Alibaba provider](https://ai-sdk.dev/providers/ai-sdk-providers/alibaba)** for the [AI SDK](https://ai-sdk.dev/docs) contains language model support for [Alibaba Cloud Model Studio](https://modelstudio.console.alibabacloud.com/), including the Qwen model series with advanced reasoning capabilities.
3
+ The **[Alibaba provider](https://ai-sdk.dev/providers/ai-sdk-providers/alibaba)** for the [AI SDK](https://ai-sdk.dev/docs) contains language model, embedding model, and video model support for [Alibaba Cloud Model Studio](https://modelstudio.console.alibabacloud.com/), including the Qwen model series with advanced reasoning capabilities.
4
+
5
+ > **Deploying to Vercel?** With Vercel's AI Gateway you can access Alibaba (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).
4
6
 
5
7
  ## Setup
6
8
 
@@ -61,6 +63,25 @@ console.log('Reasoning:', reasoningText);
61
63
  console.log('Answer:', text);
62
64
  ```
63
65
 
66
+ ## Embedding Model Example
67
+
68
+ ```ts
69
+ import { alibaba, type AlibabaEmbeddingModelOptions } from '@ai-sdk/alibaba';
70
+ import { embed } from 'ai';
71
+
72
+ const { embedding, usage } = await embed({
73
+ model: alibaba.embedding('text-embedding-v4'),
74
+ value: 'sunny day at the beach',
75
+ providerOptions: {
76
+ alibaba: {
77
+ textType: 'document',
78
+ dimension: 1024,
79
+ outputType: 'dense',
80
+ } satisfies AlibabaEmbeddingModelOptions,
81
+ },
82
+ });
83
+ ```
84
+
64
85
  ## Tool Calling Example
65
86
 
66
87
  ```ts
package/dist/index.d.ts CHANGED
@@ -1,19 +1,34 @@
1
1
  import { z } from 'zod/v4';
2
+ import { ProviderV4, LanguageModelV4, EmbeddingModelV4, Experimental_VideoModelV4 } from '@ai-sdk/provider';
2
3
  import { FetchFunction } from '@ai-sdk/provider-utils';
3
- import { ProviderV4, LanguageModelV4, Experimental_VideoModelV4 } from '@ai-sdk/provider';
4
4
 
5
- type AlibabaChatModelId = 'qwen3-max' | 'qwen3-max-preview' | 'qwen-plus' | 'qwen-plus-latest' | 'qwen-flash' | 'qwen-turbo' | 'qwen-turbo-latest' | 'qwen3-235b-a22b' | 'qwen3-32b' | 'qwen3-30b-a3b' | 'qwen3-14b' | 'qwen3-next-80b-a3b-thinking' | 'qwen3-235b-a22b-thinking-2507' | 'qwen3-30b-a3b-thinking-2507' | 'qwq-plus' | 'qwq-plus-latest' | 'qwq-32b' | 'qwen-coder' | 'qwen3-coder-plus' | 'qwen3-coder-flash' | (string & {});
6
- declare const alibabaLanguageModelOptions: z.ZodObject<{
5
+ type AlibabaChatModelId = 'qwen3.7-max' | 'qwen3-max' | 'qwen3-max-preview' | 'qwen-plus' | 'qwen-plus-latest' | 'qwen-flash' | 'qwen-turbo' | 'qwen-turbo-latest' | 'qwen3-235b-a22b' | 'qwen3-32b' | 'qwen3-30b-a3b' | 'qwen3-14b' | 'qwen3-next-80b-a3b-thinking' | 'qwen3-235b-a22b-thinking-2507' | 'qwen3-30b-a3b-thinking-2507' | 'qwq-plus' | 'qwq-plus-latest' | 'qwq-32b' | 'qwen-coder' | 'qwen3-coder-plus' | 'qwen3-coder-flash' | (string & {});
6
+ declare const alibabaLanguageModelChatOptions: z.ZodObject<{
7
7
  enableThinking: z.ZodOptional<z.ZodBoolean>;
8
8
  thinkingBudget: z.ZodOptional<z.ZodNumber>;
9
9
  parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
10
10
  }, z.core.$strip>;
11
- type AlibabaLanguageModelOptions = z.infer<typeof alibabaLanguageModelOptions>;
11
+ type AlibabaLanguageModelChatOptions = z.infer<typeof alibabaLanguageModelChatOptions>;
12
12
 
13
13
  type AlibabaCacheControl = {
14
14
  type: string;
15
15
  };
16
16
 
17
+ type AlibabaEmbeddingModelId = 'text-embedding-v4' | 'text-embedding-v3' | (string & {});
18
+ declare const alibabaEmbeddingModelOptions: z.ZodObject<{
19
+ textType: z.ZodOptional<z.ZodEnum<{
20
+ query: "query";
21
+ document: "document";
22
+ }>>;
23
+ dimension: z.ZodOptional<z.ZodNumber>;
24
+ outputType: z.ZodOptional<z.ZodEnum<{
25
+ dense: "dense";
26
+ sparse: "sparse";
27
+ "dense&sparse": "dense&sparse";
28
+ }>>;
29
+ }, z.core.$strip>;
30
+ type AlibabaEmbeddingModelOptions = z.infer<typeof alibabaEmbeddingModelOptions>;
31
+
17
32
  type AlibabaVideoModelId = 'wan2.6-t2v' | 'wan2.5-t2v-preview' | 'wan2.6-i2v' | 'wan2.6-i2v-flash' | 'wan2.6-r2v' | 'wan2.6-r2v-flash' | (string & {});
18
33
 
19
34
  interface AlibabaProvider extends ProviderV4 {
@@ -26,6 +41,14 @@ interface AlibabaProvider extends ProviderV4 {
26
41
  * Creates a chat model for text generation.
27
42
  */
28
43
  chatModel(modelId: AlibabaChatModelId): LanguageModelV4;
44
+ /**
45
+ * Creates a model for text embeddings.
46
+ */
47
+ embedding(modelId: AlibabaEmbeddingModelId): EmbeddingModelV4;
48
+ /**
49
+ * Creates a model for text embeddings.
50
+ */
51
+ embeddingModel(modelId: AlibabaEmbeddingModelId): EmbeddingModelV4;
29
52
  /**
30
53
  * Creates a model for video generation.
31
54
  */
@@ -47,6 +70,12 @@ interface AlibabaProviderSettings {
47
70
  * The default prefix is `https://dashscope-intl.aliyuncs.com`.
48
71
  */
49
72
  videoBaseURL?: string;
73
+ /**
74
+ * Use a different URL prefix for embedding API calls.
75
+ * The embedding API uses the DashScope native endpoint (not the OpenAI-compatible endpoint).
76
+ * The default prefix is `https://dashscope-intl.aliyuncs.com/api/v1`.
77
+ */
78
+ embeddingBaseURL?: string;
50
79
  /**
51
80
  * API key that is being sent using the `Authorization` header.
52
81
  * It defaults to the `ALIBABA_API_KEY` environment variable.
@@ -116,4 +145,4 @@ type AlibabaUsage = {
116
145
 
117
146
  declare const VERSION: string;
118
147
 
119
- export { type AlibabaCacheControl, type AlibabaChatModelId, type AlibabaLanguageModelOptions, type AlibabaProvider, type AlibabaLanguageModelOptions as AlibabaProviderOptions, type AlibabaProviderSettings, type AlibabaUsage, type AlibabaVideoModelId, type AlibabaVideoModelOptions, type AlibabaVideoModelOptions as AlibabaVideoProviderOptions, VERSION, alibaba, createAlibaba };
148
+ export { type AlibabaCacheControl, type AlibabaChatModelId, type AlibabaEmbeddingModelId, type AlibabaEmbeddingModelOptions, type AlibabaLanguageModelChatOptions, type AlibabaLanguageModelChatOptions as AlibabaLanguageModelOptions, type AlibabaProvider, type AlibabaLanguageModelChatOptions as AlibabaProviderOptions, type AlibabaProviderSettings, type AlibabaUsage, type AlibabaVideoModelId, type AlibabaVideoModelOptions, type AlibabaVideoModelOptions as AlibabaVideoProviderOptions, VERSION, alibaba, createAlibaba };