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.
Transform a canonical request into a provider-specific body using the supplied config. Pure function — no I/O.
messagesandmodelare copied to the output as-is. Adapters that need to reshape messages (Anthropic, etc.) should overwrite the resultingmessagesandsystemfields after calling this.provider_optionsis special: only the entry matching the active provider is shallow-merged into the body verbatim; other entries are silently ignored.