Expand description
cersei-provider: Provider trait and built-in LLM providers.
Providers abstract over different LLM backends (Anthropic, OpenAI, local models). Each provider implements streaming completion, token counting, and capability discovery.
Re-exports§
pub use anthropic::Anthropic;pub use gemini::Gemini;pub use openai::OpenAi;pub use router::from_model_string;
Modules§
- anthropic
- Anthropic provider: Claude API client with streaming SSE support.
- gemini
- Google Gemini provider: native Gemini API client with streaming support.
- openai
- OpenAI-compatible provider (works with OpenAI, Azure, Ollama, etc.)
- registry
- Static registry of known LLM providers.
- router
- Model router: parse
provider/modelstrings and construct the right provider.
Structs§
- Completion
Request - Completion
Response - Completion
Stream - A streaming response from a provider. Wraps a channel of StreamEvents.
- OAuth
Token - Provider
Capabilities - Provider
Options - Stream
Accumulator - Accumulates streaming events into content blocks.