ai 3.2.40 → 3.2.41

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/dist/index.d.mts CHANGED
@@ -19,6 +19,20 @@ type TelemetrySettings = {
19
19
  * Enable or disable telemetry. Disabled by default while experimental.
20
20
  */
21
21
  isEnabled?: boolean;
22
+ /**
23
+ * Enable or disable input recording. Enabled by default.
24
+ *
25
+ * You might want to disable input recording to avoid recording sensitive
26
+ * information, to reduce data transfers, or to increase performance.
27
+ */
28
+ recordInputs?: boolean;
29
+ /**
30
+ * Enable or disable output recording. Enabled by default.
31
+ *
32
+ * You might want to disable output recording to avoid recording sensitive
33
+ * information, to reduce data transfers, or to increase performance.
34
+ */
35
+ recordOutputs?: boolean;
22
36
  /**
23
37
  * Identifier for this function. Used to group telemetry data by function.
24
38
  */
@@ -856,7 +870,7 @@ declare class DefaultStreamObjectResult<T> implements StreamObjectResult<T> {
856
870
  readonly warnings: StreamObjectResult<T>['warnings'];
857
871
  readonly usage: StreamObjectResult<T>['usage'];
858
872
  readonly rawResponse: StreamObjectResult<T>['rawResponse'];
859
- constructor({ stream, warnings, rawResponse, schema, onFinish, rootSpan, doStreamSpan, }: {
873
+ constructor({ stream, warnings, rawResponse, schema, onFinish, rootSpan, doStreamSpan, telemetry, }: {
860
874
  stream: ReadableStream<string | Omit<LanguageModelV1StreamPart, 'text-delta'>>;
861
875
  warnings: StreamObjectResult<T>['warnings'];
862
876
  rawResponse?: StreamObjectResult<T>['rawResponse'];
@@ -864,6 +878,7 @@ declare class DefaultStreamObjectResult<T> implements StreamObjectResult<T> {
864
878
  onFinish: Parameters<typeof streamObject<T>>[0]['onFinish'];
865
879
  rootSpan: Span;
866
880
  doStreamSpan: Span;
881
+ telemetry: TelemetrySettings | undefined;
867
882
  });
868
883
  get object(): Promise<T>;
869
884
  get partialObjectStream(): AsyncIterableStream<DeepPartial<T>>;
@@ -1505,13 +1520,14 @@ declare class DefaultStreamTextResult<TOOLS extends Record<string, CoreTool>> im
1505
1520
  readonly toolCalls: StreamTextResult<TOOLS>['toolCalls'];
1506
1521
  readonly toolResults: StreamTextResult<TOOLS>['toolResults'];
1507
1522
  readonly rawResponse: StreamTextResult<TOOLS>['rawResponse'];
1508
- constructor({ stream, warnings, rawResponse, onFinish, rootSpan, doStreamSpan, }: {
1523
+ constructor({ stream, warnings, rawResponse, onFinish, rootSpan, doStreamSpan, telemetry, }: {
1509
1524
  stream: ReadableStream<TextStreamPart<TOOLS>>;
1510
1525
  warnings: StreamTextResult<TOOLS>['warnings'];
1511
1526
  rawResponse: StreamTextResult<TOOLS>['rawResponse'];
1512
1527
  onFinish?: Parameters<typeof streamText>[0]['onFinish'];
1513
1528
  rootSpan: Span;
1514
1529
  doStreamSpan: Span;
1530
+ telemetry: TelemetrySettings | undefined;
1515
1531
  });
1516
1532
  /**
1517
1533
  Split out a new stream from the original stream.
package/dist/index.d.ts CHANGED
@@ -19,6 +19,20 @@ type TelemetrySettings = {
19
19
  * Enable or disable telemetry. Disabled by default while experimental.
20
20
  */
21
21
  isEnabled?: boolean;
22
+ /**
23
+ * Enable or disable input recording. Enabled by default.
24
+ *
25
+ * You might want to disable input recording to avoid recording sensitive
26
+ * information, to reduce data transfers, or to increase performance.
27
+ */
28
+ recordInputs?: boolean;
29
+ /**
30
+ * Enable or disable output recording. Enabled by default.
31
+ *
32
+ * You might want to disable output recording to avoid recording sensitive
33
+ * information, to reduce data transfers, or to increase performance.
34
+ */
35
+ recordOutputs?: boolean;
22
36
  /**
23
37
  * Identifier for this function. Used to group telemetry data by function.
24
38
  */
@@ -856,7 +870,7 @@ declare class DefaultStreamObjectResult<T> implements StreamObjectResult<T> {
856
870
  readonly warnings: StreamObjectResult<T>['warnings'];
857
871
  readonly usage: StreamObjectResult<T>['usage'];
858
872
  readonly rawResponse: StreamObjectResult<T>['rawResponse'];
859
- constructor({ stream, warnings, rawResponse, schema, onFinish, rootSpan, doStreamSpan, }: {
873
+ constructor({ stream, warnings, rawResponse, schema, onFinish, rootSpan, doStreamSpan, telemetry, }: {
860
874
  stream: ReadableStream<string | Omit<LanguageModelV1StreamPart, 'text-delta'>>;
861
875
  warnings: StreamObjectResult<T>['warnings'];
862
876
  rawResponse?: StreamObjectResult<T>['rawResponse'];
@@ -864,6 +878,7 @@ declare class DefaultStreamObjectResult<T> implements StreamObjectResult<T> {
864
878
  onFinish: Parameters<typeof streamObject<T>>[0]['onFinish'];
865
879
  rootSpan: Span;
866
880
  doStreamSpan: Span;
881
+ telemetry: TelemetrySettings | undefined;
867
882
  });
868
883
  get object(): Promise<T>;
869
884
  get partialObjectStream(): AsyncIterableStream<DeepPartial<T>>;
@@ -1505,13 +1520,14 @@ declare class DefaultStreamTextResult<TOOLS extends Record<string, CoreTool>> im
1505
1520
  readonly toolCalls: StreamTextResult<TOOLS>['toolCalls'];
1506
1521
  readonly toolResults: StreamTextResult<TOOLS>['toolResults'];
1507
1522
  readonly rawResponse: StreamTextResult<TOOLS>['rawResponse'];
1508
- constructor({ stream, warnings, rawResponse, onFinish, rootSpan, doStreamSpan, }: {
1523
+ constructor({ stream, warnings, rawResponse, onFinish, rootSpan, doStreamSpan, telemetry, }: {
1509
1524
  stream: ReadableStream<TextStreamPart<TOOLS>>;
1510
1525
  warnings: StreamTextResult<TOOLS>['warnings'];
1511
1526
  rawResponse: StreamTextResult<TOOLS>['rawResponse'];
1512
1527
  onFinish?: Parameters<typeof streamText>[0]['onFinish'];
1513
1528
  rootSpan: Span;
1514
1529
  doStreamSpan: Span;
1530
+ telemetry: TelemetrySettings | undefined;
1515
1531
  });
1516
1532
  /**
1517
1533
  Split out a new stream from the original stream.