LLM and Image Pipeline Internals
OpenRouter Client Behavior
OpenRouter requests include:
- timeout: 45s per attempt
- retries: up to 3 attempts
- retryable status codes: 408, 409, 429, 5xx
- transient network retry handling
Structured requests support parse callbacks for runtime validation.
Plan and Prompt Validation
Ideon validates:
- article plans (
articleSchemaconstraints) - image prompt payloads (
promptrequired) - run configuration via Zod schema defaults and constraints
Invalid provider output fails fast with actionable errors.
Section Normalization
Generated text is normalized by:
- trimming whitespace
- removing markdown fences when present
- rejecting empty output sections
Prompt System Composition
Prompt composition now includes layered directives:
- shared writing framework (structure, information density, specificity, rhythm, scannability, active voice, storytelling discipline, authenticity filter)
- style overlay (
professional,friendly,technical,academic,opinionated,storytelling) - content-type/channel directives (
article,x-thread,x-post,linkedin-post, etc.)
Article planning prompts also include adaptive persuasion guidance so the planner can choose AIDA, PAS, or BAB based on audience and objective fit.
For multi-target runs, article outputs may be used as anchor context for social/channel outputs.
Non-Article Output Path
- Non-article content types are generated in single-shot prompts.
- This path runs in the output stage and does not require section-based generation.
- For no-article runs, planning/sections/image stages are skipped.
Image Rendering Path
- Build image slots from plan (cover + inline)
- Expand each slot description to final prompt
- Build Replicate input from model registry and sanitized overrides
- Execute model and normalize output bytes
- Write image files and compute markdown-relative paths
Dry-Run Behavior
Dry-run bypasses provider calls but exercises orchestration:
- deterministic synthetic plan and sections
- placeholder asset files
- normal markdown assembly