Member Junction
    Preparing search index...

    Function toClassicChatMessageRole

    • Collapses an MJ role onto the three roles every chat API understands.

      tool becomes user, which is how a tool result reads to a provider with no tool support — the user handing the model some text. Drivers that DO implement tools must not use this for tool turns; they map those onto their SDK's own tool-result shape.

      Parameters

      Returns "system" | "user" | "assistant"

      The equivalent classic role