ai 5.0.29 → 5.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,11 @@
1
1
  # ai
2
2
 
3
+ ## 5.0.30
4
+
5
+ ### Patch Changes
6
+
7
+ - 7fcc6be: feat(ai): throw InvalidArgumentError when messages is not provided
8
+
3
9
  ## 5.0.29
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -10027,6 +10027,13 @@ async function validateUIMessages({
10027
10027
  dataSchemas,
10028
10028
  tools
10029
10029
  }) {
10030
+ if (messages == null) {
10031
+ throw new InvalidArgumentError({
10032
+ parameter: "messages",
10033
+ value: messages,
10034
+ message: "messages parameter must be provided"
10035
+ });
10036
+ }
10030
10037
  const validatedMessages = await (0, import_provider_utils27.validateTypes)({
10031
10038
  value: messages,
10032
10039
  schema: import_v410.z.array(uiMessageSchema)