@ai-sdk/xai 3.0.126 → 3.0.128
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 +15 -0
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/responses/xai-responses-api.ts +21 -17
- package/src/xai-chat-language-model.ts +27 -22
package/dist/index.mjs
CHANGED
|
@@ -872,19 +872,20 @@ var xaiUsageSchema = z4.object({
|
|
|
872
872
|
prompt_tokens: z4.number(),
|
|
873
873
|
completion_tokens: z4.number(),
|
|
874
874
|
total_tokens: z4.number(),
|
|
875
|
+
cost_in_usd_ticks: z4.number().nullish(),
|
|
875
876
|
prompt_tokens_details: z4.object({
|
|
876
877
|
text_tokens: z4.number().nullish(),
|
|
877
878
|
audio_tokens: z4.number().nullish(),
|
|
878
879
|
image_tokens: z4.number().nullish(),
|
|
879
880
|
cached_tokens: z4.number().nullish()
|
|
880
|
-
}).nullish(),
|
|
881
|
+
}).catchall(z4.json()).nullish(),
|
|
881
882
|
completion_tokens_details: z4.object({
|
|
882
883
|
reasoning_tokens: z4.number().nullish(),
|
|
883
884
|
audio_tokens: z4.number().nullish(),
|
|
884
885
|
accepted_prediction_tokens: z4.number().nullish(),
|
|
885
886
|
rejected_prediction_tokens: z4.number().nullish()
|
|
886
|
-
}).nullish()
|
|
887
|
-
});
|
|
887
|
+
}).catchall(z4.json()).nullish()
|
|
888
|
+
}).catchall(z4.json());
|
|
888
889
|
var xaiChatResponseSchema = z4.object({
|
|
889
890
|
id: z4.string().nullish(),
|
|
890
891
|
created: z4.number().nullish(),
|
|
@@ -1521,13 +1522,13 @@ var xaiResponsesUsageSchema = z7.object({
|
|
|
1521
1522
|
total_tokens: z7.number().optional(),
|
|
1522
1523
|
input_tokens_details: z7.object({
|
|
1523
1524
|
cached_tokens: z7.number().optional()
|
|
1524
|
-
}).optional(),
|
|
1525
|
+
}).catchall(z7.json()).optional(),
|
|
1525
1526
|
output_tokens_details: z7.object({
|
|
1526
1527
|
reasoning_tokens: z7.number().optional()
|
|
1527
|
-
}).optional(),
|
|
1528
|
+
}).catchall(z7.json()).optional(),
|
|
1528
1529
|
num_sources_used: z7.number().optional(),
|
|
1529
1530
|
num_server_side_tools_used: z7.number().optional()
|
|
1530
|
-
});
|
|
1531
|
+
}).catchall(z7.json());
|
|
1531
1532
|
var xaiResponsesResponseSchema = z7.object({
|
|
1532
1533
|
id: z7.string().nullish(),
|
|
1533
1534
|
created_at: z7.number().nullish(),
|
|
@@ -2994,7 +2995,7 @@ var xaiTools = {
|
|
|
2994
2995
|
};
|
|
2995
2996
|
|
|
2996
2997
|
// src/version.ts
|
|
2997
|
-
var VERSION = true ? "3.0.
|
|
2998
|
+
var VERSION = true ? "3.0.128" : "0.0.0-test";
|
|
2998
2999
|
|
|
2999
3000
|
// src/xai-video-model.ts
|
|
3000
3001
|
import {
|