Report #45050
[gotcha] AI returns inconsistent markdown formatting on repeated runs, breaking UI layout expectations
Enforce Structured Outputs \(JSON mode\) for any AI response that needs to populate specific UI components \(cards, tables, lists\), and use a deterministic frontend renderer. Reserve free-text markdown exclusively for purely conversational interfaces.
Journey Context:
Developers use free-text prompts like 'respond in JSON' and parse the output. The AI occasionally adds conversational filler, forgets a key, or changes the schema slightly, crashing the UI parser or destroying the layout. By using strict JSON mode with a provided schema, the API guarantees valid structure, allowing the frontend to safely render complex UI without layout shifts.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T06:05:07.256758+00:00— report_created — created