@ai-sdk/xai 3.0.0-beta.44 → 3.0.0-beta.46

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,23 @@
1
1
  # @ai-sdk/xai
2
2
 
3
+ ## 3.0.0-beta.46
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [03849b0]
8
+ - @ai-sdk/provider-utils@4.0.0-beta.38
9
+ - @ai-sdk/openai-compatible@2.0.0-beta.39
10
+
11
+ ## 3.0.0-beta.45
12
+
13
+ ### Patch Changes
14
+
15
+ - 457318b: chore(provider,ai): switch to SharedV3Warning and unified warnings
16
+ - Updated dependencies [457318b]
17
+ - @ai-sdk/openai-compatible@2.0.0-beta.38
18
+ - @ai-sdk/provider@3.0.0-beta.20
19
+ - @ai-sdk/provider-utils@4.0.0-beta.37
20
+
3
21
  ## 3.0.0-beta.44
4
22
 
5
23
  ### Patch Changes
package/dist/index.js CHANGED
@@ -292,7 +292,10 @@ function prepareTools({
292
292
  const xaiTools2 = [];
293
293
  for (const tool of tools) {
294
294
  if (tool.type === "provider-defined") {
295
- toolWarnings.push({ type: "unsupported-tool", tool });
295
+ toolWarnings.push({
296
+ type: "unsupported",
297
+ feature: `provider-defined tool ${tool.name}`
298
+ });
296
299
  } else {
297
300
  xaiTools2.push({
298
301
  type: "function",
@@ -368,28 +371,16 @@ var XaiChatLanguageModel = class {
368
371
  schema: xaiProviderOptions
369
372
  })) != null ? _a : {};
370
373
  if (topK != null) {
371
- warnings.push({
372
- type: "unsupported-setting",
373
- setting: "topK"
374
- });
374
+ warnings.push({ type: "unsupported", feature: "topK" });
375
375
  }
376
376
  if (frequencyPenalty != null) {
377
- warnings.push({
378
- type: "unsupported-setting",
379
- setting: "frequencyPenalty"
380
- });
377
+ warnings.push({ type: "unsupported", feature: "frequencyPenalty" });
381
378
  }
382
379
  if (presencePenalty != null) {
383
- warnings.push({
384
- type: "unsupported-setting",
385
- setting: "presencePenalty"
386
- });
380
+ warnings.push({ type: "unsupported", feature: "presencePenalty" });
387
381
  }
388
382
  if (stopSequences != null) {
389
- warnings.push({
390
- type: "unsupported-setting",
391
- setting: "stopSequences"
392
- });
383
+ warnings.push({ type: "unsupported", feature: "stopSequences" });
393
384
  }
394
385
  const { messages, warnings: messageWarnings } = convertToXaiChatMessages(prompt);
395
386
  warnings.push(...messageWarnings);
@@ -1373,7 +1364,10 @@ async function prepareResponsesTools({
1373
1364
  break;
1374
1365
  }
1375
1366
  default: {
1376
- toolWarnings.push({ type: "unsupported-tool", tool });
1367
+ toolWarnings.push({
1368
+ type: "unsupported",
1369
+ feature: `provider-defined tool ${tool.name}`
1370
+ });
1377
1371
  break;
1378
1372
  }
1379
1373
  }
@@ -1452,7 +1446,10 @@ async function prepareResponsesTools({
1452
1446
  toolWarnings
1453
1447
  };
1454
1448
  default:
1455
- toolWarnings.push({ type: "unsupported-tool", tool: selectedTool });
1449
+ toolWarnings.push({
1450
+ type: "unsupported",
1451
+ feature: `provider-defined tool ${selectedTool.name}`
1452
+ });
1456
1453
  return { tools: xaiTools2, toolChoice: void 0, toolWarnings };
1457
1454
  }
1458
1455
  }
@@ -1503,10 +1500,7 @@ var XaiResponsesLanguageModel = class {
1503
1500
  schema: xaiResponsesProviderOptions
1504
1501
  })) != null ? _a : {};
1505
1502
  if (stopSequences != null) {
1506
- warnings.push({
1507
- type: "unsupported-setting",
1508
- setting: "stopSequences"
1509
- });
1503
+ warnings.push({ type: "unsupported", feature: "stopSequences" });
1510
1504
  }
1511
1505
  const webSearchToolName = (_b = tools == null ? void 0 : tools.find(
1512
1506
  (tool) => tool.type === "provider-defined" && tool.id === "xai.web_search"
@@ -1999,7 +1993,7 @@ var xaiTools = {
1999
1993
  };
2000
1994
 
2001
1995
  // src/version.ts
2002
- var VERSION = true ? "3.0.0-beta.44" : "0.0.0-test";
1996
+ var VERSION = true ? "3.0.0-beta.46" : "0.0.0-test";
2003
1997
 
2004
1998
  // src/xai-provider.ts
2005
1999
  var xaiErrorStructure = {