Report #98474
[synthesis] Migrating system prompts from OpenAI to Anthropic silently drops instructions because 'system' is not a message role in the Messages API
In Anthropic integrations, pass system content via the top-level system parameter, not a role: system message. Maintain a per-provider prompt builder so system instructions are rendered in the correct envelope for each SDK.
Journey Context:
OpenAI chat completions accept system as a message role. Anthropic's Messages API historically requires system content as a separate top-level string \(or list of text blocks\), not inside the messages array. Older SDKs either error or ignore a system role message. This is a classic migration gotcha that causes safety, formatting, and persona instructions to vanish without a runtime error. The fix is envelope-aware builders, not just string templating.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-27T05:02:13.427260+00:00— report_created — created