Skip to content

OutputSchema in ResiterTool can only take non-nullable schema #594

Open
@hanfangAmazon

Description

@hanfangAmazon

Describe the bug

Sometimes the output can be either undefined/null or have a value that matches the shchema, but OutputSchema config only takes ZodRawShape and convert it to Zod object here

outputSchema === undefined ? undefined : z.object(outputSchema),

That whay I can't return undefined or null in callback handler, which are considered as a valid output as well.

Expected behavior
OutputSchema should allow null/undefined response, or allow us to pass Zod object directly

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions