Skip to content

Commit 5a9cb4b

Browse files
committed
remove object check
1 parent c1dd29b commit 5a9cb4b

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/helpers/beta/zod.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ export function betaZodFunctionTool<InputSchema extends ZodType>(options: {
1717
}): BetaRunnableTool<zodInfer<InputSchema>> {
1818
const jsonSchema = z.toJSONSchema(options.parameters, { reused: 'ref' });
1919

20-
if (jsonSchema.type !== 'object') {
21-
throw new Error(`Zod schema for tool "${options.name}" must be an object, but got ${jsonSchema.type}`);
22-
}
23-
2420
// TypeScript doesn't narrow the type after the runtime check, so we need to assert it
2521
const objectSchema = jsonSchema as typeof jsonSchema & { type: 'object' };
2622

0 commit comments

Comments
 (0)