Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions content/docs/08-migration-guides/24-migration-guide-6-0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,38 @@ const someTool = tool({
codebase.
</Note>

### Tool `name` Property Removal

The `name` property has been removed from `tool()`. In AI SDK 6, the tool name
comes from the key in the `tools` object.

```tsx filename="AI SDK 5"
import { tool } from 'ai';
import { z } from 'zod';

const weatherTool = tool({
name: 'weather',
description: 'Get the weather',
inputSchema: z.object({
city: z.string(),
}),
});
```

```tsx filename="AI SDK 6"
import { tool } from 'ai';
import { z } from 'zod';

const tools = {
weather: tool({
description: 'Get the weather',
inputSchema: z.object({
city: z.string(),
}),
}),
};
```

### `cachedInputTokens` and `reasoningTokens` in `LanguageModelUsage` Deprecation

`cachedInputTokens` and `reasoningTokens` in `LanguageModelUsage` have been deprecated.
Expand Down
Loading