Expand description
Unified multi-provider LLM API with streaming support.
Provides a standardized interface for interacting with multiple LLM providers: Anthropic, OpenAI Chat Completions, OpenAI Responses, Google Gemini, plus OpenAI-compatible profiles for OpenRouter and Mistral.
Re-exports§
pub use config::Config;pub use config::Error;pub use model::Model;pub use provider::Provider;pub use registry::ProviderRegistry;pub use registry::RegistrationError;pub use registry::RegistryError;pub use stream::AssistantStreamEvent;pub use stream::CostBreakdown;pub use stream::CumulativeUsage;pub use stream::Pricing;pub use stream::calculate_cost;
Modules§
- anthropic
- Anthropic Messages SSE provider (S8.1).
- azure_
openai - Azure OpenAI provider profile (task 3.2).
- bedrock
- AWS Bedrock provider (task 3.1).
- config
- Provider configuration and authentication.
- gemini
- Google Gemini
streamGenerateContentSSE provider (S8.1). - http
- Shared HTTP client with connection pooling and proxy support (tasks 3.13, 3.12).
- message
- Provider-facing message types (S7.1).
- mistral
- Mistral provider profile - routes through the OpenAI-compatible adapter.
- model
- Model discovery and configuration.
- openai_
chat - OpenAI-compatible chat completions SSE provider (S8.1).
- openai_
responses - OpenAI Responses API SSE provider (S8.1).
- openrouter
- OpenRouter provider profile - routes through the OpenAI-compatible adapter.
- provider
- LLM provider abstraction (S8.1).
- registry
- Provider registry — resolves
provider:modelspecs to provider + model info. - retry
- Retry/backoff/rate-limit support (task 2.15).
- stream
- Streaming response events (S7.3).
- vertex
- Google Vertex AI provider (task 3.3).