Skip to main content

Module generate

Module generate 

Source
Expand description

Concrete generation edges over host-selected upstreams. Preparation owns the original declared request and its return mapping; no routing or default client.

Re-exports§

pub use crate::transform::generate::chat_responses::ToolCallKind;

Modules§

chat_claude
chat_gemini
chat_responses
claude_compat
Upgrade legacy native Messages/count-tokens requests before upstream dispatch. Work on the original JSON so provider extensions and signed blocks survive; only fields rejected by API 2026-10-21 are changed.
claude_gemini
claude_responses
fanout
Bounded multi-candidate generation over concrete single-result edges. Progress lives only in memory: a started child without an actual result is never replayed, because nothing reloads a group once its invocation ends.
gemini_responses
image_resources
Explicit image reads and publication with caller-owned cancellation progress. The native Gemini response is kept apart from the view its images are read or published into; an image signature travels with the view to the client.
stream
Incremental generation invocation over explicitly injected capabilities.

Structs§

Endpoint
Host-selected operation path/query and headers. Authentication stays in Upstream.
GenerationIdentity
Distinct invocation namespaces prevent request-history identities from colliding with response output positions. The host reuses these namespaces on recovery.
GenerationProgress
Kept by the caller if an await is cancelled or response conversion fails. A started send is never implicitly retried. Native bytes are retained before decoding.
GenerationResources
GenerationStateAccess
GenerationToolReplay
Identity/name facts for replaying tool calls and results, all taken from the client’s history. Keys remain the exact client IDs.

Enums§

ChatCallForm
Actual native Chat wire form. LegacyFunction uses its actual name and has no native call/item ID; its client alias says so.
GenerationOutcome

Functions§

reference_passes_through
Whether a media reference converted from source reaches target as a reference the upstream reads itself, so no bytes need fetching. Only URLs to dialects with a URL form for that media, and file IDs between the OpenAI dialects, survive conversion; every other reference is fetched. Tests pin this against what the direct transforms actually keep.