Skip to main content

Module model

Module model 

Source
Expand description

Model and provider abstraction.

Mirrors Model / ImageContent from pi-ai: a pluggable interface that any concrete provider (OpenAI, Anthropic, local GGUF via mistralrs, …) implements. The agent loop talks only to ModelProvider.

Structs§

Model
A model identifier in provider/model form, e.g. anthropic/claude-sonnet-4-6.
ModelRequest
A request to a model.
ModelResponse
The final, non-streamed response from a model turn.

Enums§

StreamEvent
One event in a streamed model response.

Traits§

ModelProvider
The provider abstraction. Implement this to add a backend.

Type Aliases§

StreamEventStream
A boxed, sendable stream of StreamEvents.