ai 4.0.36 → 4.0.38

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai",
3
- "version": "4.0.36",
3
+ "version": "4.0.38",
4
4
  "description": "AI SDK by Vercel - The AI Toolkit for TypeScript and JavaScript",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -59,8 +59,8 @@
59
59
  "tsup": "^7.2.0",
60
60
  "typescript": "5.6.3",
61
61
  "zod": "3.23.8",
62
- "eslint-config-vercel-ai": "0.0.0",
63
- "@vercel/ai-tsconfig": "0.0.0"
62
+ "@vercel/ai-tsconfig": "0.0.0",
63
+ "eslint-config-vercel-ai": "0.0.0"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "react": "^18 || ^19 || ^19.0.0-rc",
@@ -1145,7 +1145,7 @@ function convertToCoreMessages(messages, options) {
1145
1145
  break;
1146
1146
  }
1147
1147
  case "assistant": {
1148
- if (toolInvocations == null) {
1148
+ if (toolInvocations == null || toolInvocations.length === 0) {
1149
1149
  coreMessages.push({ role: "assistant", content });
1150
1150
  break;
1151
1151
  }