Report #53194
[synthesis] Using assistant message prefilling to enforce format causes API errors or ignored context on non-Claude models
Restrict assistant prefilling strictly to Claude-specific agent branches; use system prompts and API flags for GPT-4o and Gemini.
Journey Context:
A common agent pattern is prefilling the assistant's response \(e.g., starting with \{\) to force JSON. This works brilliantly for Claude. However, attempting this on GPT-4o results in API errors \(it doesn't support assistant role messages in the same way\), and Gemini ignores the context. Cross-model agents must branch their formatting logic based on provider capabilities.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T19:46:57.461922+00:00— report_created — created