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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# ai
|
|
2
2
|
|
|
3
|
+
## 6.0.325
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4ac871e: hide provider metadata from telemetry when recordOutputs is false
|
|
8
|
+
- Updated dependencies [f0dee4b]
|
|
9
|
+
- @ai-sdk/provider-utils@4.0.65
|
|
10
|
+
- @ai-sdk/gateway@3.0.231
|
|
11
|
+
|
|
3
12
|
## 6.0.324
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1335,7 +1335,7 @@ function detectMediaType({
|
|
|
1335
1335
|
var import_provider_utils3 = require("@ai-sdk/provider-utils");
|
|
1336
1336
|
|
|
1337
1337
|
// src/version.ts
|
|
1338
|
-
var VERSION = true ? "6.0.
|
|
1338
|
+
var VERSION = true ? "6.0.325" : "0.0.0-test";
|
|
1339
1339
|
|
|
1340
1340
|
// src/util/download/download.ts
|
|
1341
1341
|
var download = async ({
|
|
@@ -5014,9 +5014,9 @@ async function generateText({
|
|
|
5014
5014
|
"ai.response.id": responseData.id,
|
|
5015
5015
|
"ai.response.model": responseData.modelId,
|
|
5016
5016
|
"ai.response.timestamp": responseData.timestamp.toISOString(),
|
|
5017
|
-
"ai.response.providerMetadata":
|
|
5018
|
-
result.providerMetadata
|
|
5019
|
-
|
|
5017
|
+
"ai.response.providerMetadata": {
|
|
5018
|
+
output: () => JSON.stringify(result.providerMetadata)
|
|
5019
|
+
},
|
|
5020
5020
|
"ai.usage.inputTokens": result.usage.inputTokens.total,
|
|
5021
5021
|
"ai.usage.inputTokenDetails.noCacheTokens": result.usage.inputTokens.noCache,
|
|
5022
5022
|
"ai.usage.inputTokenDetails.cacheReadTokens": result.usage.inputTokens.cacheRead,
|
|
@@ -5257,9 +5257,9 @@ async function generateText({
|
|
|
5257
5257
|
return toolCalls == null ? void 0 : JSON.stringify(toolCalls);
|
|
5258
5258
|
}
|
|
5259
5259
|
},
|
|
5260
|
-
"ai.response.providerMetadata":
|
|
5261
|
-
currentModelResponse.providerMetadata
|
|
5262
|
-
|
|
5260
|
+
"ai.response.providerMetadata": {
|
|
5261
|
+
output: () => JSON.stringify(currentModelResponse.providerMetadata)
|
|
5262
|
+
}
|
|
5263
5263
|
}
|
|
5264
5264
|
})
|
|
5265
5265
|
);
|
|
@@ -7997,9 +7997,9 @@ var DefaultStreamTextResult = class {
|
|
|
7997
7997
|
return ((_a24 = finalStep.toolCalls) == null ? void 0 : _a24.length) ? JSON.stringify(finalStep.toolCalls) : void 0;
|
|
7998
7998
|
}
|
|
7999
7999
|
},
|
|
8000
|
-
"ai.response.providerMetadata":
|
|
8001
|
-
finalStep.providerMetadata
|
|
8002
|
-
|
|
8000
|
+
"ai.response.providerMetadata": {
|
|
8001
|
+
output: () => JSON.stringify(finalStep.providerMetadata)
|
|
8002
|
+
},
|
|
8003
8003
|
"ai.usage.inputTokens": totalUsage.inputTokens,
|
|
8004
8004
|
"ai.usage.inputTokenDetails.noCacheTokens": (_a23 = totalUsage.inputTokenDetails) == null ? void 0 : _a23.noCacheTokens,
|
|
8005
8005
|
"ai.usage.inputTokenDetails.cacheReadTokens": (_b = totalUsage.inputTokenDetails) == null ? void 0 : _b.cacheReadTokens,
|
|
@@ -8767,9 +8767,9 @@ var DefaultStreamTextResult = class {
|
|
|
8767
8767
|
"ai.response.reasoning": {
|
|
8768
8768
|
output: () => processedStep.reasoningText
|
|
8769
8769
|
},
|
|
8770
|
-
"ai.response.providerMetadata":
|
|
8771
|
-
processedStep.providerMetadata
|
|
8772
|
-
|
|
8770
|
+
"ai.response.providerMetadata": {
|
|
8771
|
+
output: () => JSON.stringify(processedStep.providerMetadata)
|
|
8772
|
+
}
|
|
8773
8773
|
}
|
|
8774
8774
|
})
|
|
8775
8775
|
);
|
|
@@ -11890,9 +11890,9 @@ async function generateObject(options) {
|
|
|
11890
11890
|
"ai.response.id": responseData.id,
|
|
11891
11891
|
"ai.response.model": responseData.modelId,
|
|
11892
11892
|
"ai.response.timestamp": responseData.timestamp.toISOString(),
|
|
11893
|
-
"ai.response.providerMetadata":
|
|
11894
|
-
result2.providerMetadata
|
|
11895
|
-
|
|
11893
|
+
"ai.response.providerMetadata": {
|
|
11894
|
+
output: () => JSON.stringify(result2.providerMetadata)
|
|
11895
|
+
},
|
|
11896
11896
|
// TODO rename telemetry attributes to inputTokens and outputTokens
|
|
11897
11897
|
"ai.usage.promptTokens": result2.usage.inputTokens.total,
|
|
11898
11898
|
"ai.usage.completionTokens": result2.usage.outputTokens.total,
|
|
@@ -11947,9 +11947,9 @@ async function generateObject(options) {
|
|
|
11947
11947
|
"ai.response.object": {
|
|
11948
11948
|
output: () => JSON.stringify(object2)
|
|
11949
11949
|
},
|
|
11950
|
-
"ai.response.providerMetadata":
|
|
11951
|
-
resultProviderMetadata
|
|
11952
|
-
|
|
11950
|
+
"ai.response.providerMetadata": {
|
|
11951
|
+
output: () => JSON.stringify(resultProviderMetadata)
|
|
11952
|
+
},
|
|
11953
11953
|
// TODO rename telemetry attributes to inputTokens and outputTokens
|
|
11954
11954
|
"ai.usage.promptTokens": usage.inputTokens,
|
|
11955
11955
|
"ai.usage.completionTokens": usage.outputTokens
|
|
@@ -12513,7 +12513,9 @@ var DefaultStreamObjectResult = class {
|
|
|
12513
12513
|
"ai.response.id": fullResponse.id,
|
|
12514
12514
|
"ai.response.model": fullResponse.modelId,
|
|
12515
12515
|
"ai.response.timestamp": fullResponse.timestamp.toISOString(),
|
|
12516
|
-
"ai.response.providerMetadata":
|
|
12516
|
+
"ai.response.providerMetadata": {
|
|
12517
|
+
output: () => JSON.stringify(providerMetadata)
|
|
12518
|
+
},
|
|
12517
12519
|
"ai.usage.inputTokens": finalUsage.inputTokens,
|
|
12518
12520
|
"ai.usage.outputTokens": finalUsage.outputTokens,
|
|
12519
12521
|
"ai.usage.totalTokens": finalUsage.totalTokens,
|
|
@@ -12541,7 +12543,9 @@ var DefaultStreamObjectResult = class {
|
|
|
12541
12543
|
"ai.response.object": {
|
|
12542
12544
|
output: () => JSON.stringify(object2)
|
|
12543
12545
|
},
|
|
12544
|
-
"ai.response.providerMetadata":
|
|
12546
|
+
"ai.response.providerMetadata": {
|
|
12547
|
+
output: () => JSON.stringify(providerMetadata)
|
|
12548
|
+
}
|
|
12545
12549
|
}
|
|
12546
12550
|
})
|
|
12547
12551
|
);
|