fn log_payload_shape(
body: &Value,
messages: &[ChatMessage],
before_count: usize,
)Expand description
Diagnostics for tracking down oversized payloads: the byte cost of every non-message top-level field, and the content size of every message.
Gated on the log level as a whole because both loops serialise their way to
a size — work the debug! macro would otherwise discard after paying for
it on every strict-turn request.