@ai-sdk/xai 3.0.37 → 3.0.38
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 +6 -0
- package/dist/index.d.mts +14 -14
- package/dist/index.d.ts +14 -14
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/docs/01-xai.mdx +70 -31
- package/package.json +1 -1
- package/src/xai-provider.ts +14 -14
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -254,31 +254,31 @@ declare const xaiTools: {
|
|
|
254
254
|
|
|
255
255
|
interface XaiProvider extends ProviderV3 {
|
|
256
256
|
/**
|
|
257
|
-
|
|
257
|
+
* Creates an Xai chat model for text generation.
|
|
258
258
|
*/
|
|
259
259
|
(modelId: XaiChatModelId): LanguageModelV3;
|
|
260
260
|
/**
|
|
261
|
-
|
|
261
|
+
* Creates an Xai language model for text generation.
|
|
262
262
|
*/
|
|
263
263
|
languageModel(modelId: XaiChatModelId): LanguageModelV3;
|
|
264
264
|
/**
|
|
265
|
-
|
|
265
|
+
* Creates an Xai chat model for text generation.
|
|
266
266
|
*/
|
|
267
267
|
chat: (modelId: XaiChatModelId) => LanguageModelV3;
|
|
268
268
|
/**
|
|
269
|
-
|
|
269
|
+
* Creates an Xai responses model for agentic tool calling.
|
|
270
270
|
*/
|
|
271
271
|
responses: (modelId: XaiResponsesModelId) => LanguageModelV3;
|
|
272
272
|
/**
|
|
273
|
-
|
|
273
|
+
* Creates an Xai image model for image generation.
|
|
274
274
|
*/
|
|
275
275
|
image(modelId: XaiImageModelId): ImageModelV3;
|
|
276
276
|
/**
|
|
277
|
-
|
|
277
|
+
* Creates an Xai image model for image generation.
|
|
278
278
|
*/
|
|
279
279
|
imageModel(modelId: XaiImageModelId): ImageModelV3;
|
|
280
280
|
/**
|
|
281
|
-
|
|
281
|
+
* Server-side agentic tools for use with the responses API.
|
|
282
282
|
*/
|
|
283
283
|
tools: typeof xaiTools;
|
|
284
284
|
/**
|
|
@@ -288,21 +288,21 @@ interface XaiProvider extends ProviderV3 {
|
|
|
288
288
|
}
|
|
289
289
|
interface XaiProviderSettings {
|
|
290
290
|
/**
|
|
291
|
-
|
|
292
|
-
|
|
291
|
+
* Base URL for the xAI API calls.
|
|
292
|
+
*/
|
|
293
293
|
baseURL?: string;
|
|
294
294
|
/**
|
|
295
|
-
|
|
295
|
+
* API key for authenticating requests.
|
|
296
296
|
*/
|
|
297
297
|
apiKey?: string;
|
|
298
298
|
/**
|
|
299
|
-
|
|
299
|
+
* Custom headers to include in the requests.
|
|
300
300
|
*/
|
|
301
301
|
headers?: Record<string, string>;
|
|
302
302
|
/**
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
303
|
+
* Custom fetch implementation. You can use it as a middleware to intercept requests,
|
|
304
|
+
* or to provide a custom fetch implementation for e.g. testing.
|
|
305
|
+
*/
|
|
306
306
|
fetch?: FetchFunction;
|
|
307
307
|
}
|
|
308
308
|
declare function createXai(options?: XaiProviderSettings): XaiProvider;
|
package/dist/index.d.ts
CHANGED
|
@@ -254,31 +254,31 @@ declare const xaiTools: {
|
|
|
254
254
|
|
|
255
255
|
interface XaiProvider extends ProviderV3 {
|
|
256
256
|
/**
|
|
257
|
-
|
|
257
|
+
* Creates an Xai chat model for text generation.
|
|
258
258
|
*/
|
|
259
259
|
(modelId: XaiChatModelId): LanguageModelV3;
|
|
260
260
|
/**
|
|
261
|
-
|
|
261
|
+
* Creates an Xai language model for text generation.
|
|
262
262
|
*/
|
|
263
263
|
languageModel(modelId: XaiChatModelId): LanguageModelV3;
|
|
264
264
|
/**
|
|
265
|
-
|
|
265
|
+
* Creates an Xai chat model for text generation.
|
|
266
266
|
*/
|
|
267
267
|
chat: (modelId: XaiChatModelId) => LanguageModelV3;
|
|
268
268
|
/**
|
|
269
|
-
|
|
269
|
+
* Creates an Xai responses model for agentic tool calling.
|
|
270
270
|
*/
|
|
271
271
|
responses: (modelId: XaiResponsesModelId) => LanguageModelV3;
|
|
272
272
|
/**
|
|
273
|
-
|
|
273
|
+
* Creates an Xai image model for image generation.
|
|
274
274
|
*/
|
|
275
275
|
image(modelId: XaiImageModelId): ImageModelV3;
|
|
276
276
|
/**
|
|
277
|
-
|
|
277
|
+
* Creates an Xai image model for image generation.
|
|
278
278
|
*/
|
|
279
279
|
imageModel(modelId: XaiImageModelId): ImageModelV3;
|
|
280
280
|
/**
|
|
281
|
-
|
|
281
|
+
* Server-side agentic tools for use with the responses API.
|
|
282
282
|
*/
|
|
283
283
|
tools: typeof xaiTools;
|
|
284
284
|
/**
|
|
@@ -288,21 +288,21 @@ interface XaiProvider extends ProviderV3 {
|
|
|
288
288
|
}
|
|
289
289
|
interface XaiProviderSettings {
|
|
290
290
|
/**
|
|
291
|
-
|
|
292
|
-
|
|
291
|
+
* Base URL for the xAI API calls.
|
|
292
|
+
*/
|
|
293
293
|
baseURL?: string;
|
|
294
294
|
/**
|
|
295
|
-
|
|
295
|
+
* API key for authenticating requests.
|
|
296
296
|
*/
|
|
297
297
|
apiKey?: string;
|
|
298
298
|
/**
|
|
299
|
-
|
|
299
|
+
* Custom headers to include in the requests.
|
|
300
300
|
*/
|
|
301
301
|
headers?: Record<string, string>;
|
|
302
302
|
/**
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
303
|
+
* Custom fetch implementation. You can use it as a middleware to intercept requests,
|
|
304
|
+
* or to provide a custom fetch implementation for e.g. testing.
|
|
305
|
+
*/
|
|
306
306
|
fetch?: FetchFunction;
|
|
307
307
|
}
|
|
308
308
|
declare function createXai(options?: XaiProviderSettings): XaiProvider;
|
package/dist/index.js
CHANGED