Output Formats
| `output_format` value | Behavior |
v0.4.0concept
Output formats (v0.2)
output_format value |
Behavior |
|---|---|
| (omitted) | Free text. Executor doesn’t validate. |
text |
Same as omitted; declared for documentation only. |
structured_json |
Post-LLM JSON.parse + assert fields exists. Fail-fast on missing fields. |
code |
Treated as text; declared for documentation. Future (v0.3) will lint + syntax check. |
markdown |
Treated as text; future (v0.3) will validate fences. |
zip (output.only) |
Output is a multi-file archive delivered via signed URL. Stage-level output_format does NOT support zip; use the pipeline-level output field. |
If output_format: structured_json is declared, the stage executor MUST validate
all fields in fields: [...] exist in the LLM output. Missing required field →
StageOutputFormatError, abort pipeline, refund buyer.
Example:
- id: research
model: gpt-4o
prompt: |
Topic: $input.topic
Return JSON: { "summary": str, "key_points": [str], "sources": [str] }
output_format: structured_json
fields: [summary, key_points, sources]