pub fn generate(
request: CanonicalRequest,
config: ResolvedConfig,
host: &Host<'_>,
) -> impl Iterator<Item = Event>Expand description
Generate against a resolved config (arch §1): drive ONE round-trip and yield the
canonical event stream, terminated by a single End. THE pure typed core — run
wraps it in byte I/O, an embedder consumes the events directly. The model SEED is
resolved against the per-provider cache here (a local file read via host.cache,
model-discovery §5.2), then the request is encoded, authenticated, and sent over the
one Transport. Every failure is an in-band Event::Error, so the call is total.
This is the normalized-in / canonical-out composition — [send_encoded] (the request
half) then [canonical_events] (the response half); the --raw=out variant reuses
send_encoded under a RawSink (arch §5.4, §13.14).