ai 7.0.0-beta.76 → 7.0.0-beta.78

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.
@@ -154,7 +154,7 @@ var import_provider_utils2 = require("@ai-sdk/provider-utils");
154
154
  var import_provider_utils3 = require("@ai-sdk/provider-utils");
155
155
 
156
156
  // src/version.ts
157
- var VERSION = true ? "7.0.0-beta.76" : "0.0.0-test";
157
+ var VERSION = true ? "7.0.0-beta.78" : "0.0.0-test";
158
158
 
159
159
  // src/util/download/download.ts
160
160
  var download = async ({
@@ -134,7 +134,7 @@ import {
134
134
  } from "@ai-sdk/provider-utils";
135
135
 
136
136
  // src/version.ts
137
- var VERSION = true ? "7.0.0-beta.76" : "0.0.0-test";
137
+ var VERSION = true ? "7.0.0-beta.78" : "0.0.0-test";
138
138
 
139
139
  // src/util/download/download.ts
140
140
  var download = async ({
@@ -91,6 +91,7 @@ The open-source community has created the following providers:
91
91
  - [Soniox Provider](/providers/community-providers/soniox) (`@soniox/vercel-ai-sdk-provider`)
92
92
  - [Zhipu (Z.AI) Provider](/providers/community-providers/zhipu) (`zhipu-ai-provider`)
93
93
  - [OLLM Provider](/providers/community-providers/ollm) (`@ofoundation/ollm`)
94
+ - [ZeroEntropy Provider](/providers/community-providers/zeroentropy) (`zeroentropy-ai-provider`)
94
95
 
95
96
  ## Self-Hosted Models
96
97
 
@@ -67,6 +67,17 @@ npx @ai-sdk/devtools
67
67
 
68
68
  Open [http://localhost:4983](http://localhost:4983) to view your AI SDK interactions.
69
69
 
70
+ ### Monorepo usage
71
+
72
+ If you are using a monorepo setup (e.g. Turborepo, Nx), start DevTools from the same workspace where your AI SDK code runs.
73
+
74
+ For example, if your API is in `apps/api`, run:
75
+
76
+ ```bash
77
+ cd apps/api
78
+ npx @ai-sdk/devtools
79
+ ```
80
+
70
81
  ## Captured data
71
82
 
72
83
  The DevTools middleware captures the following information from your AI SDK calls:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai",
3
- "version": "7.0.0-beta.76",
3
+ "version": "7.0.0-beta.78",
4
4
  "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.",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -44,9 +44,9 @@
44
44
  }
45
45
  },
46
46
  "dependencies": {
47
- "@ai-sdk/gateway": "4.0.0-beta.43",
48
- "@ai-sdk/provider": "4.0.0-beta.10",
49
- "@ai-sdk/provider-utils": "5.0.0-beta.16"
47
+ "@ai-sdk/gateway": "4.0.0-beta.44",
48
+ "@ai-sdk/provider-utils": "5.0.0-beta.16",
49
+ "@ai-sdk/provider": "4.0.0-beta.10"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@edge-runtime/vm": "^5.0.0",
@@ -8,7 +8,6 @@ import {
8
8
  getErrorMessage,
9
9
  IdGenerator,
10
10
  ProviderOptions,
11
- ToolApprovalResponse,
12
11
  withUserAgentSuffix,
13
12
  } from '@ai-sdk/provider-utils';
14
13
  import { NoOutputGeneratedError } from '../error';
@@ -649,28 +648,6 @@ export async function generateText<
649
648
  });
650
649
  }
651
650
 
652
- // Forward provider-executed approval responses to the provider
653
- const providerExecutedToolApprovals = [
654
- ...approvedToolApprovals,
655
- ...deniedToolApprovals,
656
- ].filter(toolApproval => toolApproval.toolCall.providerExecuted);
657
-
658
- if (providerExecutedToolApprovals.length > 0) {
659
- responseMessages.push({
660
- role: 'tool',
661
- content: providerExecutedToolApprovals.map(
662
- toolApproval =>
663
- ({
664
- type: 'tool-approval-response',
665
- approvalId: toolApproval.approvalResponse.approvalId,
666
- approved: toolApproval.approvalResponse.approved,
667
- reason: toolApproval.approvalResponse.reason,
668
- providerExecuted: true,
669
- }) satisfies ToolApprovalResponse,
670
- ),
671
- });
672
- }
673
-
674
651
  const callSettings = prepareCallSettings(settings);
675
652
 
676
653
  let currentModelResponse: LanguageModelV4GenerateResult & {
@@ -10,7 +10,6 @@ import {
10
10
  IdGenerator,
11
11
  isAbortError,
12
12
  ProviderOptions,
13
- ToolApprovalResponse,
14
13
  ToolContent,
15
14
  } from '@ai-sdk/provider-utils';
16
15
  import { ServerResponse } from 'node:http';
@@ -1462,23 +1461,6 @@ class DefaultStreamTextResult<
1462
1461
  }),
1463
1462
  );
1464
1463
 
1465
- // forward provider-executed approval responses to the provider (do not execute locally):
1466
- if (providerExecutedToolApprovals.length > 0) {
1467
- initialResponseMessages.push({
1468
- role: 'tool',
1469
- content: providerExecutedToolApprovals.map(
1470
- toolApproval =>
1471
- ({
1472
- type: 'tool-approval-response',
1473
- approvalId: toolApproval.approvalResponse.approvalId,
1474
- approved: toolApproval.approvalResponse.approved,
1475
- reason: toolApproval.approvalResponse.reason,
1476
- providerExecuted: true,
1477
- }) satisfies ToolApprovalResponse,
1478
- ),
1479
- });
1480
- }
1481
-
1482
1464
  // Local tool results (approved + denied) are sent as tool results:
1483
1465
  if (toolOutputs.length > 0 || localDeniedToolApprovals.length > 0) {
1484
1466
  const localToolContent: ToolContent = [];
@@ -83,7 +83,8 @@ export async function toResponseMessages<TOOLS extends ToolSet>({
83
83
  type: 'tool-call',
84
84
  toolCallId: part.toolCallId,
85
85
  toolName: part.toolName,
86
- input: part.input,
86
+ input:
87
+ part.invalid && typeof part.input !== 'object' ? {} : part.input,
87
88
  providerExecuted: part.providerExecuted,
88
89
  providerOptions: part.providerMetadata,
89
90
  });