Skip to main content

Module provider

Module provider 

Source
Expand description

LLM provider abstraction layer.

This module defines the Provider trait and shared request/response types used by all backends (Anthropic/OpenAI/Gemini/etc).

Providers are responsible for:

Re-exports§

pub use crate::model::StreamEvent;

Structs§

Context
Inputs to a single completion request.
Model
A model definition loaded from the models registry.
ModelCost
Model pricing per million tokens.
StreamOptions
Options that control streaming completion behavior.
ThinkingBudgets
Custom thinking token budgets per level.
ToolDef
A tool definition exposed to the model.

Enums§

Api
Known API types.
CacheRetention
Cache retention policy.
InputType
Input types supported by a model.
KnownProvider
Known providers.

Traits§

Provider
An LLM backend capable of streaming assistant output (and tool calls).