coleam00/Archon · error · Error
Node '${node.id}': output_format declared but the provider's
Error message
Node '${node.id}': output_format declared but the provider's structured output failed schema validation: ${validation.errors.join('; ')} What it means
A node declared output_format, the provider produced structured output, but it failed schema validation. After exhausting reask attempts (scheduleReask asking the model to fix the listed errors), the executor throws with the joined validation errors so the developer sees exactly which schema constraints failed.
Source
Thrown at packages/workflows/src/dag-executor.ts:3052
} catch (serializeErr) {
const err = serializeErr as Error;
throw new Error(
`Node '${node.id}': failed to serialize structured_output to JSON: ${err.message}`
);
}
getLog().debug({ nodeId: node.id, streamingMode }, 'dag.structured_output_override');
break;
}
// Invalid payload.
getLog().warn(
{ nodeId: node.id, workflowRunId: workflowRun.id, errors: validation.errors },
'dag.structured_output_invalid'
);
if (canReask) {
await scheduleReask(validation.errors);
continue;
}
throw new Error(
`Node '${node.id}': output_format declared but the provider's structured output failed schema validation: ${validation.errors.join('; ')}`
);
}
// No structured output at all (prose / refusal / parse miss / timeout).
getLog().warn(
{ nodeId: node.id, workflowRunId: workflowRun.id },
'dag.structured_output_missing'
);
if (canReask) {
await scheduleReask(['no JSON object was found in the response']);
continue;
}
// Surface the real cause: a timeout/abort produces no structured output too,
// and reporting it as "the model replied with prose" would mislead.
if (nodeIdleTimedOut) {
throw new Error(
`Node '${node.id}': timed out (no output for ${String(effectiveIdleTimeout / 60000)} min) before producing the required structured output.`View on GitHub (pinned to 0773b97458)
Solutions
- Read the joined validation.errors in the message and relax/correct the output_format schema accordingly.
- Make required fields optional with defaults, or loosen types/enums the model keeps missing.
- Improve the node prompt: show the schema and an example of a valid output object.
- Split complex outputs into multiple nodes with smaller schemas, or enable/raise reask attempts.
Example fix
// before
output_format:
type: object
required: [summary, confidence, sources, owner, eta]
// after
output_format:
type: object
required: [summary]
properties: { summary: { type: string }, confidence: { type: number } } Defensive patterns
Strategy: validation
Validate before calling
import Ajv from 'ajv';
const ajv = new Ajv();
const validate = ajv.compile(node.output_format);
if (!validate(sampleModelOutput)) console.error('Schema too strict:', ajv.errorsText(validate.errors)); Type guard
function passesSchema(out: unknown, schema: object): boolean {
return validateAgainstSchema(out, schema).valid;
} Try / catch
try {
await runNode(node);
} catch (e) {
if (String(e).includes('failed schema validation')) console.error('Relax schema or improve prompt; errors:', e.message);
else throw e;
} Prevention
- Test output_format schemas against sample model outputs before shipping.
- Keep schemas minimal — require only fields you consume.
- Show the schema and a valid example in the node prompt.
- Enable reask so the model can self-correct validation errors.
When it happens
Trigger: Model output parses as a JSON object but violates the declared output_format schema (missing required fields, wrong types, extra constraints); reask retries were attempted and still failed or reasks were not possible (canReask false).
Common situations: An overly strict or incorrect JSON schema for a fuzzy task; model omitting required fields; enum/type mismatches; model ignoring reask instructions on complex schemas.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- Node '${node.id}': failed to serialize structured_output to
- Node '${node.id}': timed out (no output for ${String(effecti
- Node '${node.id}': output_format declared but the provider r
- Workflow outcome_field '${field}' on returns node '${returns
- Cannot generate dry-run stub for node '${node.id}': output_f
AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01).
Data as JSON: /api/errors/947fa3a2576577cf.
Report an issue: GitHub.