ai 7.0.25 → 7.0.26

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.
@@ -85,7 +85,7 @@ import {
85
85
  } from "@ai-sdk/provider-utils";
86
86
 
87
87
  // src/version.ts
88
- var VERSION = true ? "7.0.25" : "0.0.0-test";
88
+ var VERSION = true ? "7.0.26" : "0.0.0-test";
89
89
 
90
90
  // src/util/download/download.ts
91
91
  var download = async ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai",
3
- "version": "7.0.25",
3
+ "version": "7.0.26",
4
4
  "type": "module",
5
5
  "description": "AI SDK by Vercel - build apps like ChatGPT, Claude, Gemini, and more with a single interface for any model using the Vercel AI Gateway or go direct to OpenAI, Anthropic, Google, or any other model provider.",
6
6
  "license": "Apache-2.0",
@@ -1589,6 +1589,19 @@ class DefaultStreamTextResult<
1589
1589
  // Re-enter the streamText tracing context after stream setup returns.
1590
1590
  const runInStreamTextTracingChannelContext = <T>(execute: () => T): T =>
1591
1591
  streamTextTracingChannelContext?.run(execute) ?? execute();
1592
+ const runInTracingChannelSpanInStreamText =
1593
+ telemetryDispatcher.runInTracingChannelSpan == null
1594
+ ? undefined
1595
+ : <T>(
1596
+ options: Parameters<
1597
+ NonNullable<TelemetryDispatcher['runInTracingChannelSpan']>
1598
+ >[0] & {
1599
+ execute: () => PromiseLike<T>;
1600
+ },
1601
+ ) =>
1602
+ runInStreamTextTracingChannelContext(() =>
1603
+ telemetryDispatcher.runInTracingChannelSpan!(options),
1604
+ );
1592
1605
 
1593
1606
  await notify({
1594
1607
  event: startEvent,
@@ -1676,8 +1689,7 @@ class DefaultStreamTextResult<
1676
1689
  telemetryDispatcher.onToolExecutionEnd,
1677
1690
  ),
1678
1691
  executeToolInTelemetryContext: telemetryDispatcher.executeTool,
1679
- runInTracingChannelSpan:
1680
- telemetryDispatcher.runInTracingChannelSpan,
1692
+ runInTracingChannelSpan: runInTracingChannelSpanInStreamText,
1681
1693
  onPreliminaryToolResult: result => {
1682
1694
  toolExecutionStepStreamController?.enqueue(result);
1683
1695
  },