@ai-sdk/xai 2.0.62 → 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 +10 -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 +1 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
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
|
+
|
|
3
9
|
## 2.0.62
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -458,7 +464,7 @@
|
|
|
458
464
|
|
|
459
465
|
```js
|
|
460
466
|
await generateImage({
|
|
461
|
-
model: luma.image(
|
|
467
|
+
model: luma.image("photon-flash-1", {
|
|
462
468
|
maxImagesPerCall: 5,
|
|
463
469
|
pollIntervalMillis: 500,
|
|
464
470
|
}),
|
|
@@ -471,7 +477,7 @@
|
|
|
471
477
|
|
|
472
478
|
```js
|
|
473
479
|
await generateImage({
|
|
474
|
-
model: luma.image(
|
|
480
|
+
model: luma.image("photon-flash-1"),
|
|
475
481
|
prompt,
|
|
476
482
|
n: 10,
|
|
477
483
|
maxImagesPerCall: 5,
|
|
@@ -924,7 +930,7 @@
|
|
|
924
930
|
|
|
925
931
|
```js
|
|
926
932
|
await generateImage({
|
|
927
|
-
model: luma.image(
|
|
933
|
+
model: luma.image("photon-flash-1", {
|
|
928
934
|
maxImagesPerCall: 5,
|
|
929
935
|
pollIntervalMillis: 500,
|
|
930
936
|
}),
|
|
@@ -937,7 +943,7 @@
|
|
|
937
943
|
|
|
938
944
|
```js
|
|
939
945
|
await generateImage({
|
|
940
|
-
model: luma.image(
|
|
946
|
+
model: luma.image("photon-flash-1"),
|
|
941
947
|
prompt,
|
|
942
948
|
n: 10,
|
|
943
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 = {
|