Extract leading system messages (concatenated with \n\n) and return the remaining messages. Mid-thread system messages are inlined as user content (with a warning) because Anthropic disallows system messages mid-conversation.
Extract leading system messages (concatenated with \n\n) and return the remaining messages. Mid-thread system messages are inlined as user content (with a warning) because Anthropic disallows system messages mid-conversation.