@ai-sdk/alibaba 2.0.0-beta.5 → 2.0.0-beta.60

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