ai 6.0.333 → 6.0.336

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,37 @@
1
1
  # ai
2
2
 
3
+ ## 6.0.336
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [b2e515b]
8
+ - @ai-sdk/gateway@3.0.241
9
+
10
+ ## 6.0.335
11
+
12
+ ### Patch Changes
13
+
14
+ - a6d5850: fix(ai): redact Google MCP server credentials in telemetry tool definitions
15
+
16
+ `google.mcp_server` provider tool definitions accept headers such as
17
+ `Authorization` for the Interactions MCP connector. Telemetry redaction only
18
+ recognized OpenAI tool ids, so those reusable credentials were recorded in the
19
+ `ai.prompt.tools` span attribute of `generateText` and `streamText`. Telemetry
20
+ previews now redact every `google.mcp_server` header value. The tool arguments
21
+ sent to the provider and used by the application are unchanged.
22
+
23
+ - Updated dependencies [eec7bd8]
24
+ - Updated dependencies [8a9bcc8]
25
+ - Updated dependencies [e1a5663]
26
+ - @ai-sdk/gateway@3.0.240
27
+
28
+ ## 6.0.334
29
+
30
+ ### Patch Changes
31
+
32
+ - Updated dependencies [4acbcc9]
33
+ - @ai-sdk/gateway@3.0.239
34
+
3
35
  ## 6.0.333
4
36
 
5
37
  ### 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.333" : "0.0.0-test";
1338
+ var VERSION = true ? "6.0.336" : "0.0.0-test";
1339
1339
 
1340
1340
  // src/util/download/download.ts
1341
1341
  var download = async ({
@@ -2701,6 +2701,19 @@ function redactToolDefinition(tool2) {
2701
2701
  }
2702
2702
  };
2703
2703
  }
2704
+ if (tool2.id === "google.mcp_server") {
2705
+ if (!isRecord(args.headers))
2706
+ return tool2;
2707
+ return {
2708
+ ...tool2,
2709
+ args: {
2710
+ ...args,
2711
+ headers: Object.fromEntries(
2712
+ Object.keys(args.headers).map((name23) => [name23, "[redacted]"])
2713
+ )
2714
+ }
2715
+ };
2716
+ }
2704
2717
  const containerKey = tool2.id === "openai.code_interpreter" ? "container" : tool2.id === "openai.shell" ? "environment" : void 0;
2705
2718
  if (containerKey == null)
2706
2719
  return tool2;