nsarrazin HF Staff commited on
Commit
05c6eff
·
unverified ·
1 Parent(s): 3cd67f6

fix(tools): increase limits on input sizes

Browse files
Files changed (1) hide show
  1. src/lib/server/tools/index.ts +7 -7
src/lib/server/tools/index.ts CHANGED
@@ -36,23 +36,23 @@ const IOType = z.union([z.literal("str"), z.literal("int"), z.literal("float"),
36
 
37
  const toolInputBaseSchema = z.union([
38
  z.object({
39
- name: z.string().min(1).max(40),
40
- description: z.string().max(100).optional(),
41
  paramType: z.literal("required"),
42
  }),
43
  z.object({
44
- name: z.string().min(1).max(40),
45
- description: z.string().max(100).optional(),
46
  paramType: z.literal("optional"),
47
  default: z
48
- .union([z.string().max(40), z.number(), z.boolean(), z.undefined()])
49
  .transform((val) => (val === undefined ? "" : val)),
50
  }),
51
  z.object({
52
- name: z.string().min(1).max(40),
53
  paramType: z.literal("fixed"),
54
  value: z
55
- .union([z.string().max(40), z.number(), z.boolean(), z.undefined()])
56
  .transform((val) => (val === undefined ? "" : val)),
57
  }),
58
  ]);
 
36
 
37
  const toolInputBaseSchema = z.union([
38
  z.object({
39
+ name: z.string().min(1).max(80),
40
+ description: z.string().max(200).optional(),
41
  paramType: z.literal("required"),
42
  }),
43
  z.object({
44
+ name: z.string().min(1).max(80),
45
+ description: z.string().max(200).optional(),
46
  paramType: z.literal("optional"),
47
  default: z
48
+ .union([z.string().max(120), z.number(), z.boolean(), z.undefined()])
49
  .transform((val) => (val === undefined ? "" : val)),
50
  }),
51
  z.object({
52
+ name: z.string().min(1).max(80),
53
  paramType: z.literal("fixed"),
54
  value: z
55
+ .union([z.string().max(120), z.number(), z.boolean(), z.undefined()])
56
  .transform((val) => (val === undefined ? "" : val)),
57
  }),
58
  ]);