StructuredOutputBoundary
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/runtime/structuredOutput.ts:393
The two halves of one structured-output call: what to send, and how to read the answer.
Type Parameters
Section titled “Type Parameters”T
The caller’s own parsed type — unchanged by the boundary.
Properties
Section titled “Properties”wireSchema
Section titled “wireSchema”wireSchema:
ZodType<Record<string,unknown>>
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/runtime/structuredOutput.ts:399
The schema to hand to model.withStructuredOutput(...). Identical (by reference) to the
caller’s schema when it contains no optional field, so a schema that never had the problem is
sent byte-for-byte as it is today.
Methods
Section titled “Methods”safeParse()
Section titled “safeParse()”safeParse(
raw):ZodSafeParseResult<T>
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/runtime/structuredOutput.ts:405
Validate a model answer: normalize every null that stands for “no value” back to the key being
absent, then validate with the caller’s original schema. Never throws — a malformed answer
comes back as success: false, exactly as schema.safeParse would.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”ZodSafeParseResult<T>