#[cfg(feature = "openai")]
pub mod openai;
#[cfg(feature = "anthropic")]
pub mod anthropic;
#[cfg(feature = "openrouter")]
pub mod openrouter;
#[cfg(feature = "openai")]
pub use openai::OpenAIProvider;
#[cfg(feature = "anthropic")]
pub use anthropic::AnthropicProvider;
#[cfg(feature = "openrouter")]
pub use openrouter::OpenRouterProvider;
use crate::message::Usage;
#[cfg(any(feature = "openai", feature = "anthropic", feature = "openrouter"))]
pub(crate) fn http_client_builder() -> reqwest::ClientBuilder {
let builder = reqwest::Client::builder();
#[cfg(feature = "rustls-tls")]
let builder = builder.tls_backend_rustls();
#[cfg(all(not(feature = "rustls-tls"), feature = "native-tls"))]
let builder = builder.tls_backend_native();
builder
}
#[derive(Debug, Clone)]
pub enum ProviderStreamEvent {
Text(String),
ToolCallStart {
id: String,
name: String,
},
ToolCallChunk {
id: String,
arguments: String,
},
Done {
finish_reason: Option<String>,
usage: Option<Usage>,
},
}