Skip to main content

Interface: JsonOutputOptions

Defined in: packages/core/src/utils/output.ts:29

Options Output.json() and Output.jsonSchema() share.

Properties​

name?​

optional name?: string

Defined in: packages/core/src/utils/output.ts:31

The output's name for the provider (a schema or tool name some use as guidance).


onInvalid?​

optional onInvalid?: "text" | "fail"

Defined in: packages/core/src/utils/output.ts:39

What the bot answers when the reply does not parse as JSON (or fails validate). Default 'fail': the turn fails, as for any output schema. 'text': the bot answers with the model's text as it is, for a host that forwards the reply rather than relying on it (an OpenAI-compatible response_format, where the client decides).