ai 6.0.228 → 6.0.229

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,12 @@
1
1
  # ai
2
2
 
3
+ ## 6.0.229
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [49a3098]
8
+ - @ai-sdk/gateway@3.0.152
9
+
3
10
  ## 6.0.228
4
11
 
5
12
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1282,7 +1282,7 @@ function detectMediaType({
1282
1282
  var import_provider_utils3 = require("@ai-sdk/provider-utils");
1283
1283
 
1284
1284
  // src/version.ts
1285
- var VERSION = true ? "6.0.228" : "0.0.0-test";
1285
+ var VERSION = true ? "6.0.229" : "0.0.0-test";
1286
1286
 
1287
1287
  // src/util/download/download.ts
1288
1288
  var download = async ({
package/dist/index.mjs CHANGED
@@ -1171,7 +1171,7 @@ import {
1171
1171
  } from "@ai-sdk/provider-utils";
1172
1172
 
1173
1173
  // src/version.ts
1174
- var VERSION = true ? "6.0.228" : "0.0.0-test";
1174
+ var VERSION = true ? "6.0.229" : "0.0.0-test";
1175
1175
 
1176
1176
  // src/util/download/download.ts
1177
1177
  var download = async ({
@@ -152,7 +152,7 @@ function detectMediaType({
152
152
  var import_provider_utils2 = require("@ai-sdk/provider-utils");
153
153
 
154
154
  // src/version.ts
155
- var VERSION = true ? "6.0.228" : "0.0.0-test";
155
+ var VERSION = true ? "6.0.229" : "0.0.0-test";
156
156
 
157
157
  // src/util/download/download.ts
158
158
  var download = async ({
@@ -132,7 +132,7 @@ import {
132
132
  } from "@ai-sdk/provider-utils";
133
133
 
134
134
  // src/version.ts
135
- var VERSION = true ? "6.0.228" : "0.0.0-test";
135
+ var VERSION = true ? "6.0.229" : "0.0.0-test";
136
136
 
137
137
  // src/util/download/download.ts
138
138
  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": "6.0.228",
3
+ "version": "6.0.229",
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,
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@opentelemetry/api": "^1.9.0",
48
- "@ai-sdk/gateway": "3.0.151",
48
+ "@ai-sdk/gateway": "3.0.152",
49
49
  "@ai-sdk/provider": "3.0.14",
50
50
  "@ai-sdk/provider-utils": "4.0.39"
51
51
  },