@ai-sdk/xai 2.0.61 → 2.0.63
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 +19 -4
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @ai-sdk/xai
|
|
2
2
|
|
|
3
|
+
## 2.0.63
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5e55f43: chore(provider/xai): update Grok 4.20 model IDs to their non-beta versions
|
|
8
|
+
|
|
9
|
+
## 2.0.62
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [6a2f01b]
|
|
14
|
+
- Updated dependencies [17d64e3]
|
|
15
|
+
- @ai-sdk/provider-utils@3.0.22
|
|
16
|
+
- @ai-sdk/openai-compatible@1.0.34
|
|
17
|
+
|
|
3
18
|
## 2.0.61
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -449,7 +464,7 @@
|
|
|
449
464
|
|
|
450
465
|
```js
|
|
451
466
|
await generateImage({
|
|
452
|
-
model: luma.image(
|
|
467
|
+
model: luma.image("photon-flash-1", {
|
|
453
468
|
maxImagesPerCall: 5,
|
|
454
469
|
pollIntervalMillis: 500,
|
|
455
470
|
}),
|
|
@@ -462,7 +477,7 @@
|
|
|
462
477
|
|
|
463
478
|
```js
|
|
464
479
|
await generateImage({
|
|
465
|
-
model: luma.image(
|
|
480
|
+
model: luma.image("photon-flash-1"),
|
|
466
481
|
prompt,
|
|
467
482
|
n: 10,
|
|
468
483
|
maxImagesPerCall: 5,
|
|
@@ -915,7 +930,7 @@
|
|
|
915
930
|
|
|
916
931
|
```js
|
|
917
932
|
await generateImage({
|
|
918
|
-
model: luma.image(
|
|
933
|
+
model: luma.image("photon-flash-1", {
|
|
919
934
|
maxImagesPerCall: 5,
|
|
920
935
|
pollIntervalMillis: 500,
|
|
921
936
|
}),
|
|
@@ -928,7 +943,7 @@
|
|
|
928
943
|
|
|
929
944
|
```js
|
|
930
945
|
await generateImage({
|
|
931
|
-
model: luma.image(
|
|
946
|
+
model: luma.image("photon-flash-1"),
|
|
932
947
|
prompt,
|
|
933
948
|
n: 10,
|
|
934
949
|
maxImagesPerCall: 5,
|
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import { ProviderV2, LanguageModelV2, ImageModelV2 } from '@ai-sdk/provider';
|
|
|
3
3
|
import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
|
|
4
4
|
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
5
5
|
|
|
6
|
-
type XaiChatModelId = 'grok-4-1' | 'grok-4-1-fast-reasoning' | 'grok-4-1-fast-non-reasoning' | 'grok-4-fast-non-reasoning' | 'grok-4-fast-reasoning' | 'grok-code-fast-1' | 'grok-4' | 'grok-4-0709' | 'grok-4-latest' | 'grok-3' | 'grok-3-latest' | 'grok-3-fast' | 'grok-3-fast-latest' | 'grok-3-mini' | 'grok-3-mini-latest' | 'grok-3-mini-fast' | 'grok-3-mini-fast-latest' | 'grok-2-vision-1212' | 'grok-2-vision' | 'grok-2-vision-latest' | 'grok-2-image-1212' | 'grok-2-image' | 'grok-2-image-latest' | 'grok-2-1212' | 'grok-2' | 'grok-2-latest' | 'grok-vision-beta' | 'grok-beta' | (string & {});
|
|
6
|
+
type XaiChatModelId = 'grok-4-1' | 'grok-4-1-fast-reasoning' | 'grok-4-1-fast-non-reasoning' | 'grok-4-fast-non-reasoning' | 'grok-4-fast-reasoning' | 'grok-4.20-0309-non-reasoning' | 'grok-4.20-0309-reasoning' | 'grok-4.20-multi-agent-0309' | 'grok-code-fast-1' | 'grok-4' | 'grok-4-0709' | 'grok-4-latest' | 'grok-3' | 'grok-3-latest' | 'grok-3-fast' | 'grok-3-fast-latest' | 'grok-3-mini' | 'grok-3-mini-latest' | 'grok-3-mini-fast' | 'grok-3-mini-fast-latest' | 'grok-2-vision-1212' | 'grok-2-vision' | 'grok-2-vision-latest' | 'grok-2-image-1212' | 'grok-2-image' | 'grok-2-image-latest' | 'grok-2-1212' | 'grok-2' | 'grok-2-latest' | 'grok-vision-beta' | 'grok-beta' | (string & {});
|
|
7
7
|
declare const xaiProviderOptions: z.ZodObject<{
|
|
8
8
|
reasoningEffort: z.ZodOptional<z.ZodEnum<{
|
|
9
9
|
low: "low";
|
|
@@ -56,7 +56,7 @@ declare const xaiErrorDataSchema: z.ZodObject<{
|
|
|
56
56
|
}, z.core.$strip>;
|
|
57
57
|
type XaiErrorData = z.infer<typeof xaiErrorDataSchema>;
|
|
58
58
|
|
|
59
|
-
type XaiResponsesModelId = 'grok-4-1' | 'grok-4-1-fast-reasoning' | 'grok-4-1-fast-non-reasoning' | 'grok-4' | 'grok-4-fast' | 'grok-4-fast-non-reasoning' | (string & {});
|
|
59
|
+
type XaiResponsesModelId = 'grok-4-1' | 'grok-4-1-fast-reasoning' | 'grok-4-1-fast-non-reasoning' | 'grok-4' | 'grok-4-fast' | 'grok-4-fast-non-reasoning' | 'grok-4-fast-reasoning' | 'grok-4.20-0309-non-reasoning' | 'grok-4.20-0309-reasoning' | 'grok-4.20-multi-agent-0309' | (string & {});
|
|
60
60
|
/**
|
|
61
61
|
* @see https://docs.x.ai/docs/api-reference#create-new-response
|
|
62
62
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ProviderV2, LanguageModelV2, ImageModelV2 } from '@ai-sdk/provider';
|
|
|
3
3
|
import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
|
|
4
4
|
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
5
5
|
|
|
6
|
-
type XaiChatModelId = 'grok-4-1' | 'grok-4-1-fast-reasoning' | 'grok-4-1-fast-non-reasoning' | 'grok-4-fast-non-reasoning' | 'grok-4-fast-reasoning' | 'grok-code-fast-1' | 'grok-4' | 'grok-4-0709' | 'grok-4-latest' | 'grok-3' | 'grok-3-latest' | 'grok-3-fast' | 'grok-3-fast-latest' | 'grok-3-mini' | 'grok-3-mini-latest' | 'grok-3-mini-fast' | 'grok-3-mini-fast-latest' | 'grok-2-vision-1212' | 'grok-2-vision' | 'grok-2-vision-latest' | 'grok-2-image-1212' | 'grok-2-image' | 'grok-2-image-latest' | 'grok-2-1212' | 'grok-2' | 'grok-2-latest' | 'grok-vision-beta' | 'grok-beta' | (string & {});
|
|
6
|
+
type XaiChatModelId = 'grok-4-1' | 'grok-4-1-fast-reasoning' | 'grok-4-1-fast-non-reasoning' | 'grok-4-fast-non-reasoning' | 'grok-4-fast-reasoning' | 'grok-4.20-0309-non-reasoning' | 'grok-4.20-0309-reasoning' | 'grok-4.20-multi-agent-0309' | 'grok-code-fast-1' | 'grok-4' | 'grok-4-0709' | 'grok-4-latest' | 'grok-3' | 'grok-3-latest' | 'grok-3-fast' | 'grok-3-fast-latest' | 'grok-3-mini' | 'grok-3-mini-latest' | 'grok-3-mini-fast' | 'grok-3-mini-fast-latest' | 'grok-2-vision-1212' | 'grok-2-vision' | 'grok-2-vision-latest' | 'grok-2-image-1212' | 'grok-2-image' | 'grok-2-image-latest' | 'grok-2-1212' | 'grok-2' | 'grok-2-latest' | 'grok-vision-beta' | 'grok-beta' | (string & {});
|
|
7
7
|
declare const xaiProviderOptions: z.ZodObject<{
|
|
8
8
|
reasoningEffort: z.ZodOptional<z.ZodEnum<{
|
|
9
9
|
low: "low";
|
|
@@ -56,7 +56,7 @@ declare const xaiErrorDataSchema: z.ZodObject<{
|
|
|
56
56
|
}, z.core.$strip>;
|
|
57
57
|
type XaiErrorData = z.infer<typeof xaiErrorDataSchema>;
|
|
58
58
|
|
|
59
|
-
type XaiResponsesModelId = 'grok-4-1' | 'grok-4-1-fast-reasoning' | 'grok-4-1-fast-non-reasoning' | 'grok-4' | 'grok-4-fast' | 'grok-4-fast-non-reasoning' | (string & {});
|
|
59
|
+
type XaiResponsesModelId = 'grok-4-1' | 'grok-4-1-fast-reasoning' | 'grok-4-1-fast-non-reasoning' | 'grok-4' | 'grok-4-fast' | 'grok-4-fast-non-reasoning' | 'grok-4-fast-reasoning' | 'grok-4.20-0309-non-reasoning' | 'grok-4.20-0309-reasoning' | 'grok-4.20-multi-agent-0309' | (string & {});
|
|
60
60
|
/**
|
|
61
61
|
* @see https://docs.x.ai/docs/api-reference#create-new-response
|
|
62
62
|
*/
|
package/dist/index.js
CHANGED
|
@@ -18,8 +18,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
20
|
// src/index.ts
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
23
|
VERSION: () => VERSION,
|
|
24
24
|
codeExecution: () => codeExecution,
|
|
25
25
|
createXai: () => createXai,
|
|
@@ -30,7 +30,7 @@ __export(src_exports, {
|
|
|
30
30
|
xai: () => xai,
|
|
31
31
|
xaiTools: () => xaiTools
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(index_exports);
|
|
34
34
|
|
|
35
35
|
// src/xai-provider.ts
|
|
36
36
|
var import_openai_compatible = require("@ai-sdk/openai-compatible");
|
|
@@ -2296,7 +2296,7 @@ var xaiTools = {
|
|
|
2296
2296
|
};
|
|
2297
2297
|
|
|
2298
2298
|
// src/version.ts
|
|
2299
|
-
var VERSION = true ? "2.0.
|
|
2299
|
+
var VERSION = true ? "2.0.63" : "0.0.0-test";
|
|
2300
2300
|
|
|
2301
2301
|
// src/xai-provider.ts
|
|
2302
2302
|
var xaiErrorStructure = {
|