Expand description
LLM transport extension point.
StreamFn is the swappable boundary between the loop and any
provider: real LLM API call (production), recorded-fixture replay
(eval), scripted scenario (tests), remote proxy (gateway). One trait
method, typed request/response.
The loop never imports a specific provider; the caller assembles a
LoopConfig with a StreamFn implementation of their choice.
Structs§
- Stream
Request - Inputs for one LLM call.
- Stream
Response - Final assembled response from one LLM call. Producers that don’t need
fine-grained streaming can return a
BoxStreamthat yields just oneDoneevent. - Tool
Schema - Tool schema as the provider sees it.
Enums§
- Assistant
Stream Chunk - One token-level chunk during streaming.
- Reasoning
Effort - Reasoning-effort levels accepted by every supported provider.
- Stream
Error Kind - Coarse classification of a stream error.
- Stream
Event - Streamed event from the provider.
Traits§
- Stream
Fn - The transport trait. One method, typed in/out.