ai 6.0.324 → 6.0.325
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 +9 -0
- package/dist/index.js +25 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -21
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.mjs +1 -1
- package/docs/03-ai-sdk-core/16-mcp-tools.mdx +6 -1
- package/docs/07-reference/01-ai-sdk-core/23-create-mcp-client.mdx +1 -1
- package/package.json +5 -5
- package/src/generate-object/generate-object.ts +6 -6
- package/src/generate-object/stream-object.ts +6 -4
- package/src/generate-text/generate-text.ts +7 -6
- package/src/generate-text/stream-text.ts +7 -6
package/dist/index.mjs
CHANGED
|
@@ -1225,7 +1225,7 @@ import {
|
|
|
1225
1225
|
} from "@ai-sdk/provider-utils";
|
|
1226
1226
|
|
|
1227
1227
|
// src/version.ts
|
|
1228
|
-
var VERSION = true ? "6.0.
|
|
1228
|
+
var VERSION = true ? "6.0.325" : "0.0.0-test";
|
|
1229
1229
|
|
|
1230
1230
|
// src/util/download/download.ts
|
|
1231
1231
|
var download = async ({
|
|
@@ -4936,9 +4936,9 @@ async function generateText({
|
|
|
4936
4936
|
"ai.response.id": responseData.id,
|
|
4937
4937
|
"ai.response.model": responseData.modelId,
|
|
4938
4938
|
"ai.response.timestamp": responseData.timestamp.toISOString(),
|
|
4939
|
-
"ai.response.providerMetadata":
|
|
4940
|
-
result.providerMetadata
|
|
4941
|
-
|
|
4939
|
+
"ai.response.providerMetadata": {
|
|
4940
|
+
output: () => JSON.stringify(result.providerMetadata)
|
|
4941
|
+
},
|
|
4942
4942
|
"ai.usage.inputTokens": result.usage.inputTokens.total,
|
|
4943
4943
|
"ai.usage.inputTokenDetails.noCacheTokens": result.usage.inputTokens.noCache,
|
|
4944
4944
|
"ai.usage.inputTokenDetails.cacheReadTokens": result.usage.inputTokens.cacheRead,
|
|
@@ -5179,9 +5179,9 @@ async function generateText({
|
|
|
5179
5179
|
return toolCalls == null ? void 0 : JSON.stringify(toolCalls);
|
|
5180
5180
|
}
|
|
5181
5181
|
},
|
|
5182
|
-
"ai.response.providerMetadata":
|
|
5183
|
-
currentModelResponse.providerMetadata
|
|
5184
|
-
|
|
5182
|
+
"ai.response.providerMetadata": {
|
|
5183
|
+
output: () => JSON.stringify(currentModelResponse.providerMetadata)
|
|
5184
|
+
}
|
|
5185
5185
|
}
|
|
5186
5186
|
})
|
|
5187
5187
|
);
|
|
@@ -7928,9 +7928,9 @@ var DefaultStreamTextResult = class {
|
|
|
7928
7928
|
return ((_a24 = finalStep.toolCalls) == null ? void 0 : _a24.length) ? JSON.stringify(finalStep.toolCalls) : void 0;
|
|
7929
7929
|
}
|
|
7930
7930
|
},
|
|
7931
|
-
"ai.response.providerMetadata":
|
|
7932
|
-
finalStep.providerMetadata
|
|
7933
|
-
|
|
7931
|
+
"ai.response.providerMetadata": {
|
|
7932
|
+
output: () => JSON.stringify(finalStep.providerMetadata)
|
|
7933
|
+
},
|
|
7934
7934
|
"ai.usage.inputTokens": totalUsage.inputTokens,
|
|
7935
7935
|
"ai.usage.inputTokenDetails.noCacheTokens": (_a23 = totalUsage.inputTokenDetails) == null ? void 0 : _a23.noCacheTokens,
|
|
7936
7936
|
"ai.usage.inputTokenDetails.cacheReadTokens": (_b = totalUsage.inputTokenDetails) == null ? void 0 : _b.cacheReadTokens,
|
|
@@ -8698,9 +8698,9 @@ var DefaultStreamTextResult = class {
|
|
|
8698
8698
|
"ai.response.reasoning": {
|
|
8699
8699
|
output: () => processedStep.reasoningText
|
|
8700
8700
|
},
|
|
8701
|
-
"ai.response.providerMetadata":
|
|
8702
|
-
processedStep.providerMetadata
|
|
8703
|
-
|
|
8701
|
+
"ai.response.providerMetadata": {
|
|
8702
|
+
output: () => JSON.stringify(processedStep.providerMetadata)
|
|
8703
|
+
}
|
|
8704
8704
|
}
|
|
8705
8705
|
})
|
|
8706
8706
|
);
|
|
@@ -11852,9 +11852,9 @@ async function generateObject(options) {
|
|
|
11852
11852
|
"ai.response.id": responseData.id,
|
|
11853
11853
|
"ai.response.model": responseData.modelId,
|
|
11854
11854
|
"ai.response.timestamp": responseData.timestamp.toISOString(),
|
|
11855
|
-
"ai.response.providerMetadata":
|
|
11856
|
-
result2.providerMetadata
|
|
11857
|
-
|
|
11855
|
+
"ai.response.providerMetadata": {
|
|
11856
|
+
output: () => JSON.stringify(result2.providerMetadata)
|
|
11857
|
+
},
|
|
11858
11858
|
// TODO rename telemetry attributes to inputTokens and outputTokens
|
|
11859
11859
|
"ai.usage.promptTokens": result2.usage.inputTokens.total,
|
|
11860
11860
|
"ai.usage.completionTokens": result2.usage.outputTokens.total,
|
|
@@ -11909,9 +11909,9 @@ async function generateObject(options) {
|
|
|
11909
11909
|
"ai.response.object": {
|
|
11910
11910
|
output: () => JSON.stringify(object2)
|
|
11911
11911
|
},
|
|
11912
|
-
"ai.response.providerMetadata":
|
|
11913
|
-
resultProviderMetadata
|
|
11914
|
-
|
|
11912
|
+
"ai.response.providerMetadata": {
|
|
11913
|
+
output: () => JSON.stringify(resultProviderMetadata)
|
|
11914
|
+
},
|
|
11915
11915
|
// TODO rename telemetry attributes to inputTokens and outputTokens
|
|
11916
11916
|
"ai.usage.promptTokens": usage.inputTokens,
|
|
11917
11917
|
"ai.usage.completionTokens": usage.outputTokens
|
|
@@ -12478,7 +12478,9 @@ var DefaultStreamObjectResult = class {
|
|
|
12478
12478
|
"ai.response.id": fullResponse.id,
|
|
12479
12479
|
"ai.response.model": fullResponse.modelId,
|
|
12480
12480
|
"ai.response.timestamp": fullResponse.timestamp.toISOString(),
|
|
12481
|
-
"ai.response.providerMetadata":
|
|
12481
|
+
"ai.response.providerMetadata": {
|
|
12482
|
+
output: () => JSON.stringify(providerMetadata)
|
|
12483
|
+
},
|
|
12482
12484
|
"ai.usage.inputTokens": finalUsage.inputTokens,
|
|
12483
12485
|
"ai.usage.outputTokens": finalUsage.outputTokens,
|
|
12484
12486
|
"ai.usage.totalTokens": finalUsage.totalTokens,
|
|
@@ -12506,7 +12508,9 @@ var DefaultStreamObjectResult = class {
|
|
|
12506
12508
|
"ai.response.object": {
|
|
12507
12509
|
output: () => JSON.stringify(object2)
|
|
12508
12510
|
},
|
|
12509
|
-
"ai.response.providerMetadata":
|
|
12511
|
+
"ai.response.providerMetadata": {
|
|
12512
|
+
output: () => JSON.stringify(providerMetadata)
|
|
12513
|
+
}
|
|
12510
12514
|
}
|
|
12511
12515
|
})
|
|
12512
12516
|
);
|