toOpenAIMessageParam
Converts a core Message to the appropriate OpenAIMessageParam subtype.
Mapping:
Role.Assistant → OpenAIMessageParam.Assistant (with tool calls if Content.ToolCall)
Return
The corresponding OpenAIMessageParam.
Throws
if the content type doesn't match the role.