Module: Kward::ModelPayloads

Included in:
Client
Defined in:
lib/kward/model/payloads.rb

Overview

Converts Kward conversation/tool data into provider-specific request shapes.

This module is mixed into Client because it needs provider configuration helpers such as model_for and reasoning_effort. Keep pure transcript and schema transformations here; keep network transport, credentials, retries, and telemetry in Client.

Kward stores one internal transcript shape, then projects it into either Chat Completions-style messages or Responses/Codex input items. Preserve both symbol and string key handling through MessageAccess so restored sessions, tests, and RPC-normalized messages keep working.