Hmmmm. Stagehand's internal schema gave that error. It was rejected by OpenAI's structured and strict output format. The thing is, even though I pinned Stagehand's version to v3.25.76, v3.7.3 works and supports both Zod 3 and 4. See, the reinstall did change the dependency graph, but the pinned graph still contains the Zod 4 requirement; it gets confusing at a point as to why this is the case, but I'll treat my solution as a workaround rather than a confirmed long-term fix. I also saw a Stagehand issue showing that Zod 3/4 can still break a schema conversion in Mastra builds. All this seems like a solution is still being worked on, this is just a temporary workaround.

