A mockModel preset for text paths: a zero-config model that echoes
the rendered request back as text, for asserting prompt and message assembly
(what the model would have seen). Supports the same inspection members as
mockModel.
Because it returns text, it can't satisfy a structured output schema —
Genkit derives output by parsing the response text and validating it, which
prose can't pass. If the request carries an output schema, echoModel throws
an explanatory error. For structured-output paths, use mockModel with
a conforming response and assert assembly via MockModel.lastRequestText
/ MockModel.lastRequest instead.
A mockModel preset for text paths: a zero-config model that echoes the rendered request back as text, for asserting prompt and message assembly (what the model would have seen). Supports the same inspection members as mockModel.
Because it returns text, it can't satisfy a structured output schema — Genkit derives
outputby parsing the response text and validating it, which prose can't pass. If the request carries an output schema,echoModelthrows an explanatory error. For structured-output paths, use mockModel with a conforming response and assert assembly via MockModel.lastRequestText / MockModel.lastRequest instead.