Expand description
Model crate — LLM provider implementations, enum dispatch, configuration, construction, and runtime management.
Merges all provider backends (OpenAI, Claude, Local) with the Provider
enum, ProviderManager, and ProviderDef into a single crate.
ProviderDef describes a provider (api_key, base_url, standard, models).
Each [provider.<name>] in TOML becomes one ProviderDef.
Re-exports§
pub use config::ModelConfig;pub use manager::ProviderManager;
Modules§
- config
- Model configuration.
- manager
ProviderManager— concurrent-safe named provider registry with model routing and active-provider swapping.- remote
- remove providers
Structs§
- Client
- An asynchronous
Clientto make Requests with. - Provider
Def - Provider definition — credentials and a list of models served.
Enums§
- ApiStandard
- API protocol standard for remote providers.
- Provider
- Unified LLM provider enum.
Functions§
- build_
provider - Construct a
Providerfrom a provider definition and model name. - default_
model - Default model name when none is configured.