@encorp.ai/llm-open-proxy - v0.2.2
    Preparing search index...

    Function transformChatRequest

    • Transform a canonical request into a provider-specific body using the supplied config. Pure function — no I/O.

      • messages and model are copied to the output as-is. Adapters that need to reshape messages (Anthropic, etc.) should overwrite the resulting messages and system fields after calling this.
      • provider_options is special: only the entry matching the active provider is shallow-merged into the body verbatim; other entries are silently ignored.
      • Unknown fields (present on canonical but absent from the config) emit a warning and are dropped.

      Parameters

      Returns TransformResult