ai 7.0.29 → 7.0.30

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,13 @@
1
1
  # ai
2
2
 
3
+ ## 7.0.30
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [341616a]
8
+ - Updated dependencies [70fc45c]
9
+ - @ai-sdk/gateway@4.0.22
10
+
3
11
  ## 7.0.29
4
12
 
5
13
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1089,7 +1089,7 @@ import {
1089
1089
  } from "@ai-sdk/provider-utils";
1090
1090
 
1091
1091
  // src/version.ts
1092
- var VERSION = true ? "7.0.29" : "0.0.0-test";
1092
+ var VERSION = true ? "7.0.30" : "0.0.0-test";
1093
1093
 
1094
1094
  // src/util/download/download.ts
1095
1095
  var download = async ({
@@ -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.29" : "0.0.0-test";
88
+ var VERSION = true ? "7.0.30" : "0.0.0-test";
89
89
 
90
90
  // src/util/download/download.ts
91
91
  var download = async ({
@@ -301,6 +301,42 @@ const someTool = tool({
301
301
  codebase.
302
302
  </Note>
303
303
 
304
+ ### Remove `name` from Function Tool Definitions
305
+
306
+ Function tool names come from their keys in the `tools` object. In AI SDK 5, a
307
+ `name` property could pass type checking because it was part of the
308
+ provider-defined member of the `Tool` type, but it did not set the name of a
309
+ function tool. The AI SDK 6 types no longer accept the property in a function
310
+ tool definition.
311
+
312
+ Remove `name` from `tool()` and use the intended name as the key in the `tools`
313
+ object:
314
+
315
+ ```tsx filename="AI SDK 5"
316
+ import { tool } from 'ai';
317
+ import { z } from 'zod';
318
+
319
+ const tools = {
320
+ getWeather: tool({
321
+ name: 'getWeather',
322
+ inputSchema: z.object({}),
323
+ outputSchema: z.any(),
324
+ }),
325
+ };
326
+ ```
327
+
328
+ ```tsx filename="AI SDK 6"
329
+ import { tool } from 'ai';
330
+ import { z } from 'zod';
331
+
332
+ const tools = {
333
+ getWeather: tool({
334
+ inputSchema: z.object({}),
335
+ outputSchema: z.any(),
336
+ }),
337
+ };
338
+ ```
339
+
304
340
  ### `cachedInputTokens` and `reasoningTokens` in `LanguageModelUsage` Deprecation
305
341
 
306
342
  `cachedInputTokens` and `reasoningTokens` in `LanguageModelUsage` have been deprecated.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai",
3
- "version": "7.0.29",
3
+ "version": "7.0.30",
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",
@@ -42,7 +42,7 @@
42
42
  }
43
43
  },
44
44
  "dependencies": {
45
- "@ai-sdk/gateway": "4.0.21",
45
+ "@ai-sdk/gateway": "4.0.22",
46
46
  "@ai-sdk/provider": "4.0.3",
47
47
  "@ai-sdk/provider-utils": "5.0.10"
48
48
  },